pymagnolia
2006年05月23日(火) 00:00
Description
This python scripts helps you to use ma.gnolia's bookmark.
Implements ma.gnolia.com's API except 'echo' and 'getKey'.
Installation
Download pymagnolia-0.1.zip .
unzip pymagnolia-0.1.zip and run :
python setup.py install
Usage
>>> import pymagnolia
>>> api = pymagnolia.MagnoliaApi(YOUR_API_KEY)
>>> bms = api.bookmarks_get(id='choweve')
>>> bms[0]
{'rating': '4', 'updated': '2006-05-14T07:10:17-07:00',
'description': 'GTD Web Application. WorkStyle with python(Django)',
'screenshot': 'http://scst.srv.girafa.com/srv/i?i=sc010159&r=http://workstyle-py.sourceforge.net&s=2f22753100a2e53a',
'created': '2006-05-14T07:06:07-07:00',
'url': 'http://workstyle-py.sourceforge.net',
'title': 'WorkStyle-py', 'private': False, 'owner': 'everes', 'id': 'choweve',
'tags': ['django']}
>>> bms[0].description
'GTD Web Application. WorkStyle with python(Django)'
>>>
bookmarks_get
id=[bookmarks] (*) : The short name for one or more bookmarks.
bookmarks_find
tags=[tags] : Multiple tags are treated as an AND search
person=[members] : Multiple screen names are treated as an ‘OR’ search
group=[groups] : Multiple groups are treated as an ‘OR’ search
rating=[1-5] : Only bookmarks rated this value or higher will be returned.
date_from=['yyyy/mm/dd'] : Only bookmarks created after this date time will be returned.
date_to=['yyyy/mm/dd'] : Only bookmarks created before this date time will be returned.
url=[string] : Only return bookmarks with this url.
limit=[integer] : A maximum number of bookmarks to return from search.
bookmarks_delete
id=[bookmarks] (*) : The short name for one or more bookmarks to be deleted.
bookmark_add
title=[string] : A title string.
description=[string] : A description string.
url=[url] (*) : A URL string. Must be valid.
private=[true|false] : The bookmark’s privacy status.
tags=[tags] : A list of tags. This will completely replace any existing tags for each specified bookmark.
rating = [0 .. 5]. An integer representing a star rating.
bookmark_update
id= [bookmark] (*) : The short name for one bookmark
title=[string] : A title string.
description=[string] : A description string.
url=[url] : A URL string. Must be valid.
private=[true|false] : The bookmark’s privacy status.
tags=[tags] : A list of tags. This will completely replace any existing tags for each specified bookmark.
rating = [0 .. 5]. An integer representing a star rating.
bookmarks_tags_add
id=[bookmarks] (*) : One or more bookmark short names to which the specified tags should be added.
tags=[tags] (*) : Tags to be added to the specified bookmarks.
bookmarks_tags_delete
id=[bookmarks] : The short name for one or more bookmarks from which the specified tag or tags should be removed. If the special keyword “all” is given or not specified, this tag will be deleted from all of the member’s bookmarks.
tags=[tags] (*) : One or more tags to be removed from the specified bookmarks.
bookmarks_tags_rename
id=[bookmarks] (*) : The short name for one or more bookmarks for which the specified tag should be renamed. If the special keyword “all” is given or not specidied, this tag will be replace in all of the member’s bookmarks.
old=[tag] (*) : Existing tag to be replaced.
new=[tag] (*) : New tag to replace existing tag.
