A Ruby wrapper for the Path API.
Add this line to your application's Gemfile:
gem 'path'And then execute:
$ bundle
Or install it yourself as:
$ gem install path
# First create a client with your client_id and client_secret.
client = Path::Client.new(client_id: 'foobar', client_secret: 'barfoo')
# Redirect your user to the auth URL and it'll come back with an auth code.
client.auth_url # => https://partner.path.com/oauth2/authenticat?response_type=code&client_id=foobar
# Exchange your code for an access token and you're all set.
client.access_token!('code')
# Now, make requests.
client.user # => #<Hash>
client.add_moment('thought', { thought: 'Hello!', private: true })- Fork it ( https://github.com/[my-github-username]/path/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