Code Monkey home page Code Monkey logo

spiget's People

Contributors

inventivetalentdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

spiget's Issues

Some resources are not present in the API

Maybe I'm doing something wrong, but some resources (ex. Vault) are not recognized by the api. If I search it by name I'll get anything except Vault and by using its resource if I get a 404 error trying to use /resources/34315/download

Some resource downloads have 0 byte size

Example resource ids: 86343, 86964, 86006, 83104, 75748, 85206, 85011, 64145, 65177, 82822

Happening to >2800 resources, all are known to be free resources and have their jar hosted on spigotmc, not external as per previous request to /v2/resources/free?...

The majority (2777) of affected resources were last updated between 26.06.2020 and 24.12.2020, a couple (17) on 03.01.2021 and 04.01.2021, and 94 between 20.01.2019 - and 1.12.2019, 1 last updated on 10.01., 1 last updated 10.05.

I'm using endpoint https://api.spiget.org/v2/resources/id/download
and I handle 307 redirects

Ability to filter webhooks

Can you add a way to filter webhooks, for example to receive webhooks only for resources from an author?

https request gets redirected to http

So for any reason (probably rate limiting or something like that), some GET requests to donwload a resource get redirected. The problem with this redirect is, that some frameworks, don't allow auto redirecting from https to http (like in my case .NET Core). For this reason i encountered various problems.

How i solved the problem for now:
I just use http requests for all calls to the API which should not be a huge deal, but it would be alot better to just get redirects to https URLs.

Returns 0 for author-id in v2/search/resources/'plugin-name'

Url: https://api.spiget.org/v2/search/resources/Essentials
I got this issue for the second JsonObject returned(chat-essentials.871).
It not only misses the author-id, but also the category I guess.
The actual author-id for this plugin should be 21516.
Json:

  {
    "file": {
      "type": ".jar",
      "size": 3.7,
      "sizeUnit": "KB",
      "url": "resources/chat-essentials.871/download?version=2974"
    },
    "contributors": "imzeevee,yoitsjimby",
    "likes": 0,
    "testedVersions": [],
    "links": {
      "discussion": "threads/chat-essentials.25958/"
    },
    "name": "Chat Essentials",
    "tag": "Clearchat selfclearchat and mute chat all in one",
    "version": {
      "id": 2974
    },
    "author": {
      "id": 0
    },
    "category": {
      "id": 0
    },
    "rating": {
      "count": 0,
      "average": 0
    },
    "releaseDate": 1407457680,
    "updateDate": 1407457680,
    "downloads": 1373,
    "icon": {
      "url": "",
      "data": ""
    },
    "existenceStatus": 1,
    "premium": false,
    "id": 871
  }

This https://api.spiget.org/v2/authors/21516/resources will return an empty JsonArray even though it should display ChatEssentials information.
This https://api.spiget.org/v2/authors/21516 kinda works fine though.

Add support for downloading jar from external source

Currently this only supports downloading jars hosted on spigot directly.
Most of the jars are hosted externally and most of these links actually point directly to the jar.
That's why I think this feature would be very beneficial and worth implementing.

Issues with obtaining Resource Reviews

Hey,
first of all thank you for creating this wonderful project.
However, there two bugs with the the "Resource Reviews" API, which I already addressed in your Discord:

  1. The "responseMessage" is never present
  2. "rating.count" returns always 1. The average seems to be correct tho, if it's supposed to represent the average count given by the user.

Spiget sometimes returns express 404 page

Sometimes the spiget API returns the default express 404 page.

Successful request:
image
image

404 request:
image
image

I first thought this might be related to a single API node (Identified by X-Spiget-Server header), but it occured on multiple API nodes (so far I've seen melon and aqua with this problem).

I was also able to reproduce this with different API endpoints. I was also able reproduce this with other clients e.g. curl

API is suddenly very slow?

I didnt change anything reguarding my checking/downloading code, but now it takes ages to check multiple plugins for updates.
Any ideas why?

Documentation page is blank

The documentation page is blank with only the header (or navbar or whatever) and the popup showing, like this:

3c74df55085cc4ab247adfb46e3097d0

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

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

Update Description

Can you add the description of the update on the resource-update webhook?

Possibility of getting the total amount of available resources

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

API returns old version information

Plugin: https://www.spigotmc.org/resources/gemseconomy.19655/history

The latest available version is v4.0 released on May 6, 2018 with version ID 220595.
However, the API returns for the v4.0 of the plugin the release date May 01, 2018 with the version id 219809.
https://api.spiget.org/v2/resources/19655/versions?page=3
[ { "downloads": 33, "rating": { "count": 0, "average": 0 }, "name": "3.2", "releaseDate": 1523545560, "resource": 19655, "id": 217033 }, { "downloads": 90, "rating": { "count": 0, "average": 0 }, "name": "3.2.1", "releaseDate": 1523716080, "resource": 19655, "id": 217287 }, { "downloads": 5, "rating": { "count": 1, "average": 5 }, "name": "4.0", "releaseDate": 1525189704, "resource": 19655, "id": 219809 } ]

I assume that the author of that plugin removed the previous v4.0 and replaced it with a newer one without increasing the version number.
It looks like the Spiget API is not able to detect that case.
In addition, the download redirection returns an error, even if it is the correct version id.
https://api.spiget.org/v2/resources/19655/versions/220595/download
{ "error": "resource version not found" }

Thanks in advance :)

Some resources cannot be downloaded (Error 404)

Some resources seem to error consistenty (aka manual retry via api after a couple minutes) with error 404 when attempting to download.

Examples resource ids: 1663, 56091, 59395, 62078, 62020, 62056, 62045, 62090, 62263, 62279, 62686, 62909, 62978, 62954, 63039, 62270 (there are many more, I got - > 500, all are known to be free resources and have their jar hosted on spigotmc, not external as per previous request to /v2/resources/free?... )

I'm using endpoint https://api.spiget.org/v2/resources/id/download
and I handle 307 redirects as expected

API does not return a new version

Plugin: https://www.spigotmc.org/resources/dicefurniture-plugin-m%C3%B6bel-plugin.6006/history

The latest available version is v 3.2.1.4 released on Feb 5, 2018 with version ID 206844.

Unfortunately the API does not return that version.
The last version returned by the API is v 3.2.1.3 released on Jan 19, 2018 with version ID 204110

https://api.spiget.org/v2/resources/6006/versions?page=16
[ { "downloads": 1482, "rating": { "count": 3, "average": 4.33 }, "name": "3.2.0.9", "releaseDate": 1496415900, "resource": 6006, "id": 162918 }, { "downloads": 6230, "rating": { "count": 6, "average": 4.5 }, "name": "3.2.1.0", "releaseDate": 1497298740, "resource": 6006, "id": 165178 }, { "downloads": 7453, "rating": { "count": 6, "average": 4.33 }, "name": "3.2.1.1", "releaseDate": 1501596420, "resource": 6006, "id": 175631 }, { "downloads": 7904, "rating": { "count": 6, "average": 4 }, "name": "3.2.1.2", "releaseDate": 1507740660, "resource": 6006, "id": 188808 }, { "downloads": 1552, "rating": { "count": 3, "average": 4.67 }, "name": "3.2.1.3", "releaseDate": 1516370880, "resource": 6006, "id": 204110 } ]

Missing URLs from versions on some resources

https://api.spiget.org/v2/resources/22803/versions doesn't list a URL against any of the available versions.

https://www.spigotmc.org/resources/dragondropelytra.22803/history has download links for all four, so I'm not sure where they went!

The main resource at https://api.spiget.org/v2/resources/22803/ does list a URL under file.

In general it's not clear when and which one should use to download a resource:

  • The resource's file.url
  • The resource/.../download endpoint
  • The URL(s) given in resource/.../versions
  • The resource/.../versions/.../download

Please could you clarify?

Add changelogs for plugin versions

It would be awesome to have version changelogs added to the /resources/{resource}/versions/ endpoints.

For example,

{
  "id": 0,
  "uuid": "string",
  "name": "string",
  "releaseDate": 0,
  "downloads": 0,
  "rating": {
    "count": 0,
    "average": 0
  }
}

becomes

{
  "id": 0,
  "uuid": "string",
  "name": "string",
  "releaseDate": 0,
  "downloads": 0,
  "changelog: "string",
  "rating": {
    "count": 0,
    "average": 0
  }
}

Download count of resources not updating

Hi,
I am trying to use your API for my Website and, unfortunatly, I am missing more than 1000 downloads for some of my resources. Is there a way to fix this? I thought the resources should get updated at least with every resource update but this is not the case. My plugin MagicWands has almost 2000 downloads but there are only about 700 shown.

Thanks a lot.

Spiget not downloading newest version of plugin

When I'm trying to download the Multiverse-Core plugin (Resource ID 390) using the Resource Download feature, Spiget downloads the oldest Version of the Plugin (V 2.5) not the newest one (V 4.2.2).
https://api.spiget.org/v2/resources/390/download

This might be related to Spiget also listing the updates in the wrong order when using the Resource Update feature
https://api.spiget.org/v2/resources/390/updates

I hope this gets fixed as I'm trying to use Spiget to automatically update the plugins on my server

Thanks in advance for your help!

cdn.spiget.org for version specific files

It seems that your API returns a diffrent download server if a specific version of a resource is requested, that makes scripting it impossible because it just forwards to spigotmc.org whitch has Cloudflare protection on and returns http error 503 when using curl.

correct:

$ curl -I https://api.spiget.org/v2/resources/9089/download | grep location
location: https://cdn.spiget.org/file/spiget-resources/9089.zip

incorrect / direct download with Cloudflare protection (503 with curl)

$ curl -I https://api.spiget.org/v2/resources/9089/versions/latest/download | grep location
location: https://spigotmc.org/resources/9089/download?version=367353

Premium plugin version/update not up to date

Hey
If I query Premium Plugins via the API, I do not get the latest version, but mostly those that are several weeks old. The same is the case with updates, the newest ones are not output on latest.

API Message

Version of the Plugin: 2.2.5

Resource download missing header

Hello,
I use spiget for search and download plugins in my mcpanel, but i noticed that the Content-Disposition was removed from the download response headers, and this cause that i can't get the filename. Anybody has any idea where can i get the filename?
Thanks!

Possibility of getting update id of latest resource version

For example, I want to get the update id of this link
https://www.spigotmc.org/resources/build-battle-guessthebuild-1-8-8-1-17.44703/update?update=416971

The id would be 416971

It's not possible to get the id from
https://api.spiget.org/v2/resources/44703/versions/latest
as the id mentioned there with "id" is the id to download the plugin which can be made with https://www.spigotmc.org/resources/build-battle-guessthebuild-1-8-8-1-17.44703/download?version=412955

I would like to see there the id of the update instead of the id to download the plugin. Also, I didn't find another way of getting the update id.

A way to filter Webhooks for specific Resources

Could you maybe make it so that we can filter the Data that is send to the Webhook. (For Example: I want to receive an Update Message for one of my Plugins on Discord, but i don’t want to make a bot that is always online.)
Spiget is such an amazing tool and i use it in 3 of my 5 Plugins for Updating automatically.

(And sorry for my bad English. Itβ€˜s not my main Language.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.