forked from AhnSeongHyun/daum_openapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpip_desc.txt
executable file
·40 lines (32 loc) · 973 Bytes
/
pip_desc.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Python library for Daum Open Data API.
Installation
=============
pip install daum_openapi
Features
=============
* JSON response keys to class member variables.
* Convert XML response to JSON and then keys to class member variables.
Usage
=============
**search : blog**
>>> from daum_openapi.search import search
>>> sc = search(API_KEY)
>>> result = sc.blog(u'coldplay', 10, 1, 'date', 'xml')
>>> {
>>> "channel":
>>> {
>>> "result":"10",
>>> "pageCount":"800",
>>> "title":"Search Daum Open API"
>>> "item": [
>>> {"title":"Coldplay - viva la vida", "description":"viva la vida new song"},
>>> {"title":"YELLOW", "description":"Yellow lyrics"}
>>> ]
>>>
>>> }
>>> }
>>> result.channel.result //"10"
>>> result.channel.pageCount //"800"
>>> result.channel.title //"Search Daum Open API"
>>> result.channel.item[0].title //"Coldplay - viva la vida"
>>> result.channel.item[1].description //"Yellow lyrics"