blob: 876871298ab3fb744565b0cdfe514afec5b8e345 [file] [log] [blame]
// Copyright 2018 Google LLC. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
const (
apiKey = "some-api-key"
cx = "some-custom-search-engine-id"
query = "some-custom-query"
)
// TODO(codyoss): uncomment and refactor after generation.
func customSearchMain() {
// client := &http.Client{Transport: &transport.APIKey{Key: apiKey}}
//
// svc, err := customsearch.New(client)
// if err != nil {
// log.Fatal(err)
// }
//
// resp, err := svc.Cse.Siterestrict.List(query).Cx(cx).Do()
// if err != nil {
// log.Fatal(err)
// }
//
// for i, result := range resp.Items {
// fmt.Printf("#%d: %s\n", i+1, result.Title)
// fmt.Printf("\t%s\n", result.Snippet)
// }
}