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

Possibility of getting the total amount of available resources #48

Open
OpticFusion1 opened this issue Jan 10, 2022 · 3 comments
Open

Comments

@OpticFusion1
Copy link

OpticFusion1 commented Jan 10, 2022

Currently with what I do with what I do with the API a lot of un-nessesary requests to the site, specifically 4232 as of right now since it's one on each page, on top of every other request made.

Would it be possible to implement a way to get every resource at once, or at least the total amount? It would allow me to do one, although probably large-ish request instead of many requests.
Adding the resource description to the following would also help lower the amount of un-necessary requests made.
/resources
/resources/free
/resources/premium

@InventivetalentDev
Copy link
Member

what do you need so many requests for?
the API supports pagination (see the docs), so you could pass e.g. ?size=100 to the request to get more items than the default.

@OpticFusion1
Copy link
Author

OpticFusion1 commented Jan 10, 2022

I use spiget to scrape every .jar & skript to make it easier for me to check for malware (This having found 500+ malicious resources that would most likely go hidden otherwise) and more recently, description/tag/title checking. While Spigot's API handles desc/tag/title, I'm not sure md would be happy with the few thousand requests I send in a somewhat short amount of time.

I can bump the size up and see how many requests are made then, however there woud still be un-necessary ones just for the description. Would be nice if that were made part of the response since the tag & title are.

@OpticFusion1
Copy link
Author

OpticFusion1 commented Jan 10, 2022

Took a look, a size of 1000 bumps the amount massively down to 43 requests and 2k down to 22. If you could add the description as well, then it would max out at a much lower amount. At least unless I need to download actual resource files

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