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

Many API endpoints don't work (except when using an older version of the wrapper) #45

Open
arktn opened this issue Jun 19, 2022 · 3 comments

Comments

@arktn
Copy link
Contributor

arktn commented Jun 19, 2022

Describe the bug
When using https://nekos.life/api/v2/img/:endpoint many endpoints don't work and return a 404 message that reads:
{"msg":"404"}
Here is a list of all the not working endpoints I found:
baka, poke, nekoGif, foxGirl, kemonomimi, holo
But for some reason when using an older version (2.0.7) of the wrapper I could for example use the foxGirl endpoint and I would even get a result that linked to https://cdn.nekos.life/fox_girl/foxgirl_85.jpg (that link is working at the moment).

To Reproduce
Not working API endpoints:
Go to: https://nekos.life/api/v2/img/foxGirl (The endpoint can be changed to any endpoint of the list I created in this issue.)
Result: {"msg":"404"}

Working older nekos.life wrapper version:
1. Install version 2.0.7 of the nekos.life wrapper.
2. Run the sfw.foxGirl() function and get the result.
Result: {"url":"https://cdn.nekos.life/fox_girl/foxgirl_85.jpg"}

Expected behavior
Both should either give us a JSON similar to the result of the older wrapper or a 404 error.

Desktop (please complete the following information):

  • OS: Windows 10 Home
  • OS version: 21H2
  • Node version: 16.13.1

Additional context
This is an expansion of the over one month old #44 issue.

@TheCyberRonin
Copy link
Member

So what does the code look like that you're calling and what version of the library are you using that doesn't work?

Version 3 of the library ONLY has sfw, so since it has been a major version bump, it's a breaking change!

try just doing client.foxGirl() instead of client.sfw.foxGirl() I think

@arktn
Copy link
Contributor Author

arktn commented Jun 19, 2022

So what does the code look like that you're calling and what version of the library are you using that doesn't work?

Version 3 of the library ONLY has sfw, so since it has been a major version bump, it's a breaking change!

try just doing client.foxGirl() instead of client.sfw.foxGirl() I think

I am currently running v3.0.0 and I used both methods.

const NekoClient = require('nekos.life');
const client = new NekoClient();

async function foxgirl() {
    const res = await client.foxGirl();
    console.log(res.url);
    const res = await client.sfw.foxGirl();
    console.log(res.url);
    }
foxgirl();

Error for: client.foxGirl()
TypeError: client.foxGirl is not a function

Error for client.sfw.foxGirl():
TypeError: Cannot read properties of undefined (reading 'foxGirl')


Here is a list of all the not working endpoints I found:
baka, poke, nekoGif, foxGirl, kemonomimi, holo

And what about the not working endpoints?

@gXLg
Copy link

gXLg commented Jul 27, 2022

Looks like the problem is on their server. They are changing something or deleting old things.

Checking out the endpoint list, none of the above apis stated can be found (at the moment of writing the comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants