Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

Add Check if valorant is dropped #55

Open
guttir14 opened this issue May 5, 2020 · 2 comments · May be fixed by #56
Open

Add Check if valorant is dropped #55

guttir14 opened this issue May 5, 2020 · 2 comments · May be fixed by #56
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@guttir14
Copy link

guttir14 commented May 5, 2020

just post request to gql.twitch.tv/gql with Autorization token ( {Authorization: "Oauth " + cookie.token} ) in header and with body:

{
    "operationName": "OnsiteNotifications_ListNotifications",
    "variables": {
        "limit": 3,
        "cursor": "",
        "language": "en"
    },
    "extensions": {
        "persistedQuery": {
            "version": 1,
            "sha256Hash": "b317b93ed481bf07c35defbcf01848f09744805ebb640734763298f9a7dfd64f"
        }
    }
}

If result contains "You just received the **VALORANT**" then valorant has been dropped and we can console.log('dropped') and process.exit()

Also, to easy get token you can use next script in your browser console:

newWin=window.open("about:blank","","width=350,height=10");newWin.document.write(JSON.stringify(Object({token:cookies["auth-token"]})))
@guttir14
Copy link
Author

guttir14 commented May 5, 2020

Or just emulate click on notifications button

@D3vl0per
Copy link
Owner

D3vl0per commented May 5, 2020

Can you make a pull request please?

@D3vl0per D3vl0per added enhancement New feature or request help wanted Extra attention is needed labels May 5, 2020
@guttir14 guttir14 linked a pull request May 6, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants