From 93412a7b78bf9beff37c32f9d94af52b7aa30882 Mon Sep 17 00:00:00 2001 From: Stephane Bruckert Date: Sun, 2 Feb 2020 16:04:44 +0000 Subject: [PATCH] Add query doc link, closes #268 --- .github/workflows/pythonapp.yml | 2 +- CHANGELOG.md | 1 + README.md | 2 +- spotipy/client.py | 3 ++- tests/integration/test_non_user_endpoints.py | 13 ------------- 5 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index d3588d0..0228f5c 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -1,4 +1,4 @@ -name: Python application +name: Tests on: [push, pull_request] diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a39f20..2416b64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Support for `playlist_cover_image` - Support `after` and `before` parameter in `current_user_recently_played` + - CI for unit tests ## [2.7.1] - 2020-01-20 diff --git a/README.md b/README.md index 4555686..02cf725 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ##### A light weight Python library for the Spotify Web API -[![Documentation Status](https://readthedocs.org/projects/spotipy/badge/?version=latest)](https://spotipy.readthedocs.io/en/latest/?badge=latest) +![Tests](https://github.com/plamere/spotipy/workflows/Tests/badge.svg) [![Documentation Status](https://readthedocs.org/projects/spotipy/badge/?version=latest)](https://spotipy.readthedocs.io/en/latest/?badge=latest) ## Documentation diff --git a/spotipy/client.py b/spotipy/client.py index 21ce7cd..29ce611 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -351,7 +351,8 @@ class Spotify(object): """ searches for an item Parameters: - - q - the search query + - q - the search query (see how to write a query in the + official documentation https://developer.spotify.com/documentation/web-api/reference/search/search/) # noqa - limit - the number of items to return - offset - the index of the first item to return - type - the type of item to return. One of 'artist', 'album', diff --git a/tests/integration/test_non_user_endpoints.py b/tests/integration/test_non_user_endpoints.py index 48a4f7c..8f8e924 100644 --- a/tests/integration/test_non_user_endpoints.py +++ b/tests/integration/test_non_user_endpoints.py @@ -1,17 +1,5 @@ # -*- coding: utf-8 -*- -""" -These tests require user authentication - provide client credentials using the -following environment variables - -:: - - 'SPOTIPY_CLIENT_USERNAME' - 'SPOTIPY_CLIENT_ID' - 'SPOTIPY_CLIENT_SECRET' - 'SPOTIPY_REDIRECT_URI' -""" - from spotipy import ( Spotify, SpotifyClientCredentials, @@ -76,7 +64,6 @@ class AuthTestSpotipy(unittest.TestCase): assert('speechiness' in track) def test_audio_features_with_bad_track(self): - bad_tracks = [] bad_tracks = ['spotify:track:bad'] input = self.four_tracks + bad_tracks results = self.spotify.audio_features(input)