summaryrefslogtreecommitdiff
path: root/lib/ats/amp4e/computers.rb
blob: ab576a2958c2802994e8547bffa8bf062b07cfd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
module ATS
  module AMP4E
    class Computers
      attr_reader :api

      def initialize(api)
        @api = api
      end

      def list
        api.get("computers")
      end

      def show(id)
        api.get("computers/#{id}")
      end

      def trajectory(id)
        api.get("computers/#{id}/trajectory")
      end

      def user_activity(query)
        api.get("computers/user_activity", params: { q: query })
      end

      def user_trajectory(id, query)
        api.get("computers/#{id}/user_trajectory", params: { q: query })
      end

      def activity(query)
        api.get("computers/activity", params: { q: query })
      end
    end
  end
end