Joe Gregorio | 2379ecc | 2010-10-26 10:51:28 -0400 | [diff] [blame] | 1 | #!/usr/bin/python2.4 |
| 2 | # -*- coding: utf-8 -*- |
| 3 | # |
| 4 | # Copyright 2010 Google Inc. All Rights Reserved. |
| 5 | |
| 6 | """Simple command-line example for running against a |
| 7 | local server. |
| 8 | |
| 9 | """ |
| 10 | |
| 11 | __author__ = 'jcgregorio@google.com (Joe Gregorio)' |
| 12 | |
| 13 | # Enable this sample to be run from the top-level directory |
| 14 | import os |
| 15 | import sys |
| 16 | sys.path.insert(0, os.getcwd()) |
| 17 | |
| 18 | from apiclient.discovery import build |
| 19 | |
| 20 | import httplib2 |
| 21 | # httplib2.debuglevel = 4 |
| 22 | import pickle |
| 23 | import pprint |
| 24 | |
Joe Gregorio | af276d2 | 2010-12-09 14:26:58 -0500 | [diff] [blame^] | 25 | DISCOVERY_URI = ('http://localhost:3990/discovery/v0.2beta1/describe/' |
Joe Gregorio | 2379ecc | 2010-10-26 10:51:28 -0400 | [diff] [blame] | 26 | '{api}/{apiVersion}') |
| 27 | |
Joe Gregorio | af276d2 | 2010-12-09 14:26:58 -0500 | [diff] [blame^] | 28 | |
Joe Gregorio | 2379ecc | 2010-10-26 10:51:28 -0400 | [diff] [blame] | 29 | def main(): |
| 30 | http = httplib2.Http() |
| 31 | |
| 32 | p = build("buzz", "v1", http=http, discoveryServiceUrl=DISCOVERY_URI) |
| 33 | help(p.activities().list) |
| 34 | print p.activities().list(userId='@self', scope='@me', c='foo').uri |
| 35 | |
| 36 | if __name__ == '__main__': |
| 37 | main() |