Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 60 lines (43 sloc) 1.425 kb
a38bdee @clsung rename README to README.markdown
authored
1 Plurk-OAuth
2 ======
3
4 Simple Wrapper of Plurk OAuth API
5
f8ffec7 @clsung add About
authored
6 About
7 ----
8 Plurk-OAuth is a wrapper for [Plurk API 2.0 beta](http://www.plurk.com/API/2)
9 You will need to [Sign Up](http://www.plurk.com/PlurkApp/register) for your own CUSTOMER TOKENs.
a38bdee @clsung rename README to README.markdown
authored
10
0c1fd3f @clsung add descrption
authored
11 API.keys
12 ----
d2632e7 @clsung fix formatting (AGAIN!!!)
authored
13 You will need to save CONSUMER_KEY/CONSUMER_SECRET in API.keys, the
14 format is JSON. The example is below:
119fd88 @clsung ...
authored
15
d2632e7 @clsung fix formatting (AGAIN!!!)
authored
16 > {"CONSUMER_SECRET": "<i>I_am_consumer_secret</i>", "ACCESS_TOKEN": "<i>your_access_token</i>", "ACCESS_TOKEN_SECRET": "<i>your_access_token_secret</i>", "CONSUMER_KEY": "<i>I_am_consumer_key</i>"}
17
968b1d5 @clsung - bump version 0.4
authored
18 Example with API.keys
19 ----
20 ``` python
21 from PlurkAPI import PlurkAPI
d2632e7 @clsung fix formatting (AGAIN!!!)
authored
22
2809059 @clsung typo, fromkeys() => fromfile()
authored
23 plurk = PlurkAPI.fromfile(<path_to_API.keys>)
968b1d5 @clsung - bump version 0.4
authored
24 print plurk.callAPI('/APP/Profile/getOwnProfile')
25 ```
0c1fd3f @clsung add descrption
authored
26
a38bdee @clsung rename README to README.markdown
authored
27 Example with ACCESS_TOKEN
28 ----
df95851 @clsung fix markdown
authored
29 ``` python
a38bdee @clsung rename README to README.markdown
authored
30 from PlurkAPI import PlurkAPI
31
32 plurk = PlurkAPI(CONSUMER_KEY, CONSUMER_SECRET)
33 plurk.authorize(ACCESS_TOKEN,ACCESS_TOKEN_SECRET)
34 print plurk.callAPI('/APP/Profile/getOwnProfile')
df95851 @clsung fix markdown
authored
35 ```
a38bdee @clsung rename README to README.markdown
authored
36
37
38 Example without ACCESS_TOKEN
39 ----
df95851 @clsung fix markdown
authored
40 ``` python
a38bdee @clsung rename README to README.markdown
authored
41 from PlurkAPI import PlurkAPI
42
43 plurk = PlurkAPI(CONSUMER_KEY, CONSUMER_SECRET)
44 plurk.authorize()
45 print plurk.callAPI('/APP/Profile/getOwnProfile')
df95851 @clsung fix markdown
authored
46 ```
47
48
49 Meta
50 ----
51
52 * Code: `git clone git://github.com/clsung/plurk-oauth.git`
53 * Home: <http://github.com/clsung/plurk-oauth>
54 * Bugs: <http://github.com/clsung/plurk-oauth/issues>
55
56 Author
57 ------
58
59 Cheng-Lung Sung :: clsung@gmail.com :: @clsung
Something went wrong with that request. Please try again.