3.0.1 • Published 6 years ago

goorl v3.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

Build Status js-standard-style

goorl

Shortens url with goo.gl

Installation

From npm

$ npm i goorl

Usage

Required inputs

key Your google API key

url The URL you want to shorten

Promises

const goorl = require('goorl')
const options = {
  key: 'your-google-api-key',
  url: 'http://www.telemark.no/Planer/Regional-planstrategi/Offentlig-ettersyn-ny-regional-planstrategi'
}

goorl(options)
  .then(url => console.log(url))
  .catch(error => console.error(error))

Callbacks

const goorl = require('goorl')
const options = {
  key: 'your-google-api-key',
  url: 'http://www.telemark.no/Planer/Regional-planstrategi/Offentlig-ettersyn-ny-regional-planstrategi'
}

goorl(options, (error, url) => {
  if (error) {
    console.error(error)
  } else {
    console.log(url)
  }
})

License

MIT

3.0.1

6 years ago

3.0.0

8 years ago

2.1.0

8 years ago

2.0.13

8 years ago

2.0.12

8 years ago

2.0.11

8 years ago

2.0.10

8 years ago

2.0.9

8 years ago

2.0.8

9 years ago

2.0.7

9 years ago

2.0.6

9 years ago

2.0.5

9 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago