Autoloading/downloading this pluginSolved
Koguma
Hi!

  I'm wondering why the filename is now Kits_GjqgR.cs instead of Kits.cs.  I had to rename it, which means I can no longer easily automate updating my plugins, which umod.org was supposed to simplify.. :P
Wulf
uMod Admin
The filename is downloaded as Kits.cs for browsers that respect the target filename the site provides. It is stored as the other because of other plugins named Kits. Whatever you are using to download should set the output to Kits.cs if it doesn't respect the target file that the site sets of Kits.cs.
Koguma
Original Poster
Ok, I see what's happening.  Like you said, there was another Kits.cs for another game.   I just need to make a more intelligent downloader... :P
Wulf
uMod Admin
In response to Koguma ():
Ok, I see what's happening.  Like you said, there was another Kits.cs for another game.   I just nee...
Setting the output filename is all you'd need to do really, which pretty much all programs such as wget, curl, etc. offer.
Koguma
Original Poster

Is there a way to find the Plugin page based just on the .cs plugin data?

For example, take these two plugins, they each have this header info:
[Info("Kits", "Reneb", "3.2.93", ResourceId = 668)]
class Kits : RustPlugin

and

[Info("Kits", "Mughisi", 1.1, ResourceId = 1025)]
public class Kits : ReignOfKingsPlugin

So on oxidemod.org previously, we would build the download url based on the ResourceID and the name of the plugin.

Is there some kind of mapping API you guys have, where I can feed it say [ "Kits", "RustPlugin", 668 ] for example and get back a download url?

My wget failed earlier because I mistakenly made the assumption the urls would just be https://umod.org/plugins/<plugin filename>


Thoughts?

Wulf
uMod Admin
In response to Koguma ():
Is there a way to find the Plugin page based just on the .cs plugin data?

For example, ta...
Normally the name would be unique, but in this case the plugin filename, title, and class have not been updated to be unique yet. There is no such thing as a ResourceId on this site as all plugins are intended to be uniquely named.
Koguma
Original Poster
In response to Wulf ():
Normally the name would be unique, but in this case the plugin filename, title, and class have not b...
So there's no plans for such an API?  I noticed you have 'Subsciptions' in the user profiles.  You could even make it a paid subscription. I wouldn't mind throwing in a couple of bucks to save myself the headache of figuring out what plugin is what.. :P
Wulf
uMod Admin
In response to Koguma ():
So there's no plans for such an API?  I noticed you have 'Subsciptions' in the user profiles.  You c...
API for what exactly? An ID/number is not an API. As I mentioned, names are intended to be unique, so you can look a plugin up by a name as long as it is using the proper name (this will be enforced soon for old plugins).
Koguma
Original Poster
In response to Wulf ():
API for what exactly? An ID/number is not an API. As I mentioned, names are intended to be unique, s...

It's an API when that's the only way to be able to find a plugin.   I guess I'll wait until proper names are enforced, because right now there's just no way to associate the legacy .cs files with their new urls.
Wulf
uMod Admin
In response to Koguma ():

It's an API when that's the only way to be able to find a plugin.   I guess I'll wait until pr...
The ID was only there on the old site because the lack of being able to even look for names. The new site you can search the entire JSON feed or use the name via direct URL, which you could simply rename any locally that haven't been updated yet; i.e. Kits.cs to RustKits.cs (and matching RustKits class) for it to work fine. Example of using the "API" that we currently provide: https://umod.org/plugins/search.json?query=kits&filter=&categories[]=rust
Koguma
Original Poster
Hey, that's json query tool is pretty good! Thanks!! :P
Wulf
uMod Admin
In response to Koguma ():
Hey, that's json query tool is pretty good! Thanks!! :P
It's what the site uses for listing, which is why it is there at the moment. ;)