blob: 25c9a84e4de3ff3f78f517e3d257210bbf8e5175 [file] [log] [blame]
Joe Gregorio5e4aa152010-11-04 20:04:40 -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 Custom Search.
7
8Command-line application that does a search.
9"""
10
11__author__ = 'jcgregorio@google.com (Joe Gregorio)'
12
13from apiclient.discovery import build
14
15import pprint
16
17# Uncomment the next line to get very detailed logging
18# httplib2.debuglevel = 4
19
Joe Gregorio5e4aa152010-11-04 20:04:40 -040020
Joe Gregorioaf276d22010-12-09 14:26:58 -050021def main():
Joe Gregorio1ae3e742011-02-25 15:17:14 -050022 service = build("customsearch", "v1",
Joe Gregorioaf276d22010-12-09 14:26:58 -050023 developerKey="AIzaSyDRRpR3GS1F1_jKNNM9HCNd2wJQyPG3oN0")
Joe Gregorio1ae3e742011-02-25 15:17:14 -050024 res = service.cse().list(
Joe Gregorio5e4aa152010-11-04 20:04:40 -040025 q='lectures',
26 cx='017576662512468239146:omuauf_lfve',
27 ).execute()
28 pprint.pprint(res)
29
30if __name__ == '__main__':
31 main()