Socket
Socket
Sign inDemoInstall

spotifyr

Package Overview
Dependencies
47
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.1.0

5

lib/search.js
'use strict';
const uri = "https://api.spotify.com/v1/search?q=query&type=querytype";
const uri = 'https://api.spotify.com/v1/search?q=query&type=querytype';
const request = require('request');
module.exports = function(query, type, cb) {
const queryURI = uri.replace('query', query);
const queryStr = query.replace(' ', '+');
const queryURI = uri.replace('query', queryStr);
const searchURI = queryURI.replace('querytype', type);

@@ -9,0 +10,0 @@

2

package.json
{
"name": "spotifyr",
"version": "1.0.0",
"version": "1.1.0",
"description": "JavaScript wrapper for spotify api",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,5 +7,25 @@ # spotifyr [![Build Status](https://travis-ci.org/rajikaimal/spotifier.svg?branch=master)](https://travis-ci.org/rajikaimal/spotifier)

## Install
```
npm install --save spotifyr
```
## Usage
```js
const spotifyr = require('spotifyr');
spotifyr('avicii', 'artist', function(error, response) {
if(error) {
console.log(error);
} else {
console.log(response);
}
});
```
## API
### search(query, type)
### search(query, type, callback)

@@ -26,4 +46,10 @@ Returns json data for requested query

#### callback
Type: `function`
Takes two arguments, error and response respectively
## License
MIT © [Rajika Imal](https://rajikaimal.github.io)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc