YouTube
checkYouTubeAuth
GET /v2/checkYouTubeAuth/
Check to see if Helioveiwer.org is authorized to interact with a user’s YouTube account via the current browser session.
Parameter |
Required |
Type |
Example |
Description |
---|---|---|---|---|
callback |
Optional |
string |
Wrap the response object in a function call of your choosing. |
Example: string (Boolean)
https://api.helioviewer.org/v2/checkYouTubeAuth/?
false
getYouTubeAuth
GET /v2/getYouTubeAuth/
Request authorization from the user via a Google / YouTube authorization flow to permit Helioviewer to upload videos on behalf of the user.
Parameter |
Required |
Type |
Example |
Description |
---|---|---|---|---|
id |
Required |
string |
VXvX5 |
Unique movie identifier (provided by the response to a queueMovie request). |
title |
Required |
string |
AIA 4500 (2013-12-30 16:00:07 - 2014-01-27 15:00:07 UTC) |
Movie title. |
description |
Required |
string |
This movie was produced by Helioviewer.org. See the original at http://helioviewer.org/?movieId=z6vX5 or download a high-quality version from http://api.helioviewer.org/v2/downloadMovie/?id=z6vX5&format=mp4&hq=true |
Move description. |
tags |
Required |
string |
SDO,AIA,4500 |
Movie keyword tags (comma separated). |
share |
Optional |
boolean |
true |
Optionally share the movie with the Helioviewer community. |
Example: string (HTTP Header redirect)
Redirect user to YouTube authorization page.
https://api.helioviewer.org/v2/getYouTubeAuth/?id=VXvX5&title=AIA%204500%20(2013-12-30%2016%3A00%3A07%20-%202014-01-27%2015%3A00%3A07%20UTC)&description=This%20movie%20was%20produced%20by%20Helioviewer.org.%20See%20the%20original%20at%20http%3A%2F%2Fhelioviewer.org%2F%3FmovieId%3Dz6vX5%20or%20download%20a%20high-quality%20version%20from%20http%3A%2F%2Fhelioviewer.org%2Fapi%2F%3Faction%3DdownloadMovie%26id%3Dz6vX5%26format%3Dmp4%26hq%3Dtrue&tags=SDO%2CAIA%2C4500&share=true
Location: https://www.google.com/accounts/AuthSubRequest?next=http%3A%2F%2Fhelioviewer.org%2Fapi%2Findex.php%3Faction%3DuploadMovieToYouTube%26id%3DVXvX5%26html%3Dtrue&scope=http://gdata.youtube.com&secure=&session=1
uploadMovieToYouTube
GET /v2/uploadMovieToYouTube/
Share an existing user-generated movie to YouTube.
Parameter |
Required |
Type |
Example |
Description |
---|---|---|---|---|
id |
Required |
string |
y9tX5 |
Unique movie identifier (provided by the response to a queueMovie request). |
title |
Optional |
string |
AIA 94 (2014-02-26 16:14:25 - 2014-02-27 15:37:49 UTC) |
Movie title. |
description |
Optional |
string |
This movie was produced by Helioviewer.org. See the original at http://helioviewer.org/?movieId=y9tX5 or download a high-quality version from http://api.helioviewer.org/downloadMovie/?id=y9tX5&format=mp4&hq=true |
Move description. |
tags |
Optional |
string |
SDO,AIA,94 |
Movie keyword tags (comma separated). |
share |
Optional |
boolean |
true |
Optionally share the movie with the Helioviewer community. |
html |
Optional |
boolean |
false |
Optionally output response as HTML instead of JSON. |
Example: YouTube Upload Status
JSON response to “uploadMovieToYouTube” API requests.
https://api.helioviewer.org/v2/uploadMovieToYouTube/?title=AIA+94+(2014-02-26+16%3A14%3A25+-+2014-02-27+15%3A37%3A49+UTC)&description=This+movie+was+produced+by+Helioviewer.org.+See+the+original+at+http%3A%2F%2Fhelioviewer.org%2F%3FmovieId%3Dy9tX5+or+download+a+high-quality+version+from+http%3A%2F%2Fhelioviewer.org%2Fapi%2F%3Faction%3DdownloadMovie%26id%3Dy9tX5%26format%3Dmp4%26hq%3Dtrue&tags=SDO%2CAIA%2C94&share=true&id=y9tX5
{
"status": "upload in progress."
}
Parameter |
Required |
Type |
Description |
---|---|---|---|
status |
Required |
string |
YouTube upload status |
getUserVideos
GET /v2/getUserVideos/
Get a listing (in descending time order) of the most recently user-generated movies that have been publicly shared to YouTube. Result set is limited to the value requested or default value of the num parameter (unless truncated when the date value of the since parameter is reached).
Parameter |
Required |
Type |
Example |
Description |
---|---|---|---|---|
num |
Optional |
number |
10 |
Number of shared user-generated movies to include in the response. Default is 10. |
since |
Optional |
string |
Optionally truncate result set if this date/time is reached. ISO 8601 combined UTC date and time UTC format. |
|
force |
Optional |
boolean |
false |
Optionally bypass cache to retrieve most up-to-date data. |
callback |
Optional |
string |
Wrap the response object in a function call of your choosing. |
Example: string (JSON)
https://api.helioviewer.org/v2/getUserVideos/?num=2
[
{
"id": "J5tX5",
"url": "http://www.youtube.com/watch?v=x2VYjI1Eo3M",
"thumbnails": {
"icon": "http://api.helioviewer.org/cache/movies/2014/02/27/J5tX5/preview-icon.png",
"small": "http://api.helioviewer.org/cache/movies/2014/02/27/J5tX5/preview-small.png",
"medium": "http://api.helioviewer.org/cache/movies/2014/02/27/J5tX5/preview-medium.png",
"large": "http://api.helioviewer.org/cache/movies/2014/02/27/J5tX5/preview-large.png",
"full": "http://api.helioviewer.org/cache/movies/2014/02/27/J5tX5/preview-full.png"
},
"published": "2014-02-27 14:56:00"
},
{
"id": "L5tX5",
"url": "http://www.youtube.com/watch?v=h6Y6vhpKPRk",
"thumbnails": {
"icon": "http://api.helioviewer.org/cache/movies/2014/02/27/L5tX5/preview-icon.png",
"small": "http://api.helioviewer.org/cache/movies/2014/02/27/L5tX5/preview-small.png",
"medium": "http://api.helioviewer.org/cache/movies/2014/02/27/L5tX5/preview-medium.png",
"large": "http://api.helioviewer.org/cache/movies/2014/02/27/L5tX5/preview-large.png",
"full": "http://api.helioviewer.org/cache/movies/2014/02/27/L5tX5/preview-full.png"
},
"published": "2014-02-27 14:54:08"
}
]