0

YQL and Yahoo music API

Hi.
I have found a post on the music api forum that says:

-----
You can call item service to get tracks for give release id. Below is example
/release/v1/item/[releaseid]
Ex: http://us.music.yahooapis.com/release/v1/i...ourownappidhere
-----

My question is: how is possible to perform the same search via YQL?

Thanks.

by
8 Replies
  • QUOTE (ildella_it @ May 9 2009, 02:24 AM) <{POST_SNAPBACK}>
    Hi.
    I have found a post on the music api forum that says:

    -----
    You can call item service to get tracks for give release id. Below is example
    /release/v1/item/[releaseid]
    Ex: http://us.music.yahooapis.com/release/v1/i...ourownappidhere
    -----

    My question is: how is possible to perform the same search via YQL?

    Thanks.


    How about the following? This is from the example in YQL Console (The diagnostics of the query shows that it does have the same URI as your example)
    CODE
    select * from music.release.id where ids="148083"


    http://developer.yahoo.com/yql/console/?q=...%3D%22148083%22

    Hope that helps!

    -- Nagesh
    0
  • nope, that query just retuln artist name and album name, without tracklist...
    0
  • QUOTE (ildella_it @ May 11 2009, 01:01 AM) <{POST_SNAPBACK}>
    nope, that query just retuln artist name and album name, without tracklist...


    The YQL table definition for music.release.id is not passing a "response" parameter to the service to indicate that "tracks" are desired, so it's just getting the default, which is "artists". It would need to pass "tracks" too to get what you want.

    The possible values are listed here: http://developer.yahoo.com/music/api_guide...aseListResponse

    It would probably be cool for there to be a "response" field in the table definition to allow the user to specify this. It would probably be best to default to including all parts of the response.

    -md
    0
  • QUOTE (Mike Dillon @ May 11 2009, 06:46 AM) <{POST_SNAPBACK}>
    The YQL table definition for music.release.id is not passing a "response" parameter to the service to indicate that "tracks" are desired, so it's just getting the default, which is "artists". It would need to pass "tracks" too to get what you want.

    The possible values are listed here: http://developer.yahoo.com/music/api_guide...aseListResponse

    It would probably be cool for there to be a "response" field in the table definition to allow the user to specify this. It would probably be best to default to including all parts of the response.

    -md


    The music.release.id table does have a response field. By default it's set to artists but you can change it to one of the other possible values noted above. Here's an example that pulls all tracks for a given release id:

    CODE
    select * from music.release.id where ids="148083" and response="tracks"


    Does this help? :)
    0
  • QUOTE (Stephen @ May 13 2009, 12:44 PM) <{POST_SNAPBACK}>
    The music.release.id table does have a response field. By default it's set to artists but you can change it to one of the other possible values noted above. Here's an example that pulls all tracks for a given release id:

    CODE
    select * from music.release.id where ids="148083" and response="tracks"


    Does this help? :)There ya go.
    0
  • QUOTE (Stephen @ May 13 2009, 12:44 PM) <{POST_SNAPBACK}>
    The music.release.id table does have a response field. By default it's set to artists but you can change it to one of the other possible values noted above. Here's an example that pulls all tracks for a given release id:

    CODE
    select * from music.release.id where ids="148083" and response="tracks"


    Does this help? :)-md
    0
  • QUOTE (Mike Dillon @ May 13 2009, 07:53 PM) <{POST_SNAPBACK}>
    There ya go.

    Update: Looks like this fails:

    CODE
    select * from music.release.id where ids="148083" and response="artists,tracks"


    The docs say it can be a comma separated value.

    It could also be interesting to have it be a batchable parameter so that you could do this and have it do one API call:

    CODE
    select * from music.release.id where ids="148083" and response in ("artists", "tracks")


    -md


    Yeah, the commas get url-encoded when sent through YQL which fails on the Music API side. We'll be looking into a fix for that. In the meantime, your suggested workaround is a good one.
    0
  • select * from music.release.id where ids="148083" and response in ("artists", "tracks") works to drag out a release, its tracks, and the artist, but is there anyway to display the image for the release as well?

    WHen you search by track it displays the images for the release also, but this doesnt happen when you search by release...

    Thanks
    0

Recent Posts

in YQL