@space-cow-media/spellbook-client
Version:
An Open Api generated client for the Commander Spellbook backend REST API.
57 lines • 1.89 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* Commander Spellbook API
* API for Commander Spellbook, the combo database engine for Magic: The Gathering
*
* The version of the OpenAPI document: 5.4.10
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { CardDetailFromJSON, CardDetailToJSON, } from './CardDetail.js';
/**
* Check if a given object implements the PaginatedCardDetailList interface.
*/
export function instanceOfPaginatedCardDetailList(value) {
if (!('count' in value) || value['count'] === undefined)
return false;
if (!('next' in value) || value['next'] === undefined)
return false;
if (!('previous' in value) || value['previous'] === undefined)
return false;
if (!('results' in value) || value['results'] === undefined)
return false;
return true;
}
export function PaginatedCardDetailListFromJSON(json) {
return PaginatedCardDetailListFromJSONTyped(json, false);
}
export function PaginatedCardDetailListFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'],
'previous': json['previous'],
'results': (json['results'].map(CardDetailFromJSON)),
};
}
export function PaginatedCardDetailListToJSON(json) {
return PaginatedCardDetailListToJSONTyped(json, false);
}
export function PaginatedCardDetailListToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': (value['results'].map(CardDetailToJSON)),
};
}
//# sourceMappingURL=PaginatedCardDetailList.js.map