dills122 / where-my-cage-at

(Currently down) Essential Nicolas Cage movie tracker so you never have to wonder where you can get your fix from again
https://wheremycageat.com/
0 stars 0 forks source link

Need to update `wtw` package for graphql queries #989

Open dills122 opened 10 months ago

dills122 commented 10 months ago

URL: https://apis.justwatch.com/graphql

Person Search

Request

{
    "operationName": "GetContentHeaderPerson",
    "variables": {
        "nodeId": "tp6747",
        "language": "en",
        "country": "US"
    },
    "query": "query GetContentHeaderPerson($nodeId: ID!, $country: Country!, $language: Language!) {\n  node(id: $nodeId) {\n    ... on Person {\n      ...ContentHeaderPerson\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment ContentHeaderPerson on Person {\n  id\n  content(country: $country, language: $language) {\n    fullName\n    shortDescription\n    dateOfBirth\n    __typename\n  }\n  __typename\n}\n"
}

Response

{
    "data": {
        "node": {
            "id": "tp6747",
            "content": {
                "fullName": "Nicolas Cage",
                "shortDescription": "....",
                "dateOfBirth": "1964-01-07",
                "__typename": "PersonContent"
            },
            "__typename": "Person"
        }
    }
}
dills122 commented 10 months ago

Findings:

GetSearchTitles is a paginated list of all the available titles for the Person/Actor/Actress nodeId from the previous search is used to gather the offer data using the GetTitleOffers call.