Spotify.NET/SpotifyAPI.Docs/versioned_docs/version-5.1.1/web/browse.md

117 lines
4.3 KiB
Markdown
Raw Normal View History

2020-05-13 17:25:42 +01:00
---
id: browse
title: Browse
sidebar_label: Browse
---
2019-08-16 23:40:04 +01:00
## GetFeaturedPlaylists
2016-08-20 11:49:09 +01:00
> Get a list of Spotify featured playlists (shown, for example, on a Spotify players “Browse” tab).
2019-08-16 23:40:04 +01:00
**Parameters**
2016-08-20 11:49:09 +01:00
|Name|Description|Example|
|--------------|-------------------------|-------------------------|
|[locale]| The desired language, consisting of a lowercase ISO 639 language code and an uppercase ISO 3166-1 alpha-2 country code, joined by an underscore. | `"de_DE" //Germany`
|[country]| A country: an ISO 3166-1 alpha-2 country code. | `"DE"`
|[timestamp]| A timestamp in ISO 8601 format | `DateTime.Now`
|[limit]| The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. | `20`
|[offset]| The index of the first item to return. Default: 0 | `0`
2019-08-16 23:40:04 +01:00
Returns a `FeaturedPlaylists` object, which has 2 properties. `String Message` and `Paging<SimplePlaylist> Playlists`
2016-08-20 11:49:09 +01:00
2019-08-16 23:40:04 +01:00
**Usage**
```csharp
2016-08-20 11:49:09 +01:00
FeaturedPlaylists playlists = _spotify.GetFeaturedPlaylists();
Console.WriteLine(playlists.Message);
playlists.Playlists.Items.ForEach(playlist => Console.WriteLine(playlist.Name));
```
---
2019-08-16 23:40:04 +01:00
## GetNewAlbumReleases
2016-08-20 11:49:09 +01:00
> Get a list of new album releases featured in Spotify (shown, for example, on a Spotify players “Browse” tab).
2019-08-16 23:40:04 +01:00
**Parameters**
2016-08-20 11:49:09 +01:00
|Name|Description|Example|
|--------------|-------------------------|-------------------------|
|[country]| A country: an ISO 3166-1 alpha-2 country code. | `"DE"`
|[limit]| The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. | `20`
|[offset]| The index of the first item to return. Default: 0 | `0`
2019-08-16 23:40:04 +01:00
Returns a `NewAlbumReleases` object, which has the property `Paging<SimpleAlbum> Albums`.
2016-08-20 11:49:09 +01:00
2019-08-16 23:40:04 +01:00
**Usage**
```csharp
2016-08-20 11:49:09 +01:00
NewAlbumReleases newAlbums = _spotify.GetNewAlbumReleases();
newAlbums.Albums.Items.ForEach(album => Console.WriteLine(album.Name));
```
---
2019-08-16 23:40:04 +01:00
## GetCategories
2016-08-20 11:49:09 +01:00
> Get a list of categories used to tag items in Spotify (on, for example, the Spotify players “Browse” tab).
2019-08-16 23:40:04 +01:00
**Parameters**
2016-08-20 11:49:09 +01:00
|Name|Description|Example|
|--------------|-------------------------|-------------------------|
|[country]| A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want to narrow the list of returned categories to those relevant to a particular country | `"DE"`
|[locale]| The desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore | `"de_DE"`
|[limit]| The maximum number of categories to return. Default: 20. Minimum: 1. Maximum: 50. | `20`
|[offset]| The index of the first item to return. Default: 0 (the first object). | `0`
2019-08-16 23:40:04 +01:00
Returns a `CategoryList` object, which has the property `Paging<Category> Categories`.
2016-08-20 11:49:09 +01:00
2019-08-16 23:40:04 +01:00
**Usage**
```csharp
2016-08-20 11:49:09 +01:00
CategoryList categoryList = _spotify.GetCategories();
categoryList.Categories.Items.ForEach(category => Console.WriteLine(category.Name));
```
---
2019-08-16 23:40:04 +01:00
## GetCategory
2016-08-20 11:49:09 +01:00
> Get a single category used to tag items in Spotify (on, for example, the Spotify players “Browse” tab).
2019-08-16 23:40:04 +01:00
**Parameters**
2016-08-20 11:49:09 +01:00
|Name|Description|Example|
|--------------|-------------------------|-------------------------|
|categoryId| The Spotify category ID for the category. | `"party"`
|[country]| A country: an ISO 3166-1 alpha-2 country code. Provide this parameter to ensure that the category exists for a particular country. | `"DE"`
|[locale]| The desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore | `"de_DE"`
Returns a [Category](https://developer.spotify.com/web-api/object-model/#category-object)
2019-08-16 23:40:04 +01:00
**Usage**
```csharp
2016-08-20 11:49:09 +01:00
Category cat = _spotify.GetCategory("party");
Console.WriteLine(cat.Name);
```
---
2019-08-16 23:40:04 +01:00
## GetCategoryPlaylists
2016-08-20 11:49:09 +01:00
> Get a list of Spotify playlists tagged with a particular category.
2019-08-16 23:40:04 +01:00
**Parameters**
2016-08-20 11:49:09 +01:00
|Name|Description|Example|
|--------------|-------------------------|-------------------------|
|categoryId| The Spotify category ID for the category. | `"party"`
|[country]| A country: an ISO 3166-1 alpha-2 country code. | `"DE"`
|[limit]| The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. | `20`
|[offset]| The index of the first item to return. Default: 0 | `0`
2019-08-16 23:40:04 +01:00
Returns a `CategoryPlaylist` object, which has the property `Paging<SimplePlaylist> Playlists`
2016-08-20 11:49:09 +01:00
2019-08-16 23:40:04 +01:00
**Usage**
```csharp
2016-08-20 11:49:09 +01:00
CategoryPlaylist playlists = _spotify.GetCategoryPlaylists("party");
playlists.Playlists.Items.ForEach(playlist => Console.WriteLine(playlist.Name));
```
---