foliolib.folio.api.kbEbscoJava.CustomLabels
- class foliolib.folio.api.kbEbscoJava.CustomLabels(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApimod-kb-ebsco-java
Implements the eholdings interface using EBSCO KB as backend.
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
Get a list of custom labels.
get_customLabels_by_kbCredential(kbCredentialsId)Get a custom labels related to specific KB credentials
modify_customLabel(kbCredentialsId, customLabel)Update a list of custom labels.
- get_customLabels()
Get a list of custom labels.
GET /eholdings/custom-labels- Returns
See Schema below
- Return type
dict
- Raises
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Custom Labels Collection Schema", "description": "Custom Labels Collection Schema", "javaType": "org.folio.rest.jaxrs.model.CustomLabelsCollection", "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "description": "List of custom labels", "items": { "type": "object", "$ref": "customLabel.json" } }, "meta": { "type": "object", "description": "metadata containing total results in packages collection", "$ref": "../metaTotalResults.json" }, "jsonapi": { "type": "object", "description": "version of json api", "$ref": "../jsonapi.json" } }, "required": [ "data", "meta", "jsonapi" ] }
- get_customLabels_by_kbCredential(kbCredentialsId: str)
Get a custom labels related to specific KB credentials
GET /eholdings/kb-credentials/{kbCredentialsId}/custom-labels- Parameters
kbCredentialsId (str) –
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Custom Labels Collection Schema", "description": "Custom Labels Collection Schema", "javaType": "org.folio.rest.jaxrs.model.CustomLabelsCollection", "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "description": "List of custom labels", "items": { "type": "object", "$ref": "customLabel.json" } }, "meta": { "type": "object", "description": "metadata containing total results in packages collection", "$ref": "../metaTotalResults.json" }, "jsonapi": { "type": "object", "description": "version of json api", "$ref": "../jsonapi.json" } }, "required": [ "data", "meta", "jsonapi" ] }
- modify_customLabel(kbCredentialsId: str, customLabel: dict)
Update a list of custom labels.
PUT /eholdings/kb-credentials/{kbCredentialsId}/custom-labels- Parameters
kbCredentialsId (str) –
customLabel (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Custom Label PUT Request Schema", "description": "Custom Label PUT Request Schema", "javaType": "org.folio.rest.jaxrs.model.CustomLabelsPutRequest", "type": "object", "additionalProperties": false, "properties": { "data": { "description": "List of custom labels put request", "type": "array", "items": { "type": "object", "$ref": "customLabel.json" } } }, "required": [ "data" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Custom Labels Collection Schema", "description": "Custom Labels Collection Schema", "javaType": "org.folio.rest.jaxrs.model.CustomLabelsCollection", "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "description": "List of custom labels", "items": { "type": "object", "$ref": "customLabel.json" } }, "meta": { "type": "object", "description": "metadata containing total results in packages collection", "$ref": "../metaTotalResults.json" }, "jsonapi": { "type": "object", "description": "version of json api", "$ref": "../jsonapi.json" } }, "required": [ "data", "meta", "jsonapi" ] }