Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Plurk OAuth API

branch: master
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.

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 PlurkAPI import PlurkAPI

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

Example with ACCESS_TOKEN

from PlurkAPI 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 PlurkAPI 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.