Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Based on "A string it's not an Error" from @rauch now the errors have a better way to throw no more strings, the API doesn't change.
- Loading branch information
Showing
4 changed files
with
114 additions
and
94 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
var vimeo = require('../index').vimeo; | ||
|
||
vimeo('user','brad','videos',function(err,data){ | ||
// Throw a error | ||
vimeo('user','numbusLLC','videos',function(err,data){ | ||
console.log(err || data); | ||
}); | ||
vimeo('user','brad','videos',function(err,data){ | ||
console.log(err || data); | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
var vimeo = require('../index').video; | ||
var vimeo = require('../index').vimeo; | ||
|
||
vimeo('33544767', function(err,data){ | ||
vimeo('video', '33544767','', function(err,data){ | ||
// Data is Exposed with raw as the whole response, or thumb, username. | ||
console.log(data.raw); | ||
console.log(data.thumb); | ||
console.log(data.username.name); | ||
if (err) console.log(err) | ||
else { | ||
console.log(data.raw); | ||
console.log(data.thumb); | ||
console.log(data.username.name); | ||
} | ||
}); |
This file contains 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
This file contains 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