def lookup(id=None, artist_amg_id=None, upc=None, country='US', media='all', entity=None, attribute=None, limit=50):
    """
    Returns the result of the lookup of the specified id, artist_amg_id or upc in an array of result_item(s)
    :param id: String. iTunes ID of the artist, album, track, ebook or software
    :param artist_amg_id: String. All Music Guide ID of the artist
    :param upc: String. UPCs/EANs
    :param country: String. The two-letter country code for the store you want to search.
                    For a full list of the codes: http://en.wikipedia.org/wiki/%20ISO_3166-1_alpha-2
    :param media: String. The media type you want to search for. Example: music
    :param entity: String. The type of results you want returned, relative to the specified media type. Example: musicArtist.
                   Full list: musicArtist, musicTrack, album, musicVideo, mix, song
    :param attribute: String. The attribute you want to search for in the stores, relative to the specified media type.
    :param limit: Integer. The number of search results you want the iTunes Store to return.
    :return: An array of result_item(s)
    """
    # If none of the basic lookup arguments are provided, raise a ValueError
    if id is None and artist_amg_id is None and upc is None:
        raise ValueError(lookup_no_ids)

    lookup_url = _url_lookup_builder(id, artist_amg_id, upc, country, media, entity, attribute, limit)
    r = requests.get(lookup_url)

    try:
        json = r.json()['results']
        result_count = r.json()['resultCount']
    except:
        raise ConnectionError(general_no_connection)

    if result_count == 0:
        raise LookupError(lookup_error)

    return _get_result_list(json)
def lookup ( id = None , artist_amg_id = None , upc = None , country = 'US' , media = 'all' , entity = None , attribute = None , limit = 50 ) : if id is None and artist_amg_id is None and upc is None : raise ValueError ( lookup_no_ids ) lookup_url = _url_lookup_builder ( id , artist_amg_id , upc , country , media , entity , attribute , limit ) r = requests . get ( lookup_url ) try : json = r . json ( ) [ 'results' ] result_count = r . json ( ) [ 'resultCount' ] except : raise ConnectionError ( general_no_connection ) if result_count == 0 : raise LookupError ( lookup_error ) return _get_result_list ( json )
Returns the result of the lookup of the specified id, artist_amg_id or upc in an array of result_item(s)
    :param id: String. iTunes ID of the artist, album, track, ebook or software
    :param artist_amg_id: String. All Music Guide ID of the artist
    :param upc: String. UPCs/EANs
    :param country: String. The two-letter country code for the store you want to search.
                    For a full list of the codes: http://en.wikipedia.org/wiki/%20ISO_3166-1_alpha-2
    :param media: String. The media type you want to search for. Example: music
    :param entity: String. The type of results you want returned, relative to the specified media type. Example: musicArtist.
                   Full list: musicArtist, musicTrack, album, musicVideo, mix, song
    :param attribute: String. The attribute you want to search for in the stores, relative to the specified media type.
    :param limit: Integer. The number of search results you want the iTunes Store to return.
    :return: An array of result_item(s)