Skip to content

Commit

Permalink
Doc changes for url shortener example (#1013)
Browse files Browse the repository at this point in the history
  • Loading branch information
samaystops4no1 authored and JustinBeckwith committed Mar 6, 2018
1 parent 8eb2fce commit e5e95a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -97,15 +97,16 @@ var {google} = require('googleapis');
var urlshortener = google.urlshortener('v1');

var params = {
shortUrl: 'http://goo.gl/xKbRu3'
shortUrl: 'http://goo.gl/xKbRu3',
key: 'YOUR API KEY'
};

// get the long url of a shortened url
urlshortener.url.get(params, function (err, response) {
if (err) {
console.log('Encountered error', err);
} else {
console.log('Long url is', response.longUrl);
console.log('Long url is', response.data.longUrl);
}
});
```
Expand Down

0 comments on commit e5e95a6

Please sign in to comment.