Skip to content

Latest commit

 

History

History
128 lines (90 loc) · 5.1 KB

MaterialsApi.md

File metadata and controls

128 lines (90 loc) · 5.1 KB

TessJsonApi.MaterialsApi

All URIs are relative to https://tess.elixir-europe.org

Method HTTP request Description
materialsGet GET /materials
materialsSlugGet GET /materials/{slug}

materialsGet

MaterialCollection materialsGet(opts)

Example

import TessJsonApi from 'tess_json_api';

let apiInstance = new TessJsonApi.MaterialsApi();
let opts = {
  'q': "q_example", // String | Search keywords.
  'pageNumber': 1, // Number | The page of the collection to view.
  'pageSize': 30, // Number | The number of results to return per page.
  'sort': "sort_example", // String | Sort order:  * default - sort by date (for Events), sort by number of resources (for Content Providers) otherwise sort by title (default).  * new - Sort by when the entry was created.  * mod - Sort by when the entry was last modified.  * rel - Sort by search query relevance.  * early - Sort by date, earliest to latest (Events only).  * late - Sort by date, latest to earliest (Events only). 
  'authors': ["null"], // [String] | Filter by author.
  'contentProvider': ["null"], // [String] | Filter by content provider name.
  'contributors': ["null"], // [String] | Filter by contributor.
  'difficultyLevel': ["null"], // [String] | Filter by difficulty level.
  'keywords': ["null"], // [String] | Filter by keywords.
  'licence': ["null"], // [String] | Filter by licence. See http://licenses.opendefinition.org/licenses/groups/all.json
  'node': ["null"], // [String] | Filter by ELIXIR node name.
  'scientificTopics': ["null"], // [String] | Filter by scientific topics.
  'operations': ["null"], // [String] | Filter by operations.
  'targetAudience': ["null"], // [String] | Filter by who the intended target audience is.
  'tools': ["null"], // [String] | Filter by what tools are involved.
  'resourceType': ["null"] // [String] | Filter by resource type, e.g. \"Lecture\" etc.
};
apiInstance.materialsGet(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
q String Search keywords. [optional]
pageNumber Number The page of the collection to view. [optional] [default to 1]
pageSize Number The number of results to return per page. [optional] [default to 30]
sort String Sort order: * default - sort by date (for Events), sort by number of resources (for Content Providers) otherwise sort by title (default). * new - Sort by when the entry was created. * mod - Sort by when the entry was last modified. * rel - Sort by search query relevance. * early - Sort by date, earliest to latest (Events only). * late - Sort by date, latest to earliest (Events only). [optional]
authors [String] Filter by author. [optional]
contentProvider [String] Filter by content provider name. [optional]
contributors [String] Filter by contributor. [optional]
difficultyLevel [String] Filter by difficulty level. [optional]
keywords [String] Filter by keywords. [optional]
licence [String] Filter by licence. See http://licenses.opendefinition.org/licenses/groups/all.json [optional]
node [String] Filter by ELIXIR node name. [optional]
scientificTopics [String] Filter by scientific topics. [optional]
operations [String] Filter by operations. [optional]
targetAudience [String] Filter by who the intended target audience is. [optional]
tools [String] Filter by what tools are involved. [optional]
resourceType [String] Filter by resource type, e.g. "Lecture" etc. [optional]

Return type

MaterialCollection

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json

materialsSlugGet

Material materialsSlugGet(slug)

Example

import TessJsonApi from 'tess_json_api';

let apiInstance = new TessJsonApi.MaterialsApi();
let slug = "slug_example"; // String | The _slug_ id of a material e.g. python-tutorial
apiInstance.materialsSlugGet(slug, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
slug String The slug id of a material e.g. python-tutorial

Return type

Material

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json