Adk2
A ruby wrapper for accessing the ADK2 API.
Installation
Add this line to your application's Gemfile:
gem 'adk2'
And then execute:
$ bundle
Or install it yourself as:
$ gem install adk2
Usage
To instantiate the client:
client = Adk2::Client.new(network_name, username: '[email protected]', password: '123456')
Alternatively, you can use an API token:
client = Adk2::Client.new(network_name, api_token: 'tokentokentoken')
In case the API token expires (TODO: when does this happen?), with the first version the client automatically will fetch a new one. With the second version it won't.
Use the client to generate a report:
client.report(
'network',
'networkanalyticsbydate',
'2015-02-01',
'2015-02-04'
)
Contributing
- Fork it (https://github.com/ad2games/adk2/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