lib/todoist/misc/activity.rb in todoist-ruby-0.1.3 vs lib/todoist/misc/activity.rb in todoist-ruby-0.2.1
- old
+ new
@@ -1,8 +1,8 @@
module Todoist
module Misc
- class Activity
+ class Activity < Todoist::Service
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:
@@ -14,15 +14,15 @@
# * until
# * since
def get(params={})
if params["until"]
- params["until"] = ParseHelper.formatTime(params["until"])
+ params["until"] = ParseHelper.format_time(params["until"])
end
if params["since"]
- params["since"] = ParseHelper.formatTime(params["since"])
+ params["since"] = ParseHelper.format_time(params["since"])
end
if params["object"]
params["object_id"] = params["object"].id
params.delete("object")
@@ -41,10 +41,10 @@
if params["initiator"]
params["initiator_id"] = params["initiator"].id
params.delete("initiator")
end
- result = NetworkHelper.getResponse(Config::TODOIST_ACTIVITY_GET_COMMAND, params)
+ result = @client.api_helper.get_response(Config::TODOIST_ACTIVITY_GET_COMMAND, params)
ParseHelper.make_objects_as_hash(result)
end
end
end
end