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

Add bug reporting clarification and examples to README #1062

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
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
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,26 @@ for idx, item in enumerate(results['items']):
print(idx, track['artists'][0]['name'], " – ", track['name'])
```

## Example of getting artist image with artist's name

```python
import spotipy
import sys
from spotipy.oauth2 import SpotifyClientCredentials

spotify = spotipy.Spotify(auth_manager=SpotifyClientCredentials())

if len(sys.argv) > 1:
name = ' '.join(sys.argv[1:])
else:
name = 'Radiohead'

results = spotify.search(q='artist:' + name, type='artist')
items = results['artists']['items']
if len(items) > 0:
artist = items[0]
print(artist['name'], artist['images'][0]['url'])
```
## Reporting Issues

For common questions please check our [FAQ](FAQ.md).
Expand All @@ -74,6 +94,25 @@ You can ask questions about Spotipy on
[Stack Overflow](http://stackoverflow.com/questions/ask).
Don’t forget to add the *Spotipy* tag, and any other relevant tags as well, before posting.

### Reporting Bugs

If you have suggestions, bugs or other issues specific to this library,
file them [here](https://github.com/plamere/spotipy/issues).
Or just send a pull request.

When reporting a bug please fill out all the given fields:
**Describe the bug**
A clear and concise description of what the bug is and where/when it occured. Does the program terminate? Is the retrived information correct? Which endpoints are you making a call to? Include formatted text, not screen shots.

**Your code**
Share a complete minimal working example. Include libraries used.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Output**
Paste and format errors (with complete stacktrace) or logs. Make sure to remove sensitive information.

You can find these catagories by navagating to the bug report [link](https://github.com/plamere/spotipy/issues) then selecting "New issue" and then "Get started" next to Bug Report on the following page.

Please fill out all above fields. The information helps identify bugs faster, enabling bug patches to be released faster. Leaving any field blank may resort in your report going unanswered.
Loading