Nekos-life / nekos-dot-life

Nekos.life wrapper.
MIT License
166 stars 33 forks source link

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

Open arktn opened 2 years ago

arktn commented 2 years ago

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):

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

TheCyberRonin commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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).