The CSS Sprites Generator uses a very simple HTTP API. Simply send GET or POST requests (file uploads have to be POST of course) to this URL.
All requests except getToken require a token to be present - this is what identifies you to the system - like a session ID.
All responses are sent as UTF-8 JSON. They contain at least "message" property and an "error" property. Different requests may add other properties. If "error" is true then "message" will be the error message.
All requests may be made as many times as you like (but be reasonable!).
api.php?getToken
You can upload files using a normal HTTP POST or simply send a URL for the server to download.
The file data should be encoded the same as if it were sent from an <input type="file" name="img">.
Files accepted are .png, .jpg, .jpeg, .gif and .zip (containing the aforementioned file types).
api.php?upload&token=...
Files accepted are .png, .jpg, .jpeg, .gif and .zip (containing the aforementioned file types).
NOT IMPLEMENTED
api.php?uploadUrl&token=...&url=...
This may take a while - be patient!
api.php?create&token=...
There are also several optional arguments you can pass in - more options may be coming soon: