Module: Fleetly::Logitem

Included in:
Client
Defined in:
lib/fleetly/logitem.rb

Instance Method Summary collapse

Instance Method Details

#get_logitem_details(id) ⇒ Hashie::Mash

Retrieve Logitem details given the ID

Parameters:

  • :id (String)

    Logitem ID

Returns:

  • (Hashie::Mash)

    Activity



12
13
14
15
16
17
18
# File 'lib/fleetly/logitem.rb', line 12

def get_logitem_details(id)
  options = {}
  options[:oauth_token] = token
  activity_response = get("/api/v1/logitems/#{id}", options)

  activity_response if activity_response.result?
end

#get_logitems(options = {}) ⇒ Hashie::Mash

Retrieve Logitems

Parameters:

  • :start (Integer)

    Starting point (default 0)

  • :limit (Integer)

    Max number of result (default 20)

Returns:

  • (Hashie::Mash)

    Activity



27
28
29
30
31
32
33
# File 'lib/fleetly/logitem.rb', line 27

def get_logitems(options={})
  options = {}
  options[:oauth_token] = token
  activity_response = get("/api/v1/logitems/search", options)

  activity_response if activity_response.result?
end