mauricew / twitch-graphql-api

Undocumented, uncorroborated, but certainly not unPoggers.
121 stars 4 forks source link

How to format the json body ? #1

Closed Lyfhael closed 4 years ago

Lyfhael commented 4 years ago

Hey @mauricew ,

I'm using Python and Requests module, and I'm wondering how I translate the request body to json ? Actually it is this :

query { user(login: "thijshs") { id login displayName description createdAt roles { isPartner } stream { id title type viewersCount createdAt game { name
} } } }

But it says it's not a valid format. I tried many differents things since about 1 hour but I can't manage to do it, I would appreciate if you could help me with that.

Also, I'm fully aware it is not recommended by Twitch and that it should not be used anymore. I do not plan on using in an automated script, I will use it a few times for an experiment then I will stop using it. I already use Helix API for my automated scripts

Lyfhael commented 4 years ago

Oh nevermind! After something like 4 hours of research I finally got it to work ._.