biojs-rest-tessapi
Version:
API client to interface with the TeSS Rest API. Retrieve a list of metedata about upcoming Life science events, training materials, and other training opportunities. Return results filtered by metadata facets
146 lines (123 loc) • 5.07 kB
JavaScript
/**
* TeSS API
* Access, search and filter through collections of training materials, events, packages, and workflows in TeSS. As a rule of thumb - You can add .json to the end of most pages to retrieve the data in a common exchange format. e.g - https://tess.elixir-europe.org/events/software-carpentry-west-virginia-university.json - https://tess.elixir-europe.org/materials/rna-seq-de-novo-transcriptome-reconstruction-with-rna-seq.json - https://tess.elixir-europe.org/packages/biocomp-computing-skills-collection.json - https://tess.elixir-europe.org/workflows/das-internet-fur-biologen.json - https://tess.elixir-europe.org/nodes/united-kingdom.json
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.TeSsApi) {
root.TeSsApi = {};
}
root.TeSsApi.ShortMaterial = factory(root.TeSsApi.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The ShortMaterial model module.
* @module model/ShortMaterial
* @version 1.0.0
*/
/**
* Constructs a new <code>ShortMaterial</code>.
* @alias module:model/ShortMaterial
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>ShortMaterial</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ShortMaterial} obj Optional instance to populate.
* @return {module:model/ShortMaterial} The populated <code>ShortMaterial</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'Number');
}
if (data.hasOwnProperty('title')) {
obj['title'] = ApiClient.convertToType(data['title'], 'String');
}
if (data.hasOwnProperty('url')) {
obj['url'] = ApiClient.convertToType(data['url'], 'String');
}
if (data.hasOwnProperty('short_description')) {
obj['short_description'] = ApiClient.convertToType(data['short_description'], 'String');
}
if (data.hasOwnProperty('doi')) {
obj['doi'] = ApiClient.convertToType(data['doi'], 'String');
}
if (data.hasOwnProperty('remote_updated_date')) {
obj['remote_updated_date'] = ApiClient.convertToType(data['remote_updated_date'], 'Date');
}
if (data.hasOwnProperty('remote_created_date')) {
obj['remote_created_date'] = ApiClient.convertToType(data['remote_created_date'], 'Date');
}
}
return obj;
}
/**
* The ID given by TeSS to the material
* @member {Number} id
*/
exports.prototype['id'] = undefined;
/**
* The title of the training material.
* @member {String} title
*/
exports.prototype['title'] = undefined;
/**
* The API URL of the material within TeSS e.g. https://tess.elixir-europe.org/materials/3-day-hands-on-ngs-workshop.json - Go here to find out more about this particular material.
* @member {String} url
*/
exports.prototype['url'] = undefined;
/**
* This should be a short description of the training material. Lengths vary but on average it is around 2-3 sentences.
* @member {String} short_description
*/
exports.prototype['short_description'] = undefined;
/**
* This is the DOI of the material where it can be permanently referenced
* @member {String} doi
*/
exports.prototype['doi'] = undefined;
/**
* When it was last updated in TeSS
* @member {Date} remote_updated_date
*/
exports.prototype['remote_updated_date'] = undefined;
/**
* When it was first created in TeSS
* @member {Date} remote_created_date
*/
exports.prototype['remote_created_date'] = undefined;
return exports;
}));