API Method /images/new
This function uploads an image to Eventful and assigns it an image ID.
- This method requires user authentication.
- image_file file
- The image file upload, OR:
- image_url text
- A URL from which to retrieve the image file.
- caption string
- A caption for this image. (optional)
An example using GET and specifying the image by URL:
If uploading the image directly, be sure to use POST and set the encoding type to multipart/form-data. This is handled automatically when using one of the Eventful API interface libraries; in that case, specify the local filename as the value of the image_file argument.
Output from this function is an XML block with the following constructs:
- status string
- Image added successfully.
- The ID assigned to this image.
Example XML Response
<?xml version="1.0" encoding="UTF-8"?>
<message>Image added successfully.</message>
This method may return these errors in an error document:
- Authentication error
- The specified user was not found or provided invalid credentials.
- Missing parameter
- Either the 'image_file' or 'image_url' parameter is required.