Getting Started Clarifications and Example Code File (#904)

* added URI link to README getting started

* revised comment

* added alternate module installation instruction

* installation troubleshooting comment

* scope clarification comment

* added playlist_add_items.py to examples folder

* reformatted changelog edits

* Relocated added contributions to added section in Changelog

* removed unnecessary library installation instruction

* Clarified alternative installation instruction
This commit is contained in:
Mason Stephenson authored and GitHub committed 2022-12-10 16:27:29 +00:00
1 parent 1377879972
commit edd3f29a2c
4 files changed
+26

No files matched your search

+4
View File
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Add alternative module installation instruction to README
- Added Comment to README - Getting Started for user to add URI to app in Spotify Developer Dashboard.
- Added playlist_add_tracks.py to example folder
### Fixed
- Update contributing.md
+8
View File
@@ -14,6 +14,12 @@ Spotipy's full documentation is online at [Spotipy Documentation](http://spotipy
pip install spotipy
```
alternatively, for Windows users
```bash
py -m pip install spotipy
```
or upgrade
```bash
@@ -43,6 +49,8 @@ for idx, track in enumerate(results['tracks']['items']):
### With user authentication
A redirect URI must be added to your application at [My Dashboard](https://developer.spotify.com/dashboard/applications) to access user authenticated features.
```python
import spotipy
from spotipy.oauth2 import SpotifyOAuth
+13
View File
@@ -0,0 +1,13 @@
# Add a list of items (URI) to a playlist (URI)
import spotipy
from spotipy.oauth2 import SpotifyOAuth
sp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id="YOUR_APP_CLIENT_ID",
client_secret="YOUR_APP_CLIENT_SECRET",
redirect_uri="YOUR_APP_REDIRECT_URI",
scope="playlist-modify-private"
))
sp.playlist_add_items('playlist_id', ['list_of_items'])
+1
View File
@@ -1,4 +1,5 @@
# shows artist info for a URN or URL
# scope is not required for this function
from spotipy.oauth2 import SpotifyClientCredentials
import spotipy