soundcloud-key-fetch
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "soundcloud-key-fetch", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Fetch a SoundCloud API key without owning an app!", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,11 +0,16 @@ | ||
# Soundcloud Key Fetch | ||
#### A simple module to fetch a SoundCloud API key without owning an application! | ||
##### `npm i soundcloud-key-fetch` or `yarn add soundcloud-key-fetch` | ||
A simple module to fetch a SoundCloud API key without owning an application! | ||
``` | ||
npm i soundcloud-key-fetch | ||
``` | ||
or | ||
``` | ||
yarn add soundcloud-key-fetch | ||
``` | ||
--- | ||
## API | ||
#### sckey.fetchKey() | ||
- Returns an API key that was scraped from SoundCloud. | ||
#### sckey.testKey(key) | ||
### sckey.fetchKey() | ||
- Returns a string conatining an API key that was scraped from SoundCloud. | ||
### sckey.testKey(key) | ||
- Returns a boolean on whether or not the given key is valid. | ||
@@ -15,27 +20,30 @@ --- | ||
#### Fetching a SoundCloud key | ||
const sckey = require('soundcloud-key-fetch'); | ||
sckey.fetchKey().then(key => { | ||
console.log(key) | ||
}); | ||
```javascript | ||
const sckey = require('soundcloud-key-fetch'); | ||
// await is also supported! | ||
sckey.fetchKey().then(key => { | ||
console.log(key) | ||
}); | ||
const key = await sckey.fetchKey(); | ||
// await is also supported! | ||
const key = await sckey.fetchKey(); | ||
``` | ||
#### Testing a SoundCloud key | ||
const sckey = require('soundcloud-key-fetch'); | ||
```javascript | ||
const sckey = require('soundcloud-key-fetch'); | ||
sckey.testKey('SC-KEY').then(result => { | ||
// returns a boolean; true/false | ||
if(result) { | ||
console.log('The key works!') | ||
} else { | ||
console.log('The key didn't work.') | ||
} | ||
}); | ||
sckey.testKey('SC-KEY').then(result => { | ||
// returns a boolean; true/false | ||
if(result) { | ||
console.log('The key works!') | ||
} else { | ||
console.log('The key didn't work.') | ||
} | ||
}); | ||
// await is also supported! | ||
// await is also supported! | ||
const test = await sckey.testKey('SC-KEY'); | ||
const test = await sckey.testKey('SC-KEY'); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4290
48