Joe Gregorio | afc45f2 | 2011-02-20 16:11:28 -0500 | [diff] [blame] | 1 | |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 3 | <html><head><title>Python: class Resource</title> |
| 4 | </head><body bgcolor="#f0f0f8"> |
| 5 | <p> |
| 6 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 7 | <tr bgcolor="#ffc8d8"> |
| 8 | <td colspan=3 valign=bottom> <br> |
| 9 | <font color="#000000" face="helvetica, arial"><a name="Resource">class <strong>Resource</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| 10 | |
| 11 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 12 | <td colspan=2><tt>A class for interacting with a resource.<br> </tt></td></tr> |
| 13 | <tr><td> </td> |
| 14 | <td width="100%">Methods defined here:<br> |
| 15 | <dl><dt><a name="Resource-__init__"><strong>__init__</strong></a>(self)</dt></dl> |
| 16 | |
Joe Gregorio | ad258e2 | 2011-02-22 22:53:30 -0500 | [diff] [blame] | 17 | <dl><dt><a name="Resource-list"><strong>list</strong></a> = method(self, **kwargs)</dt><dd><tt>Returns text translations from one language to another.<br> |
Joe Gregorio | afc45f2 | 2011-02-20 16:11:28 -0500 | [diff] [blame] | 18 | <br> |
| 19 | Args:<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 20 | q: string, The text to translate (required) (repeated)<br> |
| 21 | pp: string, A parameter<br> |
Joe Gregorio | ad258e2 | 2011-02-22 22:53:30 -0500 | [diff] [blame] | 22 | target: string, The target language into which the text should be translated (required)<br> |
| 23 | format: string, The format of the text<br> |
| 24 | Allowed values<br> |
| 25 | html - Specifies the input is in HTML<br> |
Joe Gregorio | 20a5aa9 | 2011-04-01 17:44:25 -0400 | [diff] [blame] | 26 | text - Specifies the input is in plain textual format<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 27 | cid: string, The customization id for translate (repeated)<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 28 | source: string, The source language of the text<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 29 | userip: string, A parameter<br> |
| 30 | trace: string, A parameter<br> |
| 31 | strict: string, A parameter<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 32 | <br> |
| 33 | Returns:<br> |
| 34 | An object of the form<br> |
| 35 | <br> |
| 36 | {<br> |
| 37 | "translations": [ # Translations contains list of translation results of given text<br> |
| 38 | {<br> |
| 39 | "detectedSourceLanguage": "A String", # Detected source language if source parameter is unspecified.<br> |
| 40 | "translatedText": "A String", # The translation.<br> |
| 41 | },<br> |
| 42 | ],<br> |
| 43 | }</tt></dd></dl> |
Joe Gregorio | afc45f2 | 2011-02-20 16:11:28 -0500 | [diff] [blame] | 44 | |
| 45 | <hr> |
| 46 | Data descriptors defined here:<br> |
| 47 | <dl><dt><strong>__dict__</strong></dt> |
| 48 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 49 | </dl> |
| 50 | <dl><dt><strong>__weakref__</strong></dt> |
| 51 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 52 | </dl> |
| 53 | </td></tr></table> |
| 54 | </body></html> |