jedi-gg / swgoh.gg.public

SWGOH.GG Issues
https://swgoh.gg
41 stars 12 forks source link

Can't retrieve data from API with coreapi #746

Closed alexgarciavila closed 2 years ago

alexgarciavila commented 2 years ago

When I run "coreapi get https://swgoh.gg/api/" I get all the html of the page instead of the corresponding dictionaries. Following your documentation, when I run "coreapi action abilities list" I get an error that the "abilities" key is not found

For example if I use another website https://treeherder.mozilla.org/docs/ it works fine. And if I use for example "coreapi action changelog list", it works.

Is there a problem with your api?

Thanks for your work

20220220-1575

20220220-1577

alexgarciavila commented 2 years ago

In python, following your documentation (import coreapi statement is at the beginning of the python file and the "pip install coreapi" was installed)

20220220-1584

20220220-1579

20220220-1581

alexgarciavila commented 2 years ago

More info:

When i try to push the "interact" button and "send request" i got an undefined response

20220220-1586

danpaulson commented 2 years ago

The actions are the additional url paths available. Example: https://swgoh.gg/api/abilities/

The root /api/ is just documentation so wouldn't respond with anything useful for coreapi.

danpaulson commented 2 years ago

Actually I see your issue (unfamiliar with coreapi). We provide the API routes but are not currently supporting coreapi.

alexgarciavila commented 2 years ago

Ooh, thank you for your quick response. I will work on it.

Great job, and thanks a lot.