root/lang/python/webSimple/example/flickr_echo.py @ 9135

Revision 9135, 349 bytes (checked in by mattn, 5 years ago)

lang/python/webSimple,
lang/python/webSimple/example,
lang/python/webSimple/example/flickr_echo.py,
lang/python/webSimple/webSimple.py:
added python version of 'WebService::Simple'.

Line 
1#!-*- coding:utf-8 -*-
2from webSimple import Simple
3
4api = Simple({
5    'base_url' : 'http://api.flickr.com/services/rest',
6    'param' : {
7        'api_key' : 'your-api-key'
8    },
9})
10res = api.get({
11    'method' : 'flickr.test.echo',
12    'name' : 'value',
13});
14print res.parse_xml().getElementsByTagName('name')[0].childNodes[0].data
Note: See TracBrowser for help on using the browser.