Created
January 8, 2015 01:47
-
-
Save adamgins/5f6f4c2ac4a6bbc67425 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Vimeo = Meteor.npmRequire('vimeo-api').Vimeo; | |
| var lib = new Vimeo("XXXXXXX", "YYYYYY", "ZZZZZ"); | |
| /*var scopes = ["public","private","purchased","create","edit","delete","interact","upload"]; | |
| var state = Random.id(); | |
| var redirect_uri = "http://localhost:3000/_oauth/vimeo" | |
| var url = lib.buildAuthorizationEndpoint(redirect_uri, scopes, state); | |
| console.log("vimeo url",url);*/ | |
| lib.streamingUpload('/Users/adamginsburg/Movies/IMG_1334.MOV', function (error, body, status_code, headers) { | |
| if (error) { | |
| throw new Meteor.Error("Vimeo Upload Error", error); | |
| } | |
| lib.request(headers.location, function (error, body, status_code, headers) { | |
| console.log(body); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment