Project

lemur

0.01
No commit activity in last 3 years
No release in over 3 years
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.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0

Runtime

~> 0.8
 Project Readme

Lemur

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.

Installation

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

Usage

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'})

See all api methods here

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

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request