Skip to content

tiemei/kuaipan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To install the gem simply enter:

gem install kuaipan

To see an example of how it works enter the following into your terminal:

git clone git://github.com/tiemei/kuaipan-example.git
gem install kuaipan
cd kuaipan-example
ruby example.rb

require 'kuaipan'
class YourAPI 
  include Kuaipan::OpenAPI
  def your_method
    # 1 config
    consumer_key = 'YourConsumerKey'
    consumer_secret = 'YourConsumerSecret'
    input_config(consumer_key, consumer_secret)

    # 2 authorize + get_access_token
    # k_session = g_session() # ok!
    # k_session = g_session(:oauth_callback => 'Your callbake url') # ok!
    # authorize_url = k_session[:authorize_url]
    # user input their username+pwd
    # then you should parse oauth_verifier
    k_session.set_atoken oauth_verifier

    # 3 use Kuaipan API(such as download file, upload file...)
    # please refer to test/test_client.rb
    k_session.account_info['user_id'] # get user_id
  end
end

restart to support this API 2013-03-17

About

金山快盘SDK的ruby版本(the third party)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages