npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mixradio

v0.2.0

Published

mixradio metadata api module

Downloads

8

Readme

Travis Build Status Circle Build Status Appveyor Build Status Build Status io.js supported

Install

npm install mixradio

Usage

var mixradio = require('mixradio');

Set Config

var mix = new MixRadio();

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | optional | Must be set to “music” in this version of the API, otherwise a 400 response will be returned | |uri| string | optional | Mix radio Api url |

Search

Example

   mixradio.Search({q:"lady gaga"}).then(function(data){
     console.log(data);
   });

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned | |q | string | optional | Free-text search filter - this can be an artist or track name or other keywords such as “love”. | |id | string | optional | An artist or product id to get details for. | |category | string | optional | Filters for results returned to a specific Category. | |genre | string | optional | Filters for results returned to a specific Genre. | |location | string | optional | Find artists orginating around a geocoordinate - e.g. location=51.45534,-2.59239 | |maxdistance | string | optional | Specifies a maximum distance from the location in km - e.g. maxdistance=5 - the default is 10km. | |itemsperpage | Integer | optional | For pagination, the number of results to return. | |startindex | Integer | optional | For pagination, the zero-based index of the first result to be returned. |

ArtistSuggestions

Example

   mixradio.ArtistSuggestions({q:"foo bar"}).then(function(data){
     console.log(data);
   });

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned | |q | string | optional | Free-text search filter - this can be an artist or track name or other keywords such as “love”. |

SearchSuggestions

Example

   mixradio.SearchSuggestions({q:"foo bar"}).then(function(data){
     console.log(data);
   });

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned | |q | string | optional | Free-text search filter - this can be an artist or track name or other keywords such as “love”. |

ArtistProducts

Example

   mixradio.ArtistProducts({id:"234234"}).then(function(data){
     console.log(data);
   });

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned | |id | string | required | The ID of the artist to get products for. | |category | string | optional | Filters for results returned to a specific Category. | |orderby | string | optional | A field to order results returned by - see Order By Enumeration. | |sortorder | string | optional | The direction to sort in - see Sort Order Enumeration. | |itemsperpage | Integer | optional | For pagination, the number of results to return. | |startindex | Integer | optional | For pagination, the zero-based index of the first result to be returned. |

Genres

Example

   mixradio.Genres({}).then(function(data){
     console.log(data);
   });

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned |

GenreCharts

Example

   mixradio.GenreCharts({genreid:"234234" category:"xxx"}).then(function(data){
     console.log(data);
   });

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned | |genreid | string | required | The genre to get the chart for. | |category | string | required | Determines the type of chart returned. For this resource, only the album and track Category types are valid. | |itemsperpage | Integer | optional | For pagination, the number of results to return. | |startindex | Integer | optional | For pagination, the zero-based index of the first result to be returned. |

GenreNewReleases

Example

   mixradio.GenreNewReleases({genreid:"234234" category:"xxx"}).then(function(data){
     console.log(data);
   });

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned | |genreid | string | required | The genre to get the chart for. | |category | string | required | Determines the type of chart returned. For this resource, only the album and track Category types are valid. | |itemsperpage | Integer | optional | For pagination, the number of results to return. | |startindex | Integer | optional | For pagination, the zero-based index of the first result to be returned. |

ProductDetails

Example

   mixradio.ProductDetails({id:"234234"}).then(function(data){
     console.log(data);
   });

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned | |id | string | required | The ID of the product to get details for. |

Charts

Example

   mixradio.Charts({category:"xxxx"}).then(function(data){
     console.log(data);
   });

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned | |category | string | required | Determines the type of chart returned. For this resource, only the album and track Category types are valid. | |itemsperpage | Integer | optional | For pagination, the number of results to return. | |startindex | Integer | optional | For pagination, the zero-based index of the first result to be returned. |

NewReleases

Example

   mixradio.NewReleases({category:"xxxx"}).then(function(data){
     console.log(data);
   });

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned | |category | string | required | Determines the type of chart returned. For this resource, only the album and track Category types are valid. | |itemsperpage | Integer | optional | For pagination, the number of results to return. | |startindex | Integer | optional | For pagination, the zero-based index of the first result to be returned. |

ArtistImage

Example

   mixradio.ArtistImage({size:"xxxx"}).then(function(data){
     console.log(data);
   });

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned | |size | string | required | The image size to get - see Image Size Enumeration. | |id | String | optional | The ID of the artist - supply an ID or Name. | |name | String | optional | The Name of the artist - supply an ID or Name. |

ProductImage

Example

   mixradio.ProductImage({size:"xxxx"}).then(function(data){
     console.log(data);
   });

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned | |size | string | required | The image size to get - see Image Size Enumeration. | |id | String | optional | The ID of the product. |

ProductSample

Example

      mixradio.ProductSample({id:"xxxx"}).then(function(data){
        console.log(data);
      });
      ```



  | Params  | Type  | Option | Desc |
  |---------|-------|--------|------|
  |countrycode | string | required | The [ISO3166-2](https://www.iso.org/obp/ui/#search/code/) country code for the user’s home territory. |
|domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned |
|id | String | required | The ID of the product. |
### MixGroups




#### Example
```js
   mixradio.MixGroups({}).then(function(data){
     console.log(data);
   });

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned | |category | Enum | optional | general or genre | |itemsperpage | Integer | optional | For pagination, the number of results to return. | |startindex | Integer | optional | For pagination, the zero-based index of the first result to be returned.. |

Mixes

Example

   mixradio.Mixes({id:"xxx"}).then(function(data){
     console.log(data);
   });

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned | |id | String | required | The ID of the Mix Group to get mixes for. | |itemsperpage | Integer | optional | For pagination, the number of results to return. | |startindex | Integer | optional | For pagination, the zero-based index of the first result to be returned.. |

ProductRecommendations

Example

   mixradio.ProductRecommendations({}).then(function(data){
     console.log(data);
   });

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned | |category | String | optional | An artist name for the track to recommend from. | |album | String | optional | An album name for the track to recommend from. | |name | String | optional | A track name for the track to recommend from. | |genre | String | optional | A genre for the track to recommend from. | |id | String | optional | The ID of the product to get recommendations for. If an ID is supplied, the creator, album and name parameters are ignored. |

SimilarArtists

Example

   mixradio.SimilarArtists({id:"xxxx"}).then(function(data){
     console.log(data);
   });

| Params | Type | Option | Desc | |---------|-------|--------|------| |countrycode | string | required | The ISO3166-2 country code for the user’s home territory. | |domain | string | required | Must be set to “music” in this version of the API, otherwise a 400 response will be returned | |id | string | required | The ID of the artist. | |itemsperpage | Integer | optional | For pagination, the number of results to return. | |startindex | Integer | optional | For pagination, the zero-based index of the first result to be returned. |