src/bbc_meet_spotify/spotify.py
def query_spotify(self, artist: str, song_title: str) -> str:
        """
        Query spotify for artist and song title, returning the id
        :param artist: artist
        :param song_title: song title
        :raises IndexError: if no tracks are found
        :return: spotify song id
        """
        results = self.spotify.search(q=f"artist:{artist} track:{song_title}")["tracks"]["items"]
        results.sort(key=lambda x: len(x["name"]))
        return results[0]["id"]

        Query spotify for artist and song title, returning the id
        :param artist: artist
        :param song_title: song title
        :raises IndexError: if no tracks are found
        :return: spotify song id
        
Query spotify for artist and song title, returning the id
Query spotify for artist and song title returning the id
def query_spotify(self, artist: str, song_title: str) -> str:
        results = self.spotify.search(q=f"artist:{artist} track:{song_title}")["tracks"]["items"]
        results.sort(key=lambda x: len(x["name"]))
        return results[0]["id"]
def query_spotify ( self , artist : str , song_title : str ) -> str : results = self . spotify . search ( q = f"artist:{artist} track:{song_title}" ) [ "tracks" ] [ "items" ] results . sort ( key = lambda x : len ( x [ "name" ] ) ) return results [ 0 ] [ "id" ]
Query spotify for artist and song title, returning the id
Query spotify for artist and song title returning the id
"""
        Query spotify for artist and song title, returning the id
        :param artist: artist
        :param song_title: song title
        :raises IndexError: if no tracks are found
        :return: spotify song id
        """
spotify song id
spotify song id
if no tracks are found
if no tracks are found
IndexError
self
artist
str
None
song_title
str
None