Booklinker.API

<back to all web services

GetLinksRequest

Requires Authentication
The following routes are available for this service:
GET/v1/links/list
namespace Booklinker.API.ServiceModel.DTOs.Shortlinks

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

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

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

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

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

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

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

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

    [<DataContract>]
    [<AllowNullLiteral>]
    type GetLinksResponse() = 
        [<DataMember(Name="allLinksLoaded")>]
        member val AllLinksLoaded:Boolean = new Boolean() with get,set

        [<DataMember(Name="results")>]
        member val Results:ResizeArray<LinkResult> = null with get,set

        [<DataMember(Name="responseStatus")>]
        member val ResponseStatus:ResponseStatus = null with get,set

    [<DataContract>]
    [<AllowNullLiteral>]
    type PaginatedBaseRequest() = 
        [<DataMember(Name="skip")>]
        member val Skip:Int32 = new Int32() with get,set

        [<DataMember(Name="take")>]
        member val Take:Int32 = new Int32() with get,set

    [<DataContract>]
    [<AllowNullLiteral>]
    type GetLinksRequest() = 
        inherit PaginatedBaseRequest()
        [<DataMember(Name="ids")>]
        member val Ids:ResizeArray<String> = null with get,set

F# GetLinksRequest 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 /v1/links/list HTTP/1.1 
Host: api.booklinker.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"allLinksLoaded":false,"results":[{"baseCode":"String","url":"String","originalUrl":"String","imageUrl":"String","retailer":"String","title":"String","author":"String"}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}