()
| 27 | |
| 28 | |
| 29 | def main(): |
| 30 | |
| 31 | # Build a service object for interacting with the API. Visit |
| 32 | # the Google APIs Console <http://code.google.com/apis/console> |
| 33 | # to get an API key for your own application. |
| 34 | service = build( |
| 35 | "translate", "v2", developerKey="<YOUR DEVELOPER KEY>" |
| 36 | ) |
| 37 | print( |
| 38 | service.translations() |
| 39 | .list(source="en", target="fr", q=["flower", "car"]) |
| 40 | .execute() |
| 41 | ) |
| 42 | |
| 43 | |
| 44 | if __name__ == "__main__": |