Skip to content

Commit

Permalink
Update README to list code samples in directory
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyDiamondstein authored Nov 18, 2016
1 parent 4277f82 commit 14f3a10
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions go/README
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ Example usage:

go run search_key_keyword.go

The Freebase API and YouTube Data APIs must be enabled for the project associated with this
key.
The YouTube Data API must be enabled for the project associated with this key.

To run any sample that requires authorization on behalf of a user, such as checking
for uploads, this requires the shared oauth.go file to be passed as a parameter to "go run".
Expand All @@ -34,3 +33,37 @@ oauth.go contains code that is shared between the code samples that require OAut
authorization, so it must be passed as a parameter to "go run".

More information about the YouTube APIs can be found at https://developer.google.com/youtube.

Samples in this directory:

### Authorize a request

Description: This code sample performs OAuth 2.0 authorization by checking for the presence of a local file that
contains authorization credentials. If the file is not present, the script opens a browser and waits for a response,
then saves the returned credentials locally.

### Upload a video

Method: youtube.videos.insert
Description: This code sample calls the API's <code>videos.insert</code> method to upload a video to the channel
associated with the request.

### Retrieve my uploads

Method: youtube.playlistItems.list
Description: This code sample calls the API's <code>playlistItems.list</code> method to retrieve a list of
videos uploaded to the channel associated with the request. The code also calls the <code>channels.list</code>
method with the <code>mine</code> parameter set to <code>true</code> to retrieve the playlist ID that identifies
the channel's uploaded videos.

### Search by keyword

Method: youtube.search.list
Description: This code sample calls the API's <code>search.list</code> method to retrieve search results associated
with a particular keyword.

### Post a channel bulletin

Method: youtube.activities.insert
Description: This code sample calls the API's <code>activities.insert</code> method to post a bulletin to the
channel associated with the request.

0 comments on commit 14f3a10

Please sign in to comment.