leesharma / rescuetime

Ruby interface to the RescueTime APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support the Daily Summary Feed API

leesharma opened this issue · comments

As a ruby developer,
I want to get a high-level overview of daily statistics
In order to show statistical summary information.

API Reference

From the docs: The Daily Summary Feed API provides a high level rollup of the the time a user has logged for a full 24 hour period (defined by the user’s selected time zone). This is useful for generating notifications that don’t need to be real-time and don’t require much granularity (for greater precision or more timely alerts, see the Alerts Feed API). This can be used to construct a customized daily progress report delivered via email. The summary can also be used to alert people to specific conditions. For example, if a user has more than 20% of their time labeled as ‘uncategorized’, that can be used to offer people a message to update their categorizations on the website.

API key endpoint: GET https://www.rescuetime.com/anapi/daily_summary_feed?key=YOUR_API_KEY

It outputs a daily report containing a number of statistics (see API docs for details); no modifiers are provided.

For more information, https://www.rescuetime.com/apidoc#daily-summary-feed-reference

Possible Syntax:

There are a few ways I could go about this:

client = Rescuetime::Client.new(key: 'YOUR_API_KEY')

client.daily_summary_feed # verbose, using "feed" might be confusing
# => [{...}, ...]

client.daily_summary # fits with API naming, but "summary" isn't very descriptive
# => [{...}, ...]

client.summary # easy to confuse with `#overview`
# => [{...}, ...]

client.daily_stats # very different from the API–confusing?
# => [{...}, ...]