This is very much still a work in progress & likely to change, feel free to contribute however you find fit.
Add this line to your application's Gemfile:
gem 'underarmour'
And then execute:
$ bundle
Or install it yourself as:
$ gem install underarmour
You need to have access_key and api_key from the Under Armour API. This can be received from, https://developer.underarmour.com/signup
Your application needs to pass these keys to the underarmour gem by using dotenv. In your Gemfile add,
gem 'dotenv-rails'
Add the keys to the file .env in the repo home. The contents of the .env file will look like
access_token=<your-value>
api_key=<your-value>
In your client code, include the following,
require 'dotenv/load'
Now you should be able to access the environment variable set in .env by using ENV['access_token'] and ENV['api_key']
user = Underarmour::ApiClient.scoped_api_client(Underarmour::User, 'user/', access_token: 'YOUR_TOKEN', api_key: 'YOUR_CLIENT_API_KEY').find_self
activity_type = Underarmour::ApiClient.scoped_api_client(Underarmour::ActivityType, 'activity_type/',access_token: 'YOUR_TOKEN', api_key: 'YOUR_CLIENT_API_KEY').find(215)
Bug reports and pull requests are welcome on GitHub at https://github.com/dezmathio/underarmour. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Underarmour project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.