| GET | /v1/links/list |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
@DataContract
public static class GetLinksRequest extends PaginatedBaseRequest
{
@DataMember(Name="ids")
@SerializedName("ids")
public ArrayList<String> ids = null;
public ArrayList<String> getIds() { return ids; }
public GetLinksRequest setIds(ArrayList<String> value) { this.ids = value; return this; }
}
@DataContract
public static class PaginatedBaseRequest
{
@DataMember(Name="skip")
@SerializedName("skip")
public Integer skip = null;
@DataMember(Name="take")
@SerializedName("take")
public Integer take = null;
public Integer getSkip() { return skip; }
public PaginatedBaseRequest setSkip(Integer value) { this.skip = value; return this; }
public Integer getTake() { return take; }
public PaginatedBaseRequest setTake(Integer value) { this.take = value; return this; }
}
@DataContract
public static class GetLinksResponse
{
@DataMember(Name="allLinksLoaded")
@SerializedName("allLinksLoaded")
public Boolean allLinksLoaded = null;
@DataMember(Name="results")
@SerializedName("results")
public ArrayList<LinkResult> results = null;
@DataMember(Name="responseStatus")
@SerializedName("responseStatus")
public ResponseStatus responseStatus = null;
public Boolean isAllLinksLoaded() { return allLinksLoaded; }
public GetLinksResponse setAllLinksLoaded(Boolean value) { this.allLinksLoaded = value; return this; }
public ArrayList<LinkResult> getResults() { return results; }
public GetLinksResponse setResults(ArrayList<LinkResult> value) { this.results = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public GetLinksResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
@DataContract
public static class LinkResult
{
@DataMember(Name="baseCode")
@SerializedName("baseCode")
public String baseCode = null;
@DataMember(Name="url")
@SerializedName("url")
public String url = null;
@DataMember(Name="originalUrl")
@SerializedName("originalUrl")
public String originalUrl = null;
@DataMember(Name="imageUrl")
@SerializedName("imageUrl")
public String imageUrl = null;
@DataMember(Name="retailer")
@SerializedName("retailer")
public String retailer = null;
@DataMember(Name="title")
@SerializedName("title")
public String title = null;
@DataMember(Name="author")
@SerializedName("author")
public String author = null;
public String getBaseCode() { return baseCode; }
public LinkResult setBaseCode(String value) { this.baseCode = value; return this; }
public String getUrl() { return url; }
public LinkResult setUrl(String value) { this.url = value; return this; }
public String getOriginalUrl() { return originalUrl; }
public LinkResult setOriginalUrl(String value) { this.originalUrl = value; return this; }
public String getImageUrl() { return imageUrl; }
public LinkResult setImageUrl(String value) { this.imageUrl = value; return this; }
public String getRetailer() { return retailer; }
public LinkResult setRetailer(String value) { this.retailer = value; return this; }
public String getTitle() { return title; }
public LinkResult setTitle(String value) { this.title = value; return this; }
public String getAuthor() { return author; }
public LinkResult setAuthor(String value) { this.author = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/links/list HTTP/1.1 Host: api.booklinker.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetLinksResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Booklinker.API.ServiceModel.V1.Responses">
<allLinksLoaded>false</allLinksLoaded>
<responseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</responseStatus>
<results xmlns:d2p1="http://schemas.datacontract.org/2004/07/Booklinker.API.ServiceModel.DTOs.Shortlinks">
<d2p1:LinkResult>
<d2p1:author>String</d2p1:author>
<d2p1:baseCode>String</d2p1:baseCode>
<d2p1:imageUrl>String</d2p1:imageUrl>
<d2p1:originalUrl>String</d2p1:originalUrl>
<d2p1:retailer>String</d2p1:retailer>
<d2p1:title>String</d2p1:title>
<d2p1:url>String</d2p1:url>
</d2p1:LinkResult>
</results>
</GetLinksResponse>