@space-cow-media/spellbook-client
Version:
An Open Api generated client for the Commander Spellbook backend REST API.
61 lines • 1.88 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: 4.8.19
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfTemplate = instanceOfTemplate;
exports.TemplateFromJSON = TemplateFromJSON;
exports.TemplateFromJSONTyped = TemplateFromJSONTyped;
exports.TemplateToJSON = TemplateToJSON;
exports.TemplateToJSONTyped = TemplateToJSONTyped;
/**
* Check if a given object implements the Template interface.
*/
function instanceOfTemplate(value) {
if (!('id' in value) || value['id'] === undefined)
return false;
if (!('name' in value) || value['name'] === undefined)
return false;
if (!('scryfallQuery' in value) || value['scryfallQuery'] === undefined)
return false;
if (!('scryfallApi' in value) || value['scryfallApi'] === undefined)
return false;
return true;
}
function TemplateFromJSON(json) {
return TemplateFromJSONTyped(json, false);
}
function TemplateFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'scryfallQuery': json['scryfallQuery'],
'scryfallApi': json['scryfallApi'],
};
}
function TemplateToJSON(json) {
return TemplateToJSONTyped(json, false);
}
function TemplateToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'name': value['name'],
'scryfallQuery': value['scryfallQuery'],
};
}
//# sourceMappingURL=template.js.map