Netflix API Forums

I Need Help!

RSS Feed

users/userid/ratings/title doesn't support ?method=

    • Doron
    • Topic created 2 years ago

    I am looking to get at the rating for several titles. Since the GET url may get too long, I tried using a POST and ?method=GET added to the url.

    It always returns no ratings for me. I tried the GET and the POST with just one title listed in title_refs and the POST (with ?method=get) returns nothing, the basic GET works fine.

    Has anyone actually gotten POST to work with this?

    What I am trying to do is take http://rss.netflix.com/NewReleasesRSS and get title info for each item in the feed so I can show ratings and other data the feed doesn't have.

    thanks!

    Message edited by Doron 2 years ago

  1. Kent Brewster2 years ago

    Hi, Doron. If you POST to /ratings/title/actual, the API thinks you're trying to create a rating. See here:

    http://developer.netflix.com/docs/REST_API_Reference#0_70749

    ... for details.

    Can you say more about what you're trying to do? It sounds like you may be trying to take each title on the New Releases feed and find out if the signed-in user has already rated it.

    --Kent

  2. Doron2 years ago

    Kent - what I actually want is to get the same data a search returns for the items in the New Releases feed. Since the ratings api accepts multiple titles as an input and returns the data I need for a nice listing view (predicted rating, release year and box art), I thought I could use it.

    I was using users/userID/ratings/title, which doesn't seem to accept POST for adding. So I did a post and used ?method=GET to tell it to think of the request as a GET. It seems it isn't reading in title_refs from the POST data in this case (with ?method=GET).

    btw, it would be great if the API would provide new releases :)

  3. John Haren2 years ago

    Doron,
    Have you tried adding the method-GET parameter as a POST body param as well, and not in the query string? I bring this up because in my client scheme, having some parameters in the body and others in the query string would break oauth. I'm not saying this is your problem, but it might be. FWIW, I have been able to do what you're trying here. As a quick sanity check, what exactly is the response you're getting from the API, anyway?

  4. Doron2 years ago

    Here is what I am getting:

    Post URL:
    http://api.netflix.com/users/theuserid/ratings/title/predicted?method=GET

    The post body:

    oauth_signature_method=HMAC-SHA1&title_refs=http%3A%2F%2Fapi.netflix.com%2Fcatalog%2Ftitles%2Fmovies%2F70082907&oauth_consumer_key={key}&oauth_token={token}&oauth_version=1.0&oauth_timestamp=1253335338&oauth_nonce=mEyL3r&oauth_signature={signature}

    returns:
    <?xml version="1.0" standalone="yes"?> <ratings> <url_template>http://api.netflix.com/users/{userid}/ratings/title?{-join|&amp;|title_refs}</url_template> <link href="http://api.netflix.com/users/{userid}/ratings/title/actual" rel="http://schemas.netflix.com/ratings/titles.actual" title="actual ratings"></link> <link href="http://api.netflix.com/users/{userid}/ratings/title/predicted" rel="http://schemas.netflix.com/ratings/titles.predicted" title="predicted ratings"></link> </ratings>

    I am probably missing something here. If I switch to a straight get it works fine

  5. Michael Hart2 years ago

    The method param needs to go in the POST body as well.

  6. Doron2 years ago

    Url:
    http://api.netflix.com/users/theuserid/ratings/title/predicted?method=GET

    Post body:
    oauth_version=1.0&oauth_token={token}&oauth_nonce=27539751&oauth_timestamp=1257889507&oauth_signature={signature}&oauth_consumer_key={key}&oauth_signature_method=HMAC-SHA1&title_refs=http%3A%2F%2Fapi.netflix.com%2Fcatalog%2Ftitles%2Fmovies%2F60024536%2Chttp%3A%2F%2Fapi.netflix.com%2Fcatalog%2Ftitles%2Fmovies%2F60024536&method=GET

    Generated by the python netflix code returns Invalid Signature

  7. John Haren2 years ago

    If I'm reading this right, you're putting ?method=GET into your query string as well as the post body. Take it out of the query string.
    If you're posting, all query params should be in the post body. The only exception to this is that you can send all the oauth-specific params in an Authorization header.

  8. Doron2 years ago

    John - that gets me further, now I get no results back. I am guessing it has to do with the escaping of the title_refs?

    <?xml version="1.0" standalone="yes"?>

    <ratings>
    <url_template>http://api.netflix.com/users/T11ZS5ZHng693sDt6xnN._5zRbhs7CRlo4LVchUXsZL1k-/ratings/title/actual?{-join|&amp;|title_refs}</url_template>
    <ratings_item></ratings_item>
    </ratings>

  9. Doron2 years ago

    Nevermind, got it working now for real. Thanks!

  10. Doron2 years ago

    What would cause this request to return a ERR_400_MISSING_REQUIRED_ACCESS_TOKEN

    POST /users/{userid}/ratings/title/predicted HTTP/1.1

    oauth_signature_method=HMAC-SHA1&title_refs=http%3A%2F%2Fapi.netflix.com%2Fcatalog%2Ftitles%2Fmovies%2F70082907&method=GET&oauth_consumer_key={consumerkey}&oauth_token={tokeb}&oauth_version=1.0&oauth_timestamp=1261111260&oauth_nonce=oFeLts&oauth_signature=cdMmb4OMslqsS9CSyVmHEcffcxc%3D

    I am reimplementing my code in a different language and running into this. Funnily enough if I turn this into a GET it works fine.

[ Page 1 of 1 ]