Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/500px/f00px
500px api ruby gem
https://github.com/500px/f00px
Last synced: 3 months ago
JSON representation
500px api ruby gem
- Host: GitHub
- URL: https://github.com/500px/f00px
- Owner: 500px
- License: mit
- Created: 2013-02-05T23:06:33.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-10-14T13:10:19.000Z (over 8 years ago)
- Last Synced: 2024-03-18T04:43:34.717Z (3 months ago)
- Language: Ruby
- Size: 233 KB
- Stars: 29
- Watchers: 67
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-ruby - f00px
README
# F00px
500px api ruby gem [![Build Status](https://travis-ci.org/500px/f00px.png)](https://travis-ci.org/500px/f00px)
## Installation
Add this line to your application's Gemfile:
gem 'f00px'
And then execute:
$ bundle
Or install it yourself as:
$ gem install f00px
## Usage
Add this code to some initializer:
```ruby
F00px.configure do |config|
config.consumer_key = __consumer_key__
config.consumer_secret = __consumer_secret__
config.token = __token__
config.token_secret = __token_secret__
end
```Then just use the api:
```ruby
response = F00px.get('users/1')
puts response.body
```You also can create multiple clients.
With oauth
```ruby
client = F00px::Client.new
client.token = '__client_token__'
client.token_secret = '__client_token_secret__'response = client.get('users')
puts response.body
```With xauth
```ruby
client = F00px::Client.new
client.xauth('arthurnn', '**password**')response = client.get('users')
puts response.body
```## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request