blob: 7f5948ee529181eb93733720dadb442a5047a206 [file] [log] [blame]
Joe Gregoriod67010d2012-11-05 08:57:06 -05001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Joe Gregorio52a5c532013-01-24 16:19:07 -050075<h1><a href="youtube_v3.html">YouTube Data API</a> . <a href="youtube_v3.subscriptions.html">subscriptions</a></h1>
Joe Gregoriod67010d2012-11-05 08:57:06 -050076<h2>Instance Methods</h2>
77<p class="toc_element">
Joe Gregorio52a5c532013-01-24 16:19:07 -050078 <code><a href="#delete">delete(id)</a></code></p>
79<p class="firstline">Deletes a subscription.</p>
Joe Gregoriod67010d2012-11-05 08:57:06 -050080<p class="toc_element">
Joe Gregorio52a5c532013-01-24 16:19:07 -050081 <code><a href="#insert">insert(part=None, body)</a></code></p>
82<p class="firstline">Adds a subscription for the authenticated user's channel.</p>
Joe Gregoriod67010d2012-11-05 08:57:06 -050083<p class="toc_element">
Joe Gregorio52a5c532013-01-24 16:19:07 -050084 <code><a href="#list">list(part=None, pageToken=None, channelId=None, mine=None, maxResults=None, forChannelId=None, order=None, id=None)</a></code></p>
85<p class="firstline">Returns subscription resources that match the API request criteria.</p>
Joe Gregoriod67010d2012-11-05 08:57:06 -050086<p class="toc_element">
87 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<h3>Method Details</h3>
90<div class="method">
Joe Gregorio52a5c532013-01-24 16:19:07 -050091 <code class="details" id="delete">delete(id)</code>
92 <pre>Deletes a subscription.
Joe Gregoriod67010d2012-11-05 08:57:06 -050093
94Args:
Joe Gregorio52a5c532013-01-24 16:19:07 -050095 id: string, The id parameter specifies the YouTube subscription ID for the resource that is being deleted. In a subscription resource, the id property specifies the YouTube subscription ID. (required)
Joe Gregoriod67010d2012-11-05 08:57:06 -050096</pre>
97</div>
98
99<div class="method">
Joe Gregorio52a5c532013-01-24 16:19:07 -0500100 <code class="details" id="insert">insert(part=None, body)</code>
101 <pre>Adds a subscription for the authenticated user's channel.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500102
103Args:
Joe Gregorio52a5c532013-01-24 16:19:07 -0500104 part: string, The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.
105
106The part names that you can include in the parameter value are snippet and contentDetails. (required)
Joe Gregoriod67010d2012-11-05 08:57:06 -0500107 body: object, The request body. (required)
108 The object takes the form of:
109
Joe Gregorio52a5c532013-01-24 16:19:07 -0500110{ # A subscription resource contains information about a YouTube user subscription. A subscription notifies a user when new videos are added to a channel or when another user takes one of several actions on YouTube, such as uploading a video, rating a video, or commenting on a video.
111 "snippet": { # Basic details about a subscription, including title, description and thumbnails of the subscribed item. # The snippet object contains basic details about the subscription, including its title and the channel that the user subscribed to.
112 "description": "A String", # The subscription's details.
113 "title": "A String", # The subscription's title.
114 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # The id object contains information about the channel that the user subscribed to.
115 "kind": "A String", # The kind, or type, of the referred resource.
116 "channelId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if that resource is a channel. This property is only present if the resourceId.kind value is youtube#channel.
117 "playlistId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if that resource is a playlist. This property is only present if the resourceId.kind value is youtube#playlist.
118 "videoId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if that resource is a video. This property is only present if the resourceId.kind value is youtube#video.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500119 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500120 "channelId": "A String", # The ID that YouTube uses to uniquely identify the subscriber's channel.
121 "publishedAt": "A String", # The date and time that the subscription was created. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
122 "thumbnails": { # A map of thumbnail images associated with the subscription. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail.
123 "a_key": { # The thumbnail image's name.
124 "url": "A String", # The thumbnail image's URL.
125 "width": 42,
126 "height": 42,
Joe Gregoriod67010d2012-11-05 08:57:06 -0500127 },
128 },
129 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500130 "contentDetails": { # Details about the content to witch a subscription refers. # The contentDetails object contains basic statistics about the subscription.
131 "newItemCount": 42, # The number of new items in the subscription since its content was last read.
132 "totalItemCount": 42, # The approximate number of items that the subscription points to.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500133 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500134 "kind": "youtube#subscription", # The type of the API resource. For subscription resources, the value will be youtube#subscription.
135 "etag": "A String", # The ETag of the subscription resource.
136 "id": "A String", # The ID that YouTube uses to uniquely identify the subscription.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500137 }
138
Joe Gregoriod67010d2012-11-05 08:57:06 -0500139
140Returns:
141 An object of the form:
142
Joe Gregorio52a5c532013-01-24 16:19:07 -0500143 { # A subscription resource contains information about a YouTube user subscription. A subscription notifies a user when new videos are added to a channel or when another user takes one of several actions on YouTube, such as uploading a video, rating a video, or commenting on a video.
144 "snippet": { # Basic details about a subscription, including title, description and thumbnails of the subscribed item. # The snippet object contains basic details about the subscription, including its title and the channel that the user subscribed to.
145 "description": "A String", # The subscription's details.
146 "title": "A String", # The subscription's title.
147 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # The id object contains information about the channel that the user subscribed to.
148 "kind": "A String", # The kind, or type, of the referred resource.
149 "channelId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if that resource is a channel. This property is only present if the resourceId.kind value is youtube#channel.
150 "playlistId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if that resource is a playlist. This property is only present if the resourceId.kind value is youtube#playlist.
151 "videoId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if that resource is a video. This property is only present if the resourceId.kind value is youtube#video.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500152 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500153 "channelId": "A String", # The ID that YouTube uses to uniquely identify the subscriber's channel.
154 "publishedAt": "A String", # The date and time that the subscription was created. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
155 "thumbnails": { # A map of thumbnail images associated with the subscription. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail.
156 "a_key": { # The thumbnail image's name.
157 "url": "A String", # The thumbnail image's URL.
158 "width": 42,
159 "height": 42,
Joe Gregoriod67010d2012-11-05 08:57:06 -0500160 },
161 },
162 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500163 "contentDetails": { # Details about the content to witch a subscription refers. # The contentDetails object contains basic statistics about the subscription.
164 "newItemCount": 42, # The number of new items in the subscription since its content was last read.
165 "totalItemCount": 42, # The approximate number of items that the subscription points to.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500166 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500167 "kind": "youtube#subscription", # The type of the API resource. For subscription resources, the value will be youtube#subscription.
168 "etag": "A String", # The ETag of the subscription resource.
169 "id": "A String", # The ID that YouTube uses to uniquely identify the subscription.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500170 }</pre>
171</div>
172
173<div class="method">
Joe Gregorio52a5c532013-01-24 16:19:07 -0500174 <code class="details" id="list">list(part=None, pageToken=None, channelId=None, mine=None, maxResults=None, forChannelId=None, order=None, id=None)</code>
175 <pre>Returns subscription resources that match the API request criteria.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500176
177Args:
Joe Gregorio52a5c532013-01-24 16:19:07 -0500178 part: string, The part parameter specifies a comma-separated list of one or more subscription resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails.
179
180If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a subscription resource, the snippet property contains other properties, such as a display title for the subscription. If you set part=snippet, the API response will also contain all of those nested properties. (required)
181 pageToken: string, USE_DESCRIPTION --- channels:list:pageToken
182 channelId: string, The channelId parameter specifies a YouTube channel ID. The API will only return that channel's subscriptions.
183 mine: boolean, Set this parameter's value to true to retrieve a feed of the authenticated user's subscriptions.
184 maxResults: integer, USE_DESCRIPTION --- channels:list:maxResults
185 forChannelId: string, The forChannelId parameter specifies a comma-separated list of channel IDs. The API response will then only contain subscriptions matching those channels.
186 order: string, The order parameter specifies the method that will be used to sort resources in the API response.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500187 Allowed values
Joe Gregorio52a5c532013-01-24 16:19:07 -0500188 alphabetical - Sort alphabetically.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500189 relevance - Sort by relevance.
190 unread - Sort by order of activity.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500191 id: string, The id parameter specifies a comma-separated list of the YouTube subscription ID(s) for the resource(s) that are being retrieved. In a subscription resource, the id property specifies the YouTube subscription ID.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500192
193Returns:
194 An object of the form:
195
196 { # A paginated list of subscriptions returned as the response to a youtube.subscriptions.list call.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500197 "nextPageToken": "A String", # The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.
198 "kind": "youtube#subscriptionListResponse", # The type of the API response. For this operation, the value will be youtube#subscriptionListResponse.
199 "items": [ # A list of subscriptions that match the request criteria.
200 { # A subscription resource contains information about a YouTube user subscription. A subscription notifies a user when new videos are added to a channel or when another user takes one of several actions on YouTube, such as uploading a video, rating a video, or commenting on a video.
201 "snippet": { # Basic details about a subscription, including title, description and thumbnails of the subscribed item. # The snippet object contains basic details about the subscription, including its title and the channel that the user subscribed to.
202 "description": "A String", # The subscription's details.
203 "title": "A String", # The subscription's title.
204 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # The id object contains information about the channel that the user subscribed to.
205 "kind": "A String", # The kind, or type, of the referred resource.
206 "channelId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if that resource is a channel. This property is only present if the resourceId.kind value is youtube#channel.
207 "playlistId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if that resource is a playlist. This property is only present if the resourceId.kind value is youtube#playlist.
208 "videoId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if that resource is a video. This property is only present if the resourceId.kind value is youtube#video.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500209 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500210 "channelId": "A String", # The ID that YouTube uses to uniquely identify the subscriber's channel.
211 "publishedAt": "A String", # The date and time that the subscription was created. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
212 "thumbnails": { # A map of thumbnail images associated with the subscription. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail.
213 "a_key": { # The thumbnail image's name.
214 "url": "A String", # The thumbnail image's URL.
215 "width": 42,
216 "height": 42,
Joe Gregoriod67010d2012-11-05 08:57:06 -0500217 },
218 },
219 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500220 "contentDetails": { # Details about the content to witch a subscription refers. # The contentDetails object contains basic statistics about the subscription.
221 "newItemCount": 42, # The number of new items in the subscription since its content was last read.
222 "totalItemCount": 42, # The approximate number of items that the subscription points to.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500223 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500224 "kind": "youtube#subscription", # The type of the API resource. For subscription resources, the value will be youtube#subscription.
225 "etag": "A String", # The ETag of the subscription resource.
226 "id": "A String", # The ID that YouTube uses to uniquely identify the subscription.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500227 },
228 ],
Joe Gregorio52a5c532013-01-24 16:19:07 -0500229 "etag": "A String", # The ETag of the response.
230 "prevPageToken": "A String", # The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set.
231 "pageInfo": { # Paging details for lists of resources, including total number of items available and number of resources returned in a single page. # The pageInfo object encapsulates paging information for the result set.
232 "totalResults": 42, # The total number of results in the result set.
233 "resultsPerPage": 42, # The number of results included in the API response.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500234 },
235 }</pre>
236</div>
237
238<div class="method">
239 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
240 <pre>Retrieves the next page of results.
241
242Args:
243 previous_request: The request for the previous page. (required)
244 previous_response: The response from the request for the previous page. (required)
245
246Returns:
247 A request object that you can call 'execute()' on to request the next
248 page. Returns None if there are no more items in the collection.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500249 </pre>
Joe Gregoriod67010d2012-11-05 08:57:06 -0500250</div>
251
252</body></html>