Reply
Thread Tools Display Modes
Unread 02-04-15, 05:22 PM   #1
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 6,979
2 new ways to maintain your addons on WoWI

How to use the WoWIinterface API via Curl:

Make a cookie file to authenticate with, you’ll only need to do this until the cookie expires:
(*ZAM is working on a public oauth endpoint so in the future you’ll be able to get an access token. Right now you’ll need to get the auth cookies from our local login system.)
curl -c cookies.txt -d "vb_login_username=<username>&vb_login_password=<password>&do=login&cookieuser=1" https://secure.wowinterface.com/forums/login.php
Use the cookie file you made to send requests to the API:
  • GET AddOns you have access to:
  • GET AddOn details:
  • curl -b cookies.txt http://api.wowinterface.com/addons/details/<addon id>.json
  • POST Updates: (If you GET the endpoint it will list what can be changed via this endpoint)
  • curl -b cookies.txt -F "id=<addon id>" -F "version=<your addon version number>" -F "compatible=<patch numbers, comma delimited>" -F "updatefile=@/path/to/local/file.zip" http://api.wowinterface.com/addons/update
  • List of valid data you can POST:
To use P3lim’s AddOn Packager Proxy: please see this thread.

Last edited by Dolby : 06-28-15 at 08:15 AM.
Cairenn is offline   Reply With Quote
Unread 02-04-15, 06:42 PM   #2
Marthisdil
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 354
Originally Posted by Cairenn View Post
How to use the WoWIinterface API via Curl:

Make a cookie file to authenticate with, you’ll only need to do this until the cookie expires:
(*ZAM is working on a public oauth endpoint so in the future you’ll be able to get an access token. Right now you’ll need to get the auth cookies from our local login system.)
curl -c cookies.txt -d “vb_login_username=<username>&vb_login_password=<password>&do=login&cookieuser=1" https://secure.wowinterface.com/forums/login.php
Use the cookie file you made to send requests to the API:
  • GET AddOns you have access to:
  • GET AddOn details:
  • curl -b cookies.txt http://api.wowinterface.com/addons/details/<addon id>.json
  • POST Updates: (If you GET the endpoint it will list what can be changed via this endpoint)
  • curl -b cookies.txt -F “id=<addon id>" -F “version=<your addon version number>" -F “compatible=<patch numbers, comma delimited>" -F "updatefile=@/path/to/local/file.zip" http://api.wowinterface.com/addons/update
  • List of valid data you can POST:
To use P3lim’s AddOn Packager Proxy: please see this thread.

Auto-pull from Curse:
You will need to:
  • If you don't already have the addon in question on WoWInterface - upload an old version of your addon to here, not the most recent version. Put in your description, screenshots, etc. If you already have the addon hosted here, skip to the next step.
  • Once you've uploaded it, give me a link to it here and on Curse, please.
  • Then I tick a couple boxes and it should grab the most recent from Curse, and from then on will auto-magically pull from Curse any time you update your addon there.
  • In addition you will need to provide written confirmation that we are pulling from Curse at your behest, via posting in this thread.
So - you guys killed the old, awesome, addon updaters from the past from pulling from your site, and now you're ok with pulling from Curse?

Funny how things work.
__________________

Marth



Marthisdil is offline   Reply With Quote
Unread 02-04-15, 06:47 PM   #3
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 6,979
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.
Cairenn is offline   Reply With Quote
Unread 02-05-15, 03:24 AM   #4
humfras
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2009
Posts: 123
Originally Posted by Marthisdil View Post
So - you guys killed the old, awesome, addon updaters from the past from pulling from your site, and now you're ok with pulling from Curse?

Funny how things work.


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.
__________________
Author of VuhDo CursorCastBar OptiTaunt Poisoner RaidMobMarker

Last edited by humfras : 02-05-15 at 03:26 AM.
humfras is offline   Reply With Quote
Unread 02-05-15, 11:19 AM   #5
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 640
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)?
__________________
The cataclysm broke the world ... and the pandas could not fix it!
Rilgamon is offline   Reply With Quote
Unread 02-06-15, 07:39 AM   #6
schnoggo
A Fallenroot Satyr
 
schnoggo's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 20
Great minds... I was about to propose something very similar.
Grats P3lim & Dolby.
schnoggo is offline   Reply With Quote
Unread 02-06-15, 11:27 AM   #7
Marthisdil
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 354
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
__________________

Marth



Marthisdil is offline   Reply With Quote
Unread 02-06-15, 11:28 AM   #8
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 566
Originally Posted by Marthisdil View Post
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).
they have a seperate thread to provide author permissions
10leej is offline   Reply With Quote
Unread 02-06-15, 01:32 PM   #9
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 9,945
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.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh


Last edited by Cairenn : 02-06-15 at 01:54 PM.
Seerah is offline   Reply With Quote
Unread 02-06-15, 01:40 PM   #10
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 6,979
Originally Posted by Marthisdil View Post
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
The option is still available, I just moved it to it's own thread, as pointed out by others. I removed it from this thread because we'd rather it be a 'last resort' type of thing. We'd prefer that people use any of the other options available. But it is still available and it is still posted about.

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.

Last edited by Cairenn : 02-06-15 at 04:26 PM.
Cairenn is offline   Reply With Quote
Unread 02-06-15, 05:16 PM   #11
humfras
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2009
Posts: 123
Originally Posted by Cairenn View Post
another user.
HEY!
Is this the reward for always trying to be helpful and gentle?

Anyways.
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.)
__________________
Author of VuhDo CursorCastBar OptiTaunt Poisoner RaidMobMarker

Last edited by humfras : 02-06-15 at 05:19 PM.
humfras is offline   Reply With Quote
Unread 02-13-15, 08:56 AM   #12
Dorwido
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 54
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.
__________________
Auction Analytics
http://www.wowauction.org/
Dorwido is offline   Reply With Quote
Unread 02-13-15, 03:14 PM   #13
Phanx
No Life!
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,145
Originally Posted by Dorwido View Post
Due the P3lim’s AddOn Packager Proxy needs github which I dont like, hacked myself a script together to update it, ...
You may also be interested in jlam's standalone packager which replaces the CurseForge packager. You could easily use this in conjunction with the WoWInterface API to create a ZIP file and upload it to both sites (or just WoWInterface if you don't host on Curse too). It should work with any Git-based project regardless of where you host your remote repository(ies).
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 02-14-15, 06:00 PM   #14
jlam
A Murloc Raider
Join Date: Oct 2010
Posts: 9
Originally Posted by Phanx View Post
You may also be interested in jlam's standalone packager which replaces the CurseForge packager. You could easily use this in conjunction with the WoWInterface API to create a ZIP file and upload it to both sites (or just WoWInterface if you don't host on Curse too). It should work with any Git-based project regardless of where you host your remote repository(ies).
curseforge-packager is a shell script that you can get from GitHub. If you have Git for Windows and a standard SVN installation on your system, you should have all of the tools used by the shell script to do a full release. You just run it as
Code:
sh release.sh -z
, or if you also have 7-zip, you can just run
Code:
sh release.sh
and a zipfile will be generated as well.

-----------------------------------

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:
  • externals (Git and SVN)
  • ignore
  • license-output (for default All Rights Reserved license)
  • manual-changelog
  • move-folders
  • package-as

release.sh supports the following repository substitution keywords when copying the files from the checkout into the project directory.
  • @alpha@...@end-alpha@
  • @debug@...@end-debug@
  • @localization(locale="locale", format="format", ...)@
    • escape-non-ascii
    • handle-subnamespaces
    • handle-unlocalized
    • namespace
  • @no-lib-strip@...@end-no-lib-strip@
  • @non-alpha@...@end-non-alpha@
  • @non-debug@...@end-non-debug@
  • @project-revision@
  • @project-version@

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:
  1. Create a release subdirectory in your top-level checkout.
  2. Copy release.sh into the release directory.
  3. Ignore the release subdirectory in .pkgmeta.
  4. Run release.sh.
jlam is offline   Reply With Quote
Unread 02-14-15, 06:25 PM   #15
Dorwido
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 54
Originally Posted by Phanx View Post
You may also be interested in jlam's standalone packager which replaces the CurseForge packager. You could easily use this in conjunction with the WoWInterface API to create a ZIP file and upload it to both sites (or just WoWInterface if you don't host on Curse too). It should work with any Git-based project regardless of where you host your remote repository(ies).
na adding changelog and i am happy with my script, one click to update here, just miss the api here to upload images too :-P
__________________
Auction Analytics
http://www.wowauction.org/
Dorwido is offline   Reply With Quote
Unread 02-14-15, 07:25 PM   #16
Dolby
Every day I'm shuffling
 
Dolby's Avatar
Premium Member
WoWInterface Admin
Join Date: Feb 2004
Posts: 2,038
Originally Posted by Dorwido View Post
just miss the api here to upload images too :-P
Working on it
Dolby is offline   Reply With Quote
Unread 02-14-15, 07:33 PM   #17
Dorwido
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 54
Originally Posted by Dolby View Post
Working on it
nice cant await it :-D
__________________
Auction Analytics
http://www.wowauction.org/
Dorwido is offline   Reply With Quote
Unread 02-16-15, 07:09 AM   #18
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,391
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).
p3lim is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » 2 new ways to maintain your addons on WoWI

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off