######################################################### # # # BUGGER Auto Update Functionality # # Client Implementation API # # # # Document Date: 27 March 2010 # # # # Document Author: Ben Tasker # # # ######################################################### Contents --------- - System Requests - System Responses - Install Complete - Error Responses System Requests ---------------- Requests for the Auto Update API should be made to /BUGGER/AutoInstall.shtml The script expects several variables to be defined in the Request URI. These are; Request Type: TYPE Project ID: PROJ Return Test Releases: TESTING Current Version of Program to be updated: CURRVERSION Request Type should be set to Update (note the capital 'U'), to notify the script that we want to run an update. Project ID should be the project ID as configured in your BUGGER system (usually a number) Return Test Releases specifies whether or not you want to install the unstable version. If you do want an unstable version you should set TESTING to Y (case is important) An example call would be; http://mywebserver.com/BUGGER/AutoInstall.shtml?TYPE=Update&PROJ=1&TESTING=N&CURRVERSION=0.23 System Responses ----------------- The system will respond in text format. There will be a single variable per line (Note: if you view the page in a webbrowser, the variables may share a single line) The variables returned are as follows; TARBALL_LOCATION - A URL from which you should download the tarball INSTALL_SCRIPT - A URL allowing you to install the install script TESTING_VERSION - An indicator to show whether this is a stable/Unstable version (Y= Unstable N= Stable) TARBALL_CHECKSUM - A MD5 Checksum of the tarball at TARBALL_LOCATION UPDATE_VERSION - Version of the program you will be installing Whilst AutoInstall supports custom install scripts, AutoUpdate does not. Each update is likely to need installing in a specific way so it's not practical to allow clients to use their own custom installation methods. If TESTING was set to N when you placed your request, TESTING_VERSION will not equal Y. However if you did request an unstable version, this could equal Y or N. If you requested a testing version and one wasn't available the system may return the stable version. Alternatively, it may simply return a null output. You can use UPDATE_VERSION to inform the user which version their program will be at once the install is complete. Error Responses ----------------- If the system doesn't recognise the value of TYPE (either because you forgot to supply it, or used an invalid value) the system will return the following ERROR: Unknown value passed for TYPE. (You supplied $REQUEST_TYPE) $REQUEST_TYPE will be substituted for the value you supplied. The system may also return the following (pretty self explanatory) error messages; ERROR: An Invalid current version was specified - No matching records found ERROR: An Unspecified Claims_DB Error Occurred Your program needs to check for these, there's very little the end user can do to resolve these issues, but they may wish to alert the server admin. ######################################################### # # # DOCUMENT END # # Copyright 2010 Ben Tasker # # # # Released under GNU GPL V3 # # See http://benscomputer.no-ip.org # # # #########################################################