| GET | /image | Returns the specified image based on the Id. | |
|---|---|---|---|
| GET | /image/{id} | Returns the specified image based on the Id. |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using WebService.AppApi.Models.ResourceModels;
using CommonService.Media;
namespace CommonService.Media
{
public enum ImageSize
{
Unknown = 0,
Full = 1,
Small = 2,
Medium = 3,
Large = 4,
XLarge = 5,
}
}
namespace WebService.AppApi.Models.ResourceModels
{
public partial class GetImage
{
[ApiMember(DataType="int", IsRequired=true)]
public virtual Guid Id { get; set; }
///<summary>
///Manually control the server resizing of the image.
///</summary>
[ApiMember(Description="Manually control the server resizing of the image.")]
public virtual ImageSize ImageSize { get; set; }
///<summary>
///Set to true to return the image in Base64 format.
///</summary>
[ApiMember(DataType="boolean", Description="Set to true to return the image in Base64 format.")]
public virtual bool Base64 { get; set; }
[ApiMember]
public virtual string Platform { get; set; }
///<summary>
///Force this file to be returned as a thumbnail (small)
///</summary>
[ApiMember(Description="Force this file to be returned as a thumbnail (small)")]
public virtual bool Thumbnail { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /image HTTP/1.1 Host: returnit-api-dev.happen.zone Accept: application/json