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

[SEVERE] Getting "Cannot GET" error since some hours #43

Open
LoneDev6 opened this issue Oct 1, 2021 · 3 comments
Open

[SEVERE] Getting "Cannot GET" error since some hours #43

LoneDev6 opened this issue Oct 1, 2021 · 3 comments

Comments

@LoneDev6
Copy link

LoneDev6 commented Oct 1, 2021

Hello!
Since some hours ago I'm getting this error Cannot GET /v2/... when accessing the api method which allows to get authors info.
For example:
https://api.spiget.org/v2/authors/LoneDev
https://api.spiget.org/v2/authors/inventivetalent

Even using your online docs request maker shows the same result.
https://spiget.org/documentation/#!/authors/get_authors

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
<script src="/cdn-cgi/apps/head/XXX.js"></script></head>
<body>
<pre>Cannot GET /v2/authors/inventivetalent</pre>
</body>
</html>

Not working API methods:
https://api.spiget.org/v2/authors/inventivetalent
https://api.spiget.org/v2/authors/inventivetalent/resources
https://api.spiget.org/v2/authors/inventivetalent/reviews

Working methods:
https://api.spiget.org/v2/search/authors/inventivetalent
https://api.spiget.org/v2/authors

@LoneDev6 LoneDev6 changed the title [SEVERE] Getting "Cannot GET /v2/authors/{The author name}" error since some hours [SEVERE] Getting "Cannot GET" error since some hours Oct 1, 2021
@InventivetalentDev
Copy link
Member

Those endpoints are intended to be called with the author IDs, e.g. https://api.spiget.org/v2/authors/6643 or https://api.spiget.org/v2/authors/88296
You'll want to use the search endpoints to get authors/resources by their name.
I also didn't change anything and I'm not aware of anything changing on the spigotmc side, so not sure why that would be happening recently for you.

@LoneDev6
Copy link
Author

LoneDev6 commented Oct 1, 2021

Thanks for the clarification.
Sorry I think this happened:

  • I have a website running to show some resources and their authors (I'm using it correctly as shown in your example)
  • I got an error about a missing field in the returned json
  • I thought it was something to do with the API itself.

The strange thing is that it was working fine until today, nothing got changed on my side.
Maybe the request got blocked somehow?

Sorry for the false warning

@LoneDev6
Copy link
Author

LoneDev6 commented Oct 1, 2021

Found the issue!
Seems sometimes authors don't have their icon field set at all, no idea why.
https://api.spiget.org/v2/authors/1418187

{
  "name": "DexterSKOfficial",
  "id": 1418187
}

For example this other user https://api.spiget.org/v2/authors/25201 has no profile picture too, but the returned json is:

{
  "identities": {},
  "name": "xdmen62",
  "icon": {
    "url": "",
    "data": "",
    "info": "0",
    "hash": ""
  },
  "id": 25201
}

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

2 participants