mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 09:13:53 +00:00
Merge 824bc5c21b into e13b10885a
This commit is contained in:
commit
080163545c
@ -26,6 +26,7 @@ Rebasing master onto v3 doesn't require a changelog update.
|
|||||||
- Replaced the `set_auth` and `auth_manager` properties with standard attributes.
|
- Replaced the `set_auth` and `auth_manager` properties with standard attributes.
|
||||||
- Replaced string concatenations and `str.format()` with f-strings
|
- Replaced string concatenations and `str.format()` with f-strings
|
||||||
- Modified docstrings to use the reStructuredText format
|
- Modified docstrings to use the reStructuredText format
|
||||||
|
- Replaced `localhost` with `127.0.0.1`.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|||||||
@ -9,13 +9,13 @@ If you would like to contribute to spotipy follow these steps:
|
|||||||
export SPOTIPY_CLIENT_ID=client_id_here
|
export SPOTIPY_CLIENT_ID=client_id_here
|
||||||
export SPOTIPY_CLIENT_SECRET=client_secret_here
|
export SPOTIPY_CLIENT_SECRET=client_secret_here
|
||||||
export SPOTIPY_CLIENT_USERNAME=client_username_here # This is actually an id not spotify display name and can be found [here](https://www.spotify.com/us/account/overview/)
|
export SPOTIPY_CLIENT_USERNAME=client_username_here # This is actually an id not spotify display name and can be found [here](https://www.spotify.com/us/account/overview/)
|
||||||
export SPOTIPY_REDIRECT_URI=http://localhost:8080 # Make url is set in app you created to get your ID and SECRET
|
export SPOTIPY_REDIRECT_URI=http://127.0.0.1:8080 # Make url is set in app you created to get your ID and SECRET
|
||||||
|
|
||||||
# Windows
|
# Windows
|
||||||
$env:SPOTIPY_CLIENT_ID="client_id_here"
|
$env:SPOTIPY_CLIENT_ID="client_id_here"
|
||||||
$env:SPOTIPY_CLIENT_SECRET="client_secret_here"
|
$env:SPOTIPY_CLIENT_SECRET="client_secret_here"
|
||||||
$env:SPOTIPY_CLIENT_USERNAME="client_username_here"
|
$env:SPOTIPY_CLIENT_USERNAME="client_username_here"
|
||||||
$env:SPOTIPY_REDIRECT_URI="http://localhost:8080"
|
$env:SPOTIPY_REDIRECT_URI="http://127.0.0.1:8080"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Create virtual environment, install dependencies, run tests
|
### Create virtual environment, install dependencies, run tests
|
||||||
|
|||||||
@ -30,7 +30,7 @@ Spotipy relies on the Spotify API. In order to use the Spotify API, you'll need
|
|||||||
|
|
||||||
A. Visit the [Spotify developer portal](https://developer.spotify.com/dashboard/). If you already have a Spotify account, click "Log in" and enter your username and password. Otherwise, click "Sign up" and follow the steps to create an account. After you've signed in or signed up, begin by clicking on your profile name at the top right of your screen and then click “Dashboard” to go to Spotify’s Developer Dashboard.
|
A. Visit the [Spotify developer portal](https://developer.spotify.com/dashboard/). If you already have a Spotify account, click "Log in" and enter your username and password. Otherwise, click "Sign up" and follow the steps to create an account. After you've signed in or signed up, begin by clicking on your profile name at the top right of your screen and then click “Dashboard” to go to Spotify’s Developer Dashboard.
|
||||||
|
|
||||||
B. Check the box "Accept the Spotify Developer Terms of Service" and then click "Accept the terms". On the next page, verify your email address if you haven't already. Click the "Create an App" button. Enter any name and description you'd like for your new app. Next, add "<http://localhost:1234>" (or any other port number of your choosing) to the "Redirect URI" secction. Check the box "I understand and agree with Spotify's Developer Terms of Service and Design Guidelines" and then click the "Save" button.
|
B. Check the box "Accept the Spotify Developer Terms of Service" and then click "Accept the terms". On the next page, verify your email address if you haven't already. Click the "Create an App" button. Enter any name and description you'd like for your new app. Next, add "<http://127.0.0.1:1234>" (or any other port number of your choosing) to the "Redirect URI" secction. Check the box "I understand and agree with Spotify's Developer Terms of Service and Design Guidelines" and then click the "Save" button.
|
||||||
|
|
||||||
C. Click on "Settings". Underneath "Client ID", you'll see a "View Client Secret" link. Click the link to reveal your Client secret and copy both your Client secret and your Client ID somewhere so that you can access them later.
|
C. Click on "Settings". Underneath "Client ID", you'll see a "View Client Secret" link. Click the link to reveal your Client secret and copy both your Client secret and your Client ID somewhere so that you can access them later.
|
||||||
|
|
||||||
|
|||||||
@ -110,12 +110,12 @@ to your application at
|
|||||||
The ``redirect_uri`` argument or ``SPOTIPY_REDIRECT_URI`` environment variable
|
The ``redirect_uri`` argument or ``SPOTIPY_REDIRECT_URI`` environment variable
|
||||||
must match the redirect URI added to your application in your Dashboard.
|
must match the redirect URI added to your application in your Dashboard.
|
||||||
The redirect URI can be any valid URI (it does not need to be accessible)
|
The redirect URI can be any valid URI (it does not need to be accessible)
|
||||||
such as ``http://example.com``, ``http://localhost`` or ``http://127.0.0.1:9090``.
|
such as ``http://example.com`` or ``http://127.0.0.1:9090``.
|
||||||
|
|
||||||
.. note:: If you choose an `http`-scheme URL, and it's for `localhost` or
|
.. note:: If you choose an `http`-scheme URL, and it's for `127.0.0.1`,
|
||||||
`127.0.0.1`, **AND** it specifies a port, then spotipy will instantiate
|
**AND** it specifies a port, then spotipy will instantiate a server on
|
||||||
a server on the indicated response to receive the access token from the
|
the indicated response to receive the access token from the response at
|
||||||
response at the end of the oauth flow [see the code](https://github.com/plamere/spotipy/blob/master/spotipy/oauth2.py#L483-L490).
|
the end of the oauth flow [see the code](https://github.com/plamere/spotipy/blob/master/spotipy/oauth2.py#L483-L490).
|
||||||
|
|
||||||
|
|
||||||
Client Credentials Flow
|
Client Credentials Flow
|
||||||
@ -309,7 +309,7 @@ Export the needed Environment variables:::
|
|||||||
export SPOTIPY_CLIENT_ID=client_id_here
|
export SPOTIPY_CLIENT_ID=client_id_here
|
||||||
export SPOTIPY_CLIENT_SECRET=client_secret_here
|
export SPOTIPY_CLIENT_SECRET=client_secret_here
|
||||||
export SPOTIPY_CLIENT_USERNAME=client_username_here # This is actually an id not spotify display name
|
export SPOTIPY_CLIENT_USERNAME=client_username_here # This is actually an id not spotify display name
|
||||||
export SPOTIPY_REDIRECT_URI=http://localhost:8080 # Make url is set in app you created to get your ID and SECRET
|
export SPOTIPY_REDIRECT_URI=http://127.0.0.1:8080 # Make url is set in app you created to get your ID and SECRET
|
||||||
|
|
||||||
Create virtual environment, install dependencies, run tests:::
|
Create virtual environment, install dependencies, run tests:::
|
||||||
$ virtualenv --python=python3.12 env
|
$ virtualenv --python=python3.12 env
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user