Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 1 | |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 3 | <html><head><title>Python: module apiclient.discovery</title> |
| 4 | </head><body bgcolor="#f0f0f8"> |
| 5 | |
| 6 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> |
| 7 | <tr bgcolor="#7799ee"> |
| 8 | <td valign=bottom> <br> |
| 9 | <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="apiclient.html"><font color="#ffffff">apiclient</font></a>.discovery</strong></big></big></font></td |
| 10 | ><td align=right valign=bottom |
Joe Gregorio | a845167 | 2011-09-15 09:53:21 -0400 | [diff] [blame^] | 11 | ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/google/home/jcgregorio/projects/apiclient/apiclient/discovery.py">/usr/local/google/home/jcgregorio/projects/apiclient/apiclient/discovery.py</a></font></td></tr></table> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 12 | <p><tt>Client for discovery based APIs<br> |
| 13 | <br> |
Joe Gregorio | 3b79fa8 | 2011-02-17 11:47:17 -0500 | [diff] [blame] | 14 | A client library for Google's discovery based APIs.</tt></p> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 15 | <p> |
| 16 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 17 | <tr bgcolor="#aa55cc"> |
| 18 | <td colspan=3 valign=bottom> <br> |
| 19 | <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> |
| 20 | |
| 21 | <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> |
Joe Gregorio | 0250385 | 2011-08-31 09:07:55 -0400 | [diff] [blame] | 22 | <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="copy.html">copy</a><br> |
| 23 | <a href="httplib2.html">httplib2</a><br> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 24 | <a href="logging.html">logging</a><br> |
Joe Gregorio | 0250385 | 2011-08-31 09:07:55 -0400 | [diff] [blame] | 25 | </td><td width="25%" valign=top><a href="apiclient.mimeparse.html">apiclient.mimeparse</a><br> |
| 26 | <a href="mimetypes.html">mimetypes</a><br> |
Joe Gregorio | b9e63ff | 2011-06-30 12:38:10 -0400 | [diff] [blame] | 27 | <a href="os.html">os</a><br> |
Joe Gregorio | 0250385 | 2011-08-31 09:07:55 -0400 | [diff] [blame] | 28 | </td><td width="25%" valign=top><a href="re.html">re</a><br> |
| 29 | <a href="simplejson.html">simplejson</a><br> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 30 | <a href="uritemplate.html">uritemplate</a><br> |
Joe Gregorio | 0250385 | 2011-08-31 09:07:55 -0400 | [diff] [blame] | 31 | </td><td width="25%" valign=top><a href="urllib.html">urllib</a><br> |
| 32 | <a href="urlparse.html">urlparse</a><br> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 33 | </td></tr></table></td></tr></table><p> |
| 34 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 35 | <tr bgcolor="#eeaa77"> |
| 36 | <td colspan=3 valign=bottom> <br> |
| 37 | <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> |
| 38 | |
| 39 | <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> |
Joe Gregorio | 351b149 | 2011-05-08 23:32:46 -0700 | [diff] [blame] | 40 | <td width="100%"><dl><dt><a name="-build"><strong>build</strong></a>(serviceName, version, http<font color="#909090">=None</font>, discoveryServiceUrl<font color="#909090">='https://www.googleapis.com/discovery/v1/apis/{api}/{apiVersion}/rest'</font>, developerKey<font color="#909090">=None</font>, model<font color="#909090">=None</font>, requestBuilder<font color="#909090">=<class 'apiclient.http.HttpRequest'></font>)</dt><dd><tt>Construct a Resource for interacting with an API.<br> |
Joe Gregorio | abda96f | 2011-02-11 20:19:33 -0500 | [diff] [blame] | 41 | <br> |
| 42 | Construct a Resource object for interacting with<br> |
| 43 | an API. The serviceName and version are the<br> |
| 44 | names from the Discovery service.<br> |
| 45 | <br> |
| 46 | Args:<br> |
| 47 | serviceName: string, name of the service<br> |
| 48 | version: string, the version of the service<br> |
| 49 | discoveryServiceUrl: string, a URI Template that points to<br> |
| 50 | the location of the discovery service. It should have two<br> |
| 51 | parameters {api} and {apiVersion} that when filled in<br> |
| 52 | produce an absolute URI to the discovery document for<br> |
| 53 | that service.<br> |
Joe Gregorio | 3b79fa8 | 2011-02-17 11:47:17 -0500 | [diff] [blame] | 54 | developerKey: string, key obtained<br> |
| 55 | from https://code.google.com/apis/console<br> |
Joe Gregorio | abda96f | 2011-02-11 20:19:33 -0500 | [diff] [blame] | 56 | model: apiclient.Model, converts to and from the wire format<br> |
Joe Gregorio | 3b79fa8 | 2011-02-17 11:47:17 -0500 | [diff] [blame] | 57 | requestBuilder: apiclient.http.HttpRequest, encapsulator for<br> |
| 58 | an HTTP request<br> |
Joe Gregorio | abda96f | 2011-02-11 20:19:33 -0500 | [diff] [blame] | 59 | <br> |
| 60 | Returns:<br> |
| 61 | A Resource object with methods for interacting with<br> |
| 62 | the service.</tt></dd></dl> |
Joe Gregorio | ad258e2 | 2011-02-22 22:53:30 -0500 | [diff] [blame] | 63 | <dl><dt><a name="-build_from_document"><strong>build_from_document</strong></a>(service, base, future<font color="#909090">=None</font>, http<font color="#909090">=None</font>, developerKey<font color="#909090">=None</font>, model<font color="#909090">=None</font>, requestBuilder<font color="#909090">=<class 'apiclient.http.HttpRequest'></font>)</dt><dd><tt>Create a Resource for interacting with an API.<br> |
Joe Gregorio | abda96f | 2011-02-11 20:19:33 -0500 | [diff] [blame] | 64 | <br> |
| 65 | Same as `<a href="#-build">build</a>()`, but constructs the Resource object<br> |
| 66 | from a discovery document that is it given, as opposed to<br> |
| 67 | retrieving one over HTTP.<br> |
| 68 | <br> |
| 69 | Args:<br> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 70 | service: string, discovery document<br> |
| 71 | base: string, base URI for all HTTP requests, usually the discovery URI<br> |
| 72 | future: string, discovery document with future capabilities<br> |
| 73 | auth_discovery: dict, information about the authentication the API supports<br> |
| 74 | http: httplib2.Http, An instance of httplib2.Http or something that acts<br> |
| 75 | like it that HTTP requests will be made through.<br> |
| 76 | developerKey: string, Key for controlling API usage, generated<br> |
| 77 | from the API Console.<br> |
| 78 | model: Model class instance that serializes and<br> |
| 79 | de-serializes requests and responses.<br> |
Joe Gregorio | abda96f | 2011-02-11 20:19:33 -0500 | [diff] [blame] | 80 | requestBuilder: Takes an http request and packages it up to be executed.<br> |
| 81 | <br> |
| 82 | Returns:<br> |
| 83 | A Resource object with methods for interacting with<br> |
| 84 | the service.</tt></dd></dl> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 85 | </td></tr></table><p> |
| 86 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 87 | <tr bgcolor="#55aa55"> |
| 88 | <td colspan=3 valign=bottom> <br> |
| 89 | <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> |
| 90 | |
| 91 | <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> |
Joe Gregorio | abda96f | 2011-02-11 20:19:33 -0500 | [diff] [blame] | 92 | <td width="100%"><strong>__all__</strong> = ['build', 'build_from_document']<br> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 93 | <strong>__author__</strong> = 'jcgregorio@google.com (Joe Gregorio)'</td></tr></table><p> |
| 94 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 95 | <tr bgcolor="#7799ee"> |
| 96 | <td colspan=3 valign=bottom> <br> |
| 97 | <font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr> |
| 98 | |
| 99 | <tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td> |
| 100 | <td width="100%">jcgregorio@google.com (Joe Gregorio)</td></tr></table> |
| 101 | </body></html> |