Python wrapper for Qiita API v1.
$ virtualenv --distribute qiita_sample $ source qiita_sample/bin/activate $ cd qiita_sample $ pip install qiita
Qiita depends on Requests.
# -*- coding: utf-8 -*- from qiita import Items client = Items() items = client.user_items('heavenshell')
# -*- coding: utf-8 -*- from qiita import Tags client = Tags() items = client.tag_items('python')
# -*- coding: utf-8 -*- from qiita import Items client = Items() item_uuid = '1234567890abcdefg' items = client.item(item_uuid)
# -*- coding: utf-8 -*- from qiita import Client client = Client(url_name='heavenshell', password='mysecret') token = client.token # => contains token # or client = Client(token='myauthtoken')
# -*- coding: utf-8 -*- from qiita import Items client = Client(token='myauthtoken') items = client.user_item()
# -*- coding: utf-8 -*- from qiita import Items client = Client(token='myauthtoken') params = { 'title': 'Hello', 'body': 'markdown text', 'tags': [{name: 'python', versions: ['2.6', '2.7']}], 'private': False } # post item = client.post_item(params) # update params['title'] = 'modified' client.update_item(item['uuid'], params) # delete client.delete_item(item['uuid'])
# -*- coding: utf-8 -*- from qiita import Items client = Items(token='myauthtoken') item_uuid = '1489e2b291fed74713b2' # Stock client.stock_item(item_uuid) # Unstock client.unstock_item(item_uuid)
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request