Booklinker.API

<back to all web services

GetCollectionsRequest

Requires Authentication
The following routes are available for this service:
GET/v2/collections/list
"use strict";
export class V2BaseRequest {
    constructor(init) { Object.assign(this, init) }
}
export class V2PaginatedBaseRequest extends V2BaseRequest {
    /** @param {{offset?:number,limit?:number}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {number} */
    offset;
    /** @type {number} */
    limit;
}
export class V2ListRequest extends V2PaginatedBaseRequest {
    /** @param {{ids?:string[],offset?:number,limit?:number}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string[]} */
    ids;
}
export class V2BaseResponse {
    /** @param {{responseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ResponseStatus} */
    responseStatus;
}
export class V2PageObject {
    /** @param {{offset?:number,limit?:number,totalRecords?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    offset;
    /** @type {number} */
    limit;
    /** @type {number} */
    totalRecords;
}
export class V2PaginatedBaseResponse extends V2BaseResponse {
    /** @param {{page?:V2PageObject,responseStatus?:ResponseStatus}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {V2PageObject} */
    page;
}
export class GetCollectionsResponse extends V2PaginatedBaseResponse {
    /** @param {{page?:V2PageObject,responseStatus?:ResponseStatus}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
}
export class GetCollectionsRequest extends V2ListRequest {
    /** @param {{ids?:string[],offset?:number,limit?:number}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
}

JavaScript GetCollectionsRequest DTOs

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

HTTP + 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
		}
	}
}