spotify2py 1.3
spotify2py is a easy to use, feature-rich python wrapper for the Spotify Web API.
Requires Python: >=3.6
Keywords: spotify api wrapper,spotify api wrapper python,spotify2py pypi,spotify2py python,spotify2py,sijey-praveen pypi,spotify,sijey,sijey-praveen,sijey praveen projects,spotify web api,spotify python package

<img src="https://image.flaticon.com/icons/png/512/2111/2111685.png" width="70px" align="right">

# Spotify2py

## Installation

```pip install spotify2py```

This library can be installed by the pip command, open your command prompt and type in the following command...

## Overview of this library

First import the library using the **import** method `from spotify2py import Spotify` and then proceed to call the functions

### get_token()
- This function can be used to get spotify api **access_token**.

```
from spotify2py import Spotify

var = Spotify().get_token()

print(var)
```

<hr>

### recently_played()
- This function can be used to list the recently played track names & track url.

- Use the function with **Spotify API Token**.
- Use the **show={}** method to get previous track, **limit = 10**.

```
from spotify2py import Spotify

var = Spotify(token="token").recently_played(show=0)

print(var)
```

<hr>

### get_artist()
- This function can be used to get meta data about artists.

- Use the function with **Spotify API Token** & **Artist Name**.

```
from spotify2py import Spotify

var = Spotify(token="token").get_artist("artist name")

print(var)
```

<hr>

### get_album()
- This function can be used to get meta data about album.

- Use the function with **Spotify API Token** & **Album Name**.

```
from spotify2py import Spotify

var = Spotify(token="token").get_album("album name")

print(var)
```

<hr>

### featured_playlist()
- This function can be used to get meta data about featured playlist of your spotify account.

- Use the function with **Spotify API Token**.
- Use the **show={}** method to get previous or next playlist, **limit = 10**.

```
from spotify2py import Spotify

var = Spotify(token="token").featured_playlist(show=0)

print(var)
```

<hr>

### user_profile()
- This function can be used to get meta data about user's profile .

- Use the function with **Spotify API Token** & **User ID.

```
from spotify2py import Spotify

var = Spotify(token="token", user_id="user-id").user_profile()

print(var)
```

<hr>

### user_playlists()
- This function can be used to get meta data about user's playlists.

- Use the function with **Spotify API Token** & **User ID.

```
from spotify2py import Spotify

var = Spotify(token="token", user_id="user-id").featured_playlist(show=0)

print(var)
```

- Use the **show={}** method to get previous or next playlist, **limit = based on user's playlists count**.

<hr>

### new_releases()
- This function can be used to get meta data about new releases albums.

- Use the function with **Spotify API Token**.

```
from spotify2py import Spotify

var = Spotify(token="token").new_releases(show=0)

print(var)
```

<hr>

### get_track()
- This function can be used to get meta data about track's.

- Use the function with **Spotify API Token** & **Track Name**.

```
from spotify2py import Spotify

var = Spotify(token="token").get_track("song name")

print(var)
```

<hr>

### play()
- This function can be used to play tracks on spotify web .

- Use the function with **Spotify API Token** & **Track Name**.

```
from spotify2py import Spotify

var = Spotify(token="token", user_id="user-id").play("song name")

print(var)
```

<hr>

### scopes()
- This function can be used to list permission scopes for getting access_token.

```
from spotify2py import Spotify

var = Spotify().scopes()

print(var)
```

<hr>

### your_profile()
- This function can be used to get user information.

```
from spotify2py import Spotify

var = Spotify(token="token").your_profile()

print(var)
```

<hr>

### currently_playing()
- This function can be used to get currently playing track or album information. 

```
from spotify2py import Spotify

var = Spotify(token="token").currently_playing()

print(var)
```

<hr>