Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
czervenka committed Jul 5, 2013
1 parent f614d41 commit 44af774
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ Google's python library for this task.
Quick example
--
from gapi import Api
api = Api(['calendar', 'tasks'], '983417309817307013970412734012734289@accounts.google.com', 'keys/key.pem', 'admin@example.com')
api = Api(
['calendar', 'tasks'], # the apis to use
'983417309817307013970412734012734289@accounts.google.com', # API project service client email
'keys/key.pem', # API project service key
'admin@example.com', # impersonate as user
)

# list all events
response = api.calendar.events.list()
Expand All @@ -48,6 +53,15 @@ Quick example
# to impersonate to a different user
api.impersonate(user_email)

# batch call
def process_results(result, request):
print 'Got results %r' % result

for n in xrange(10):
api.calendar.events.list(_callback=process_results)

api.calendar.fetch_batch()

# read Google documentation and use IPython to explore all apis


Expand Down

0 comments on commit 44af774

Please sign in to comment.