Using Firebug, you can see what will be sent if you add a Google Reader note from the browser.
URL-, , : http://www.google.co.uk/reader/api/0/item/edit.
, "T" ( 2) "", , .
, ( urllib, ):
import urllib
token = response.read()
add_note_url = "http://www.google.co.uk/reader/api/0/item/edit"
data = {'snippet' : 'This is the note', 'T' : token}
encoded_data = urllib.urlencode(data)
req = urllib2.Request(add_note_url, encoded_data)
req.add_header('Authorization', 'GoogleLogin auth=%s' % credentials['Auth'])
response = urllib2.urlopen(req)
if response.code == 200:
print 'Gadzooks!'
else:
print 'Curses and damnation'
, , . ck, linkify, share .., .
script .