| GET | /v2/collections/list |
|---|
namespace Booklinker.API.ServiceModel.V2.Requests
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<DataContract>]
[<AllowNullLiteral>]
type V2BaseResponse() =
[<DataMember(Name="responseStatus")>]
member val ResponseStatus:ResponseStatus = null with get,set
[<DataContract>]
[<AllowNullLiteral>]
type V2PageObject() =
[<DataMember(Name="offset")>]
member val Offset:Int32 = new Int32() with get,set
[<DataMember(Name="limit")>]
member val Limit:Int32 = new Int32() with get,set
[<DataMember(Name="totalRecords")>]
member val TotalRecords:Int32 = new Int32() with get,set
[<DataContract>]
[<AllowNullLiteral>]
type V2PaginatedBaseResponse() =
inherit V2BaseResponse()
[<DataMember(Name="page")>]
member val Page:V2PageObject = null with get,set
[<DataContract>]
[<AllowNullLiteral>]
type GetCollectionsResponse() =
inherit V2PaginatedBaseResponse()
[<DataContract>]
[<AllowNullLiteral>]
type V2BaseRequest() =
class end
[<DataContract>]
[<AllowNullLiteral>]
type V2PaginatedBaseRequest() =
inherit V2BaseRequest()
[<DataMember(Name="offset")>]
member val Offset:Int32 = new Int32() with get,set
[<DataMember(Name="limit")>]
member val Limit:Int32 = new Int32() with get,set
[<DataContract>]
[<AllowNullLiteral>]
type V2ListRequest() =
inherit V2PaginatedBaseRequest()
[<DataMember(Name="ids")>]
member val Ids:ResizeArray<String> = null with get,set
[<DataContract>]
[<AllowNullLiteral>]
type GetCollectionsRequest() =
inherit V2ListRequest()
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v2/collections/list HTTP/1.1 Host: api.booklinker.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
page:
{
offset: 0,
limit: 0,
totalRecords: 0
},
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}