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