blob: cf0e4e7e0635e86926cd7138162d119cfdcee37d [file] [log] [blame]
Joe Gregorio618e63b2010-11-04 19:55:28 -04001#!/usr/bin/python2.4
2# -*- coding: utf-8 -*-
3#
4# Copyright 2010 Google Inc. All Rights Reserved.
5
6"""Simple command-line example for Translate.
7
8Command-line application that translates
9some text.
10"""
11
12__author__ = 'jcgregorio@google.com (Joe Gregorio)'
13
14from apiclient.discovery import build
15
16import pprint
17
18# Uncomment the next line to get very detailed logging
19# httplib2.debuglevel = 4
20
21def main():
22
23 p = build("translate", "v2", developerKey="AIzaSyDRRpR3GS1F1_jKNNM9HCNd2wJQyPG3oN0")
24 print p.translations().list(
25 source="en",
26 target="fr",
27 q="flower"
28 ).execute()
29
30if __name__ == '__main__':
31 main()