blob: 09b3547f515cb8a18ee22dc5176857261feed20d [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
75<h1><a href="youtube_v3.html">YouTube API</a> . <a href="youtube_v3.subscriptions.html">subscriptions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(id, onBehalfOfContentOwner=None)</a></code></p>
79<p class="firstline">Deletes subscriptions by IDs.</p>
80<p class="toc_element">
81 <code><a href="#insert">insert(part, body, onBehalfOfContentOwner=None)</a></code></p>
82<p class="firstline">Insert a subscription.</p>
83<p class="toc_element">
84 <code><a href="#list">list(part, onBehalfOfContentOwner=None, id=None, pageToken=None, channelId=None, mine=None, maxResults=None, forChannelId=None, order=None)</a></code></p>
85<p class="firstline">Browses the subscriptions collection.</p>
86<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">
91 <code class="details" id="delete">delete(id, onBehalfOfContentOwner=None)</code>
92 <pre>Deletes subscriptions by IDs.
93
94Args:
95 id: string, YouTube IDs of the subscription to be deleted. (required)
96 onBehalfOfContentOwner: string, The authenticated user acts on behalf of this content owner.
97</pre>
98</div>
99
100<div class="method">
101 <code class="details" id="insert">insert(part, body, onBehalfOfContentOwner=None)</code>
102 <pre>Insert a subscription.
103
104Args:
105 part: string, One or more parts to return on the current request. (required)
106 body: object, The request body. (required)
107 The object takes the form of:
108
109{ # A subscription resource contains information about a YouTube user subscription.
110 "snippet": { # Basic details about a subscription, including title, description and thumbnails of the subscribed item. # Basic details about the subscription
111 "description": "A String", # Description of the subscription.
112 "title": "A String", # Title of the subscription.
113 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # The resource subscribed to.
114 "kind": "A String", # The kind of the referred resource.
115 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
116 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
117 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
118 },
119 "channelId": "A String", # Channel publishing the subscription.
120 "publishedAt": "A String", # Date and time the subscription was published at.
121 "thumbnails": { # Subscription thumbnails.
122 "a_key": { # A thumbnail is an image representing a YouTube resource. # A map of thumbnails by their name.
123 "url": "A String", # The URL for the thumbnail.
124 },
125 },
126 },
127 "contentDetails": { # Details about the content to witch a subscription refers. # Basic statistics about the subscription
128 "newItemCount": 42, # Number of new items in the subscription since its content was last read.
129 "totalItemCount": 42, # Approximate total number of items the subscription points to.
130 },
131 "kind": "youtube#subscription", # The type of this API resource.
132 "etag": "A String", # The eTag of the subscription.
133 "id": "A String", # The unique id of the subscription.
134 }
135
136 onBehalfOfContentOwner: string, The authenticated user acts on behalf of this content owner.
137
138Returns:
139 An object of the form:
140
141 { # A subscription resource contains information about a YouTube user subscription.
142 "snippet": { # Basic details about a subscription, including title, description and thumbnails of the subscribed item. # Basic details about the subscription
143 "description": "A String", # Description of the subscription.
144 "title": "A String", # Title of the subscription.
145 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # The resource subscribed to.
146 "kind": "A String", # The kind of the referred resource.
147 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
148 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
149 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
150 },
151 "channelId": "A String", # Channel publishing the subscription.
152 "publishedAt": "A String", # Date and time the subscription was published at.
153 "thumbnails": { # Subscription thumbnails.
154 "a_key": { # A thumbnail is an image representing a YouTube resource. # A map of thumbnails by their name.
155 "url": "A String", # The URL for the thumbnail.
156 },
157 },
158 },
159 "contentDetails": { # Details about the content to witch a subscription refers. # Basic statistics about the subscription
160 "newItemCount": 42, # Number of new items in the subscription since its content was last read.
161 "totalItemCount": 42, # Approximate total number of items the subscription points to.
162 },
163 "kind": "youtube#subscription", # The type of this API resource.
164 "etag": "A String", # The eTag of the subscription.
165 "id": "A String", # The unique id of the subscription.
166 }</pre>
167</div>
168
169<div class="method">
170 <code class="details" id="list">list(part, onBehalfOfContentOwner=None, id=None, pageToken=None, channelId=None, mine=None, maxResults=None, forChannelId=None, order=None)</code>
171 <pre>Browses the subscriptions collection.
172
173Args:
174 part: string, Subscription parts to include in the returned response. Valid values are: id, snippet and contentDetails. (required)
175 onBehalfOfContentOwner: string, The authenticated user acts on behalf of this content owner.
176 id: string, YouTube IDs of the subscriptions to be returned.
177 pageToken: string, Token for the page selection.
178 channelId: string, Only return subscriptions to given channelId.
179 mine: string, Flag indicating only return the subscriptions of the authenticated user.
180 maxResults: integer, Maximum number of search results to return per page.
181 forChannelId: string, Comma separated list of channel IDs to return subscriptions for.
182 order: string, Sort order.
183 Allowed values
184 alphabetical - Sort alphabetically
185 relevance - Sort by relevance.
186 unread - Sort by order of activity.
187
188Returns:
189 An object of the form:
190
191 { # A paginated list of subscriptions returned as the response to a youtube.subscriptions.list call.
192 "nextPageToken": "A String", # Token to the next page.
193 "kind": "youtube#subscriptionListResponse", # The type of this API response.
194 "items": [ # List of subscriptions matching the request criteria.
195 { # A subscription resource contains information about a YouTube user subscription.
196 "snippet": { # Basic details about a subscription, including title, description and thumbnails of the subscribed item. # Basic details about the subscription
197 "description": "A String", # Description of the subscription.
198 "title": "A String", # Title of the subscription.
199 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # The resource subscribed to.
200 "kind": "A String", # The kind of the referred resource.
201 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
202 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
203 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
204 },
205 "channelId": "A String", # Channel publishing the subscription.
206 "publishedAt": "A String", # Date and time the subscription was published at.
207 "thumbnails": { # Subscription thumbnails.
208 "a_key": { # A thumbnail is an image representing a YouTube resource. # A map of thumbnails by their name.
209 "url": "A String", # The URL for the thumbnail.
210 },
211 },
212 },
213 "contentDetails": { # Details about the content to witch a subscription refers. # Basic statistics about the subscription
214 "newItemCount": 42, # Number of new items in the subscription since its content was last read.
215 "totalItemCount": 42, # Approximate total number of items the subscription points to.
216 },
217 "kind": "youtube#subscription", # The type of this API resource.
218 "etag": "A String", # The eTag of the subscription.
219 "id": "A String", # The unique id of the subscription.
220 },
221 ],
222 "etag": "A String", # The eTag of the response.
223 "prevPageToken": "A String", # Token to the previous page.
224 "pageInfo": { # Paging details for lists of resources, including total number of items available and number of resources returned in a single page. # Paging information for the list result.
225 "totalResults": 42, # The total number of results.
226 "resultsPerPage": 42, # The number of results to display for each page.
227 },
228 }</pre>
229</div>
230
231<div class="method">
232 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
233 <pre>Retrieves the next page of results.
234
235Args:
236 previous_request: The request for the previous page. (required)
237 previous_response: The response from the request for the previous page. (required)
238
239Returns:
240 A request object that you can call 'execute()' on to request the next
241 page. Returns None if there are no more items in the collection.
242 </pre>
243</div>
244
245</body></html>