Api for Odnoklassniki Social Network
Lemur is a lightweight, flexible Ruby SDK for Odnoklassniki. It allows read/write access to Odnoklassniki API. To work with Lemur you need VALUABLE ACCESS to odnoklassniki api. This api work only with access_token that gives you odnoklassniki, when you authorize with omniauth.
Add this line to your application's Gemfile:
gem "lemur", "~> 0.0.6"
or instal gem with latest changes
gem 'lemur', :git => "git@github.com:edikgat/lemur.git"
And then execute:
$ bundle
Or install it yourself as:
$ gem install lemur
To use odnoklassniki api methods you should have VALUABLE ACCESS to odnoklassniki. ###Initialize
api = Lemur::API.new(application_secret_key, application_key, access_token, application_id = nil, refresh_token = nil)
application_id and refresh_token parameter needed only for 'get_new_token' action
###Methods examples
api.get({method: 'friends.get')
api.get({method: 'users.getCurrentUser'})
api.get_new_token
api.get({method: 'users.getInfo', uids: uid, fields: 'uid,first_name,last_name,current_location,gender,pic_1,pic_2,pic_3,pic_4,pic_5'})
api.get_request({method: 'users.getInfo', uids: uid, fields: 'uid,first_name,last_name,current_location,gender,pic_1,pic_2,pic_3,pic_4,pic_5'})
get_request methods don't use JSON parsing and returns Foreman response
###Gem parameters methods api.security_options api.request_options api.response
- Fork it
- 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 new Pull Request