TogglCache
Fetches reports data from Toggl API and caches them in a PostgreSQL database.
This allows you to build applications performing complex operations on a large number of Toggl content without the Toggl API latency. You may also use it to backup your precious data!
Installation
Add this line to your application's Gemfile:
gem 'toggl_cache'
And then execute:
$ bundle
Or install it yourself as:
$ gem install toggl_cache
Usage
Inside of bin/console
:
logger = Logger.new(STDOUT)
logger.level = Logger::DEBUG
client = TogglCache::Client.new(
api_token: 'SOME-API-TOKEN',
user_agent: 'MyCustomTogglCache',
logger: logger
)
TogglCache.sync_reports(client, 'TOGGL-WORKSPACE-ID')
The CLI
ruby lib/toggl_cli.rb [batch|help]
Contributing
- Fork it ( https://github.com/rchampourlier/toggl_cache/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Check the code of conduct.