Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getLatestPatchNotes() is not work #220

Closed
cow03haha opened this issue Apr 8, 2021 · 1 comment
Closed

getLatestPatchNotes() is not work #220

cow03haha opened this issue Apr 8, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@cow03haha
Copy link

getLatestPatchNotes is not work, I am not sure if I am using this method correctly
here is my code

from pyrez.api import PaladinsAPI, StatusPageAPI
from pyrez.enumerations.Language import Language

paladins = PaladinsAPI(devId = 'devId', authKey = 'authKey')
data = paladins.getLatestPatchNotes()
print(data)
paladins.close()

and here is error

$ /usr/bin/python3 /media/cow03/NoobCow_CodeSpace/python/misc/paladins_api.py
Traceback (most recent call last):
  File "/media/cow03/NoobCow_CodeSpace/python/misc/paladins_api.py", line 5, in <module>
    data = paladins.getLatestPatchNotes()
  File "/home/cow03/.local/lib/python3.7/site-packages/pyrez/api/PaladinsAPI.py", line 88, in getLatestPatchNotes
    __ = self.getWebsitePost(language=language or Language.English, slug=PaladinsWebsitePost(**_[0]).slug)
  File "/home/cow03/.local/lib/python3.7/site-packages/pyrez/api/PaladinsAPI.py", line 105, in getWebsitePost
    __ = [ PaladinsWebsitePost(**___) for ___ in (_ or []) ]
  File "/home/cow03/.local/lib/python3.7/site-packages/pyrez/api/PaladinsAPI.py", line 105, in <listcomp>
    __ = [ PaladinsWebsitePost(**___) for ___ in (_ or []) ]
TypeError: type object argument after ** must be a mapping, not str
@luissilva1044894
Copy link
Owner

Yo, @cow03haha. Sorry for late reply. It should be working for now. I'll push a release soon.

If you find hard to format obj['content'] / obj.content (RAW HTML), I've added a new method getUrl().

Note: Always returns the latest patch notes on the website, may be not playable/current.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants