Booklinker.API

<back to all web services

GetCollectionRequest

Requires Authentication
The following routes are available for this service:
GET/v2/collections
GET/v2/collections/{Id}
namespace Booklinker.API.ServiceModel.DTOs.V2

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 UserCollection() = 
        [<DataMember(Name="type")>]
        member val Type:String = null with get,set

        [<DataMember(Name="id")>]
        member val Id:String = null with get,set

        [<DataMember(Name="baseCode")>]
        member val BaseCode:String = null with get,set

        [<DataMember(Name="url")>]
        member val Url:String = null with get,set

        [<DataMember(Name="title")>]
        member val Title:String = null with get,set

        [<DataMember(Name="linkIds")>]
        member val LinkIds:IEnumerable<String> = null with get,set

        [<DataMember(Name="collectionSettingsId")>]
        member val CollectionSettingsId:String = null with get,set

    [<DataContract>]
    [<AllowNullLiteral>]
    type GetCollectionResponse() = 
        inherit V2BaseResponse()
        [<DataMember(Name="data")>]
        member val Data:UserCollection = null with get,set

    [<DataContract>]
    [<AllowNullLiteral>]
    type V2BaseRequest() = 
        class end

    [<DataContract>]
    [<AllowNullLiteral>]
    type GetCollectionRequest() = 
        inherit V2BaseRequest()
        [<DataMember(Name="id")>]
        member val Id:String = null with get,set

F# GetCollectionRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v2/collections HTTP/1.1 
Host: api.booklinker.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"data":{"type":"collection","id":"String","baseCode":"String","url":"String","title":"String","collectionSettingsId":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}