Skip to content
Plurk OAuth API
Python
Latest commit dca0d12 Feb 24, 2016 @clsung add Tatsuji Tsuchiya
Failed to load latest commit information.
bin Python3 support. Fix coding style for pep8. Feb 24, 2016
plurk_oauth remove debug print() Feb 24, 2016
tests Python3 support. Fix coding style for pep8. Feb 24, 2016
.gitignore add post_to_plurk May 23, 2011
.travis.yml
API.keys.sample API.keys.sample, rename it to API.keys to use May 23, 2011
AUTHORS.markdown add Tatsuji Tsuchiya Feb 24, 2016
README.markdown Python3 support. Fix coding style for pep8. Feb 24, 2016
req.txt add .travis.yml Feb 24, 2016
setup.py v0.5.0 Jan 3, 2012

README.markdown

Plurk-OAuth

Simple Wrapper of Plurk OAuth API

About

Plurk-OAuth is a wrapper for Plurk API 2.0 beta You will need to Sign Up for your own CUSTOMER TOKENs.

Installation

simply:

    $ pip install plurk-oauth

for development:

    $ git clone git@github.com:clsung/plurk-oauth.git
    $ cd plurk-oauth
    $ pip install -e .

API.keys

You will need to save CONSUMER_KEY/CONSUMER_SECRET in API.keys, the format is JSON. The example is below:

{"CONSUMER_SECRET": "I_am_consumer_secret", "ACCESS_TOKEN": "your_access_token", "ACCESS_TOKEN_SECRET": "your_access_token_secret", "CONSUMER_KEY": "I_am_consumer_key"}

Example with API.keys

from plurk_oauth import PlurkAPI

    plurk = PlurkAPI.fromfile(<path_to_API.keys>)
    print(plurk.callAPI('/APP/Profile/getOwnProfile'))

Example with ACCESS_TOKEN

from plurk_oauth import PlurkAPI

    plurk = PlurkAPI(CONSUMER_KEY, CONSUMER_SECRET)
    plurk.authorize(ACCESS_TOKEN,ACCESS_TOKEN_SECRET)
    print(plurk.callAPI('/APP/Profile/getOwnProfile'))

Example without ACCESS_TOKEN

from plurk_oauth import PlurkAPI

    plurk = PlurkAPI(CONSUMER_KEY, CONSUMER_SECRET)
    plurk.authorize()
    print(plurk.callAPI('/APP/Profile/getOwnProfile'))

Meta

Author

Cheng-Lung Sung :: clsung@gmail.com :: @clsung

Something went wrong with that request. Please try again.