| GET | /v2/collections/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.*
@DataContract
open class GetCollectionsRequest : V2ListRequest()
{
}
@DataContract
open class V2ListRequest : V2PaginatedBaseRequest()
{
@DataMember(Name="ids")
@SerializedName("ids")
open var ids:ArrayList<String>? = null
}
@DataContract
open class V2PaginatedBaseRequest : V2BaseRequest()
{
@DataMember(Name="offset")
@SerializedName("offset")
open var offset:Int? = null
@DataMember(Name="limit")
@SerializedName("limit")
open var limit:Int? = null
}
@DataContract
open class V2BaseRequest
{
}
@DataContract
open class GetCollectionsResponse : V2PaginatedBaseResponse(), IGetCollectionsResponse
{
}
@DataContract
open class V2PaginatedBaseResponse : V2BaseResponse()
{
@DataMember(Name="page")
@SerializedName("page")
open var page:V2PageObject? = null
}
@DataContract
open class V2BaseResponse
{
@DataMember(Name="responseStatus")
@SerializedName("responseStatus")
open var responseStatus:ResponseStatus? = null
}
@DataContract
open class V2PageObject
{
@DataMember(Name="offset")
@SerializedName("offset")
open var offset:Int? = null
@DataMember(Name="limit")
@SerializedName("limit")
open var limit:Int? = null
@DataMember(Name="totalRecords")
@SerializedName("totalRecords")
open var totalRecords:Int? = null
}
Kotlin GetCollectionsRequest DTOs
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
}
}
}