WoWInterface AddOn update API
How to use the WoWIinterface API via Curl:
API Token method: Generate your API token here.
GET AddOns you have access to: Code:
curl -H "x-api-token: <Your Token>" https://api.wowinterface.com/addons/list.json Code:
curl -H "x-api-token: <Your Token>" https://api.wowinterface.com/addons/details/<id>.json Code:
curl -H "x-api-token: <Your Token>" -F "id=8163" -F "version=123456789" -F "compatible=6.0.3" -F "updatefile=@/Users/dolby/Downloads/test2.zip" https://api.wowinterface.com/addons/update Just do a GET on http://api.wowinterface.com/addons/update and you’ll receive an error with a list of valid data points. Cookie method (legacy): Make a cookie file to authenticate with, you’ll only need to do this until the cookie expires: curl -c cookies.txt -d "vb_login_username=<username>&vb_login_password=<password>&do=login&cookieuser=1" https://secure.wowinterface.com/forums/login.phpUse the cookie file you made to send requests to the API:
BigWigs' packager project: https://github.com/BigWigsMods/packager. Info here. HTTP: Error Responce:
Normal Response:
|
Quote:
Funny how things work. |
No, there is a huge difference here.
They used our site to serve the addons. We do a single pull from Curse which is uploaded to our site. We don't use their site to serve the addons. And we do it with the full permission from the author. |
Quote:
In the past, when updating the curse svn or github etc., you grapped the newest version from there and uploaded it here. So technically, it's the same, just automated. On the topic: Good idea to start with. |
Is there a method to query which wowi-svn is connected to a project?
So that I could query the addon-list, query the addons for related svn, check out from svn , build zip and finally upload to wowi (and curse)? |
Great minds... I was about to propose something very similar.
Grats P3lim & Dolby. |
yeah - I didn't think Curse would like you pulling stuff from their site automatically (I see you removed the 3rd option in your original post).
edit: also glad you deleted my original post questioning as such. /sarcasm |
Quote:
|
Marth: WoWI pulling once with the author's permission (the same as if the author used the repo on Curse to create a .zip and then downloaded the .zip to upload here) is WAAAAAY different than a 3rd party program either a) using all of WoWI's and Curse's bandwidth to allow users to download files constantly without letting us get the traffic to generate revenue, or b) stealing addons without authors permission to upload them somewhere they have no knowledge of.
|
Quote:
As for your edit: I was trying to be kind by preventing you from being looked at in a less-than-flattering light. My apologies. I've restored your post, along with my original response and the response of another user. |
Quote:
Is this the reward for always trying to be helpful and gentle? :rolleyes: Anyways. :p Is there a legal difference for AddOns I manage and the ones were im declared as a team member? (At curse, I have manager status on all my projects.) |
Due the P3lim’s AddOn Packager Proxy needs github which I dont like, hacked myself a script together to update it, its located at
https://github.com/Dorwido/wowiupdater Its still work in progress, but I updated 3 addons of mine successfully with it. How it works: It fetches the addon list from here, you can then choose which addon to update it looks then on curseforge for the lateast release of that file (it skips alphas,betas) it compares then the filename of the latest release with the latest release filename from here if they match it stops if not it grabes then the filename, version, addon description (it strips out the default image if there is any and convert html to bbcode) and download the file. Then it post here the new version, updating the version and also the addon description. Be aware of the part with the addon description there is currently no option to turn it off, its converted from html to bbcode It requires requests and html2bbcode both mentioned in the requirements.txt How to use: python sync.py fetch # to get the addon list here python sync.py update <addonname> #example of one of my addon python sync.py update "Flight Map Enhanced & Times" Thats it. First time you use it it will ask for you wowinterface username/password First time you update an addon it will ask for the curseforge slug name, in the above example that would be: flight-map-enhanced To do: adding a changelog handler (many ppl to it different on curseforge, so there is no way todo it one way for all) rechecking addon details before doing the update, currently it looks in the saved addon list only and even on fetch dont update existing addons only on doing an update which could lead to wrong last file name, if doing an update without the script. |
Quote:
|
Quote:
Code:
sh release.sh -z Code:
sh release.sh ----------------------------------- release.sh release.sh generates an addon zipfile from a Git or SVN checkout. release.sh works by creating a new project directory, checking out external repositories within the project directory, then copying files from the checkout into the project directory. The project directory is then zipped to create a distributable addon zipfile. release.sh reads .pkgmeta and supports the following directives:
release.sh supports the following repository substitution keywords when copying the files from the checkout into the project directory.
release.sh reads the TOC file, if present, to determine the name of the project. release.sh assumes that tags (Git annotated tags and SVN tags) are named for the version numbers for the project. It will identify if the HEAD is tagged and use that as the current version number. It will search back through parent commits for the previous tag that is a release version number and generate a changelog containing the commits since that previous release tag. release.sh will create a default license file in the project directory with the contents All Rights Reserved if a license file does not already exist. By default, release.sh creates releases in a release subdirectory of the top-level directory of the checkout. Using release.sh The recommended way to include release.sh in a project is to:
|
Quote:
|
Quote:
|
Quote:
|
For those who would want to use my tool, but don't want to use GitHub, please see this.
It might happen, it might not, it depends on if the good people over at CurseForge would want to implement some way of hooking into the packager (the alternative would be scraping on intervals, which I don't want to do). The issue on GitHub I linked above will be updated as it progresses (or not). |
Giving this a bump as the API token method has gotten some love in the last little bit. First post is updated with the new info.
|
Using an API token instead of a cookie to upload a file, is it intended that there's no response body, and the only status codes returned are 200 (on a successful upload) or 00000 (for any error, which isn't even a valid HTTP status)?
It would be nice to get standard error codes like 404 (for missing/bad addon ID) or 403 (for missing/bad API token) and a message specifying the actual problem in other cases (missing/bad file, etc). For miscellaneous errors the CurseForge API gives a 422 (Unprocessable Entity) but there are plenty of 4xx statuses to choose from. Also, to be pedantic, 201 (Created) or 202 (Accepted) would be more appropriate than 200 (OK). :p |
All times are GMT -6. The time now is 03:05 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI