module Fleetly::Activity

Public Instance Methods

get_activities(options={}) click to toggle source

Retrieve Activities

@param :name [String] Name to match @param :type [String] Type of Activity @param :start [Integer] Desired starting point @param :limit [Integer] Maximum number of result @param :order [String] Order of result

@return [Hashie::Mash] Activity

# File lib/fleetly/activity.rb, line 30
def get_activities(options={})
  options = {}
  options[:oauth_token] = token
  activity_response = get("/api/v1/activities/search", options)

  activity_response if activity_response.result?
end
get_activity(id) click to toggle source

Retrieve Activity details given the ID

@param :id [String] Activity ID

@return [Hashie::Mash] Activity

# File lib/fleetly/activity.rb, line 12
def get_activity(id)
  options = {}
  options[:oauth_token] = token
  activity_response = get("/api/v1/activities/#{id}", options)

  activity_response if activity_response.result?
end