API Method /images/new

This function uploads an image to Eventful and assigns it an image ID.

Arguments

authentication
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)

Example Request

An example using GET and specifying the image by URL:

http://api.eventful.com/rest/images/new?...&image_url=http://foo.com/image.jpg&caption=A+foo+photo.

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 Parameters

Output from this function is an XML block with the following constructs:
status string
ok
messagestring
Image added successfully.
idstring
The ID assigned to this image.

Example XML Response

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
  <message>Image added successfully.</message>
  <id>I0-000-000000001-1</id>
</response>

Error Codes

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.