This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better error handling, got rid of object for direct url return
- Loading branch information
Showing
4 changed files
with
26 additions
and
17 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
{ | ||
"name": "gitio", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author" : "Tane Piper <piper.tane@gmail.com>", | ||
"description": "Library for nodejs to call the git.io URL shortner", | ||
"main": "./index" | ||
"main": "./index", | ||
"repository" : { | ||
"type" : "git", | ||
"url" : "https://github.com/tanepiper/node-gitio.git" | ||
}, | ||
"bugs" : { | ||
"url" : "http://github.com/tanepiper/node-gitio/issues" | ||
}, | ||
"engines" : ["node >= 0.4.0"] | ||
} |
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,9 +1,6 @@ | ||
var gitio = require('./index'); | ||
|
||
gitio('https://github.com/tanepiper/node-bitly', function(err, data) { | ||
if (!err && data.statusCode === 200) { | ||
console.log('Your URL is ' + data.url); | ||
} else { | ||
console.log(err, data) | ||
} | ||
gitio('https://github.com/tanepiper/node-gitio', function(err, result) { | ||
if (err) throw err; | ||
console.log(result); | ||
}); |