Skip to content

AhnSeongHyun/daum_openapi

Repository files navigation

daum_openapi


[![Build Status](https://travis-ci.org/AhnSeongHyun/daum_openapi.png)](https://travis-ci.org/AhnSeongHyun/daum_openapi)

Python library for Daum Open Data API.

Install

``` pip install daum_openapi ```

Features

- JSON response keys to class member variables. - Convert XML response to JSON and then keys to class member variables.
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"

Provided data api category:

- contents - movie - search - blog - cafe - board - web - knowledge - image - vclip - book - socialpick - search - shopping - search - detail - local - addr to coord - coord to addr - trans coord

License

Released under the MIT license.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

daum_openapi for python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published