Login

MediaIcons.org

API Documentation

Find | GetFormats | GetStyles | GetCategories | GetIcon | SubmitIcon | GetIconDetail | EditIcon | UpdateImage | ApproveIcon

Find

Use this service to find an icon in a certian format and style.

By default, it returns a url to download the icon. However, the user will likely want to preview the icons before downloading them as there can be multiple ones to choose from.

For this, you can slightly change the download link for previews. See GetIcon for more details on how to preview icons before you download them.

  • term: the search term used to find the icon
  • format: 1=square, 2=wide, 3=tall or see GetFormats
  • style (optional): see GetStyles for possible values
  • category (optional): see GetCategories for possible values
  • client: please enter the name of the client software consuming the service

GetFormats

This service will get you list of the possible formats for icons on the site.


GetStyles

This service will get you list of the possible styles for the given format.

  • format (optional): 1=square, 2=wide, 3=tall

GetCategories

This service will return a list of possible category choices.


GetIcon

This service returns the icon as PNG and JPG images. All previews are in JPG format for faster loads and downloads are in PNG format for quality. Also, downloads are tracked in the database to help measure popularity. Therefore, it makes sense to use the preview links to display the icons to the user. Once the user chooses an icon, you should then use the download type to retrieve the final icon.

  • key: the unique key of the icon
  • format: 1=square, 2=wide, 3=tall or see GetFormats
  • style: see GetStyles for possible values
  • type: use "small", "med", "large" to preview, or "download" to download

Submit Icon

Use this service to submit new icons by simply posting a file with the correct metadata as part of the filename.

  • Must provide basic Authorization header (green)
  • Must provide metadata as part of filename (red)
  • Upon success, the response will contain the key (blue)

Example

Sample HTTP Request (note metadata in filename)
POST /Services/SubmitIcon.ashx HTTP/1.1
Authorization: BASIC username:password
Content-Type: multipart/form-data; boundary=---------------------8c8e548063b4bc0
Host: mediaicons.org
Content-Length: 132561
Expect: 100-continue

-----------------------8c8e548063b4bc0
Content-Disposition: form-data; name="file"; filename="Terminator [Movie][terminator; Arnold Schwarzenegger][f1s0].jpg"
Content-Type: application/octet-stream
Sample HTTP Response (returns key upon success)
HTTP/1.1 201 Created
Date: Mon, 04 Dec 2006 05:16:25 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Location: 
Cache-Control: private
Content-Type: text/plain; charset=utf-8
Content-Length: 4

2638

EditIcon

This service will edit the metadata associated with an icon.

Test

TODO:

UpdateImage

This service will update an icon with a new PNG image. The image must be posted as a PNG file for it to be accepted.

  • key: the unique key of the icon to update

Note the above querystring parameter is optional when the key is part of the filename. ex: icon{key}.png