Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update directions in TUTORIAL.md #1101

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e6ec211
Update navigational directions in Step 1(A)
brennanpate May 5, 2024
fb3d181
Combine directions in Step 1(B) and Step 2(C) and remove Step 2(C)
brennanpate May 5, 2024
6834789
Update navigational directions and verbage in Step 1(C)
brennanpate May 5, 2024
c63d147
Change reference from Step 1(C) to Step 1(B) in Step 2(D)
brennanpate May 5, 2024
d3c2852
Update capitalization in Prerequisites Step 3
brennanpate May 5, 2024
7c5d9e7
Add directions for installing Spotipy in Prerequisites Step 1(A)
brennanpate May 5, 2024
c351225
List updates to TUTORIAL.md file in CHANGELOG.md
brennanpate May 6, 2024
f2d9c56
Update docstrings for funcs in lines 340-585
brennanpate May 23, 2024
9545391
Add unit tests for artist ID and URL
brennanpate May 24, 2024
f1038cb
Add test_artists_mixed_ids
brennanpate May 24, 2024
b72ec27
Updated CHANGELOG.md and TUTORIAL.md as requested
brennanpate Jun 2, 2024
ea015a6
Merge branch 'master' of https://github.com/brennanpate/spotipy
brennanpate Jun 2, 2024
61a13f5
Update TUTORIAL.md and CHANGELOG.md based on PR feedback
brennanpate Jun 3, 2024
229f268
Merge pull-request-changes into master
brennanpate Jun 3, 2024
40dc5e2
Update client.py and test.py
brennanpate Jun 3, 2024
c4f3df9
Fix linting issue
brennanpate Jun 3, 2024
6347f95
Remove duplicate line; Change order of prerequisites
brennanpate Jun 6, 2024
29e8e4c
Update local repo
brennanpate Jun 6, 2024
78067e5
Add test_artists_mixed_ids
brennanpate Jun 10, 2024
d921c4c
Add Radiohead ID and URL; Add qotsa URL
brennanpate Jun 10, 2024
668a44a
Add test_artist_url
brennanpate Jun 10, 2024
eb0c0f5
Comment out three failing tests
brennanpate Jun 10, 2024
d7456b6
Fix linting errors
brennanpate Jun 10, 2024
14b8686
Uncommenting out failed tests
brennanpate Jun 10, 2024
8dbf74c
Add test_artist_id
brennanpate Jun 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
Add your changes below.

### Changed
- Made some updates to TUTORIAL.md to more closely match the current layout of Spotify's Developer Dashboard and the process for creating an app

### Added
- Added directions to install Spotipy in TUTORIAL.md (pip install spotipy --upgrade)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add these points to the already existing headers below.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You did what I asked for, but we've released a new version, so this file got changed once again.

We are already discussing this internally about how we are going forward with the CHANGELOG.md file, as the changes can be automatically gathered by GitHub. So we'll ignore this for now until this is resolved.

### Added
- Added unit tests for queue functions

Expand All @@ -24,12 +30,14 @@ Add your changes below.
- Added support for audiobook endpoints: `get_audiobook`, `get_audiobooks`, and `get_audiobook_chapters`.
- Added integration tests for audiobook endpoints.
- Added `update` field to `current_user_follow_playlist`.
- Added directions to install Spotipy in TUTORIAL.md (pip install spotipy --upgrade)

### Changed
- Fixed error obfuscation when Spotify class is being inherited and an error is raised in the Child's `__init__`
- Replaced `artist_albums(album_type=...)` with `artist_albums(include_groups=...)` due to an API change.
- Updated `_regex_spotify_url` to ignore `/intl-<countrycode>` in Spotify links
- Improved README, docs and examples
- Made some updates to TUTORIAL.md to more closely match the current layout of Spotify's Developer Dashboard and the process for creating an app

### Fixed
- Readthedocs build
Expand Down
25 changes: 10 additions & 15 deletions TUTORIAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,17 @@ In order to complete this tutorial successfully, there are a few things that you
You can check to see if you have pip installed by opening up Terminal and typing the following command: pip --version
If you see a version number, pip is installed, and you're ready to proceed. If not, instructions for downloading the latest version of pip can be found here: https://pip.pypa.io/en/stable/cli/pip_download/

A. After ensuring that pip is installed, run the following command in Terminal to install Spotipy: pip install spotipy --upgrade

A. After ensuring that pip is installed, run the following command in Terminal to install Spotipy: pip install spotipy --upgrade

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how this happened, but it seems that this line is duplicated.

Suggested change
A. After ensuring that pip is installed, run the following command in Terminal to install Spotipy: pip install spotipy --upgrade
A. After ensuring that pip is installed, run the following command in Terminal to install Spotipy: pip install spotipy --upgrade
A. After ensuring that pip is installed, run the following command in Terminal to install Spotipy: pip install spotipy --upgrade

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not your fault, but I have to mention it somewhere. Why do we check if pip is installed and then AFTER we check if Python is installed? I think we could change the order as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted about the duplicate line. I have removed this.

Good callout about the order of pip and Python installation instructions. I have changed the order of these.

It looks like my pull request is failing due to a couple of failed tests in the non_user_endpoints/test.py file. Would you suggest I comment out those tests or do something else? My local repo should be up-to-date with the remote repo, so I'm not quite sure why those tests are failing unless they're also failing for everyone else.


**2. python3**

Spotipy is written in Python, so you'll need to have the latest version of Python installed in order to use Spotipy. Check if you already have Python installed with the Terminal command: python --version
If you see a version number, Python is already installed. If not, you can download it here: https://www.python.org/downloads/

**3. spotipy**

You'll need to install the packages necessary for this project. Run the following command:
```
pip install spotipy
```

**4. experience with basic Linux commands**
**3. Experience with Basic Linux Commands**

This tutorial will be easiest if you have some knowledge of how to use Linux commands to create and navigate folders and files on your computer. If you're not sure how to create, edit and delete files and directories from Terminal, learn about basic Linux commands [here](https://ubuntu.com/tutorials/command-line-for-beginners#1-overview) before continuing.

Expand All @@ -31,19 +28,17 @@ Once those three setup items are taken care of, you're ready to start learning h
## Step 1. Creating a Spotify Account
Spotipy relies on the Spotify API. In order to use the Spotify API, you'll need to create a Spotify developer account.

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, you should be redirected to your developer dashboard.

B. Click the "Create an App" button. Enter any name and description you'd like for your new app. Add "http://localhost:1234" (or any other port number of your choosing) as your "Redirect URI". Accept the terms of service and click "Create."
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.

C. In your new app's Overview screen, click the "Settings" button and then under the "Basic Information" tab click "View client secret", then copy both your Client Secret and your Client ID somewhere on your computer. You'll need to access them later.
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.

D. Underneath your app name and description on the left-hand side, you'll see a "Show Client Secret" link. Click that link to reveal your Client Secret, then copy both your Client Secret and your Client ID somewhere on your computer. You'll need to 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.

## Step 2. Installation and Setup

A. Create a folder somewhere on your computer where you'd like to store the code for your Spotipy app. You can create a folder in terminal with this command: ```mkdir folder_name```

B. Install the Spotipy library. You can do this by using this command in the terminal: ```pip install spotipy```
B. In your new folder, create a Python file named main.py. You can create the file directly from Terminal using a built in text editor like Vim, which comes preinstalled on Linux operating systems. To create the file with Vim, ensure that you are in your new directory, then run: vim main.py

C. In that folder, create a Python file named main.py. You can create the file directly from Terminal using a built in text editor like Vim, which comes preinstalled on Linux operating systems. To create the file with Vim, ensure that you are in your new directory, then run: vim main.py

Expand All @@ -57,7 +52,7 @@ sp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id="YOUR_APP_CLIENT_ID",
redirect_uri="YOUR_APP_REDIRECT_URI",
scope="user-library-read"))
```
E. Replace YOUR_APP_CLIENT_ID and YOUR_APP_CLIENT_SECRET with the values you copied and saved in step 1D. Replace YOUR_APP_REDIRECT_URI with the URI you set in step 1C.
D. Replace YOUR_APP_CLIENT_ID and YOUR_APP_CLIENT_SECRET with the values you copied and saved in step 1D. Replace YOUR_APP_REDIRECT_URI with the URI you set in step 1B.

## Step 3. Start Using Spotipy

Expand Down
Loading