-
Notifications
You must be signed in to change notification settings - Fork 465
Improve headers, add locale #211
base: develop
Are you sure you want to change the base?
Conversation
nullpixel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall
pgoapi/auth_ptc.py
Outdated
|
|
||
| try: | ||
| r = self._session.get(self.PTC_LOGIN_URL1, timeout=self.timeout) | ||
| r = self._session.get(self.PTC_LOGIN_URL1, params={'client_id': 'mobile-app_pokemon-go', 'redirect_uri': 'https://www.nianticlabs.com/pokemongo/error', 'locale': self.locale}, timeout=self.timeout) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make these params a variable, like in the other changes
pgoapi/auth_ptc.py
Outdated
|
|
||
| try: | ||
| r = self._session.post(self.PTC_LOGIN_URL2, data=data, timeout=self.timeout, allow_redirects=False) | ||
| r = self._session.post(self.PTC_LOGIN_URL2, params={'service': 'http://sso.pokemon.com/sso/oauth2.0/callbackAuthorize'}, headers={'Content-Type': 'application/x-www-form-urlencoded'}, data=data, timeout=self.timeout, allow_redirects=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
|
I have also adapted the PR from ZeChrales for aiopogo to pgoapi: Noctem#8 Since I have absolutely no idea if this is correct at all, I would be interested if some of you can have a look. I don't know if we should wait to have this changes approved and then rather merge those changes instead of just some missing headers. |
|
I don't know if you read it on discord : |
|
Allright, I'm looking forward to it. |
Add missing headers
Add locale for parameter and accept language