View Single Post
02-04-15, 06:42 PM   #2
Marthisdil
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 363
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



  Reply With Quote