Sha256: e9efbc5d0a73ba28b50537267f7bf73155e246071d1ac1bb5e460070e45fa607
Contents?: true
Size: 1.53 KB
Versions: 1
Compression:
Stored size: 1.53 KB
Contents
module Todoist module Misc class Activity include Todoist::Util # Returns the activity logs for a user. Full list of supported # parameters outlined in the API here: https://developer.todoist.com/#activity # The following objects are converted into parameters as appropriate: # # * object # * parent_project # * parent_item # * initiator # * until # * since def get(params={}) if params["until"] params["until"] = ParseHelper.formatTime(params["until"]) end if params["since"] params["since"] = ParseHelper.formatTime(params["since"]) end if params["object"] params["object_id"] = params["object"].id params.delete("object") end if params["parent_object"] params["parent_object_id"] = params["parent_object"].id params.delete("parent_object") end if params["parent_item"] params["parent_item_id"] = params["parent_item"].id params.delete("parent_item") end if params["initiator"] params["initiator_id"] = params["initiator"].id params.delete("initiator") end result = NetworkHelper.getResponse(Config::TODOIST_ACTIVITY_GET_COMMAND, params) ParseHelper.make_objects_as_array(result) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
todoist-ruby-0.1.1 | lib/todoist/misc/activity.rb |