foliolib.folio.api.kbEbscoJava.Providers
- class foliolib.folio.api.kbEbscoJava.Providers(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_packages_by_provider(providerId, **kwargs)Search within a list of packages associated with a given provider.
get_provider(providerId, **kwargs)Get provider given providerId
get_providers(**kwargs)Get a list of providers based on the search query.
modify_provider(providerId, provider)Update proxy and token information for a given provider Id.
modify_tag(providerId, tag)Update tags assigned to provider
- get_packages_by_provider(providerId: str, **kwargs)
Search within a list of packages associated with a given provider.
GET /eholdings/providers/{providerId}/packages- Parameters
providerId (str) –
**kwargs (properties) – Keyword Arguments
- Keyword Arguments
q (str) –
String used to search to retrieve a collection
Example
ABC-CLIO
filter[tags] (list) – Filter to narrow down results based on assigned tags. Contains list of required tags.
filter[access-type] (list) – Filter to narrow down results based on assigned access type.
filter[selected] (str) –
Filter to narrow down results based on selection status. Possible values are all, true, false, ebsco.
Example
all
filter[type] (str) –
(default=all) Filter to narrow down results based on content type. Defaults to all. Possible values are all, aggregatedfulltext, abstractandindex, ebook, ejournal, print, unknown, streamingmedia, mixedcontent, onlinereference.
Example
ebook
sort (str) – (default=relevance) Option by which results are sorted. Possible values are name, relevance.
page (int) –
(default=1) Page number
Example
1
count (int) –
(default=<<defaultCountValue>>) Page size
Example
100
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestNotFound – Not Found
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Package Collection Schema", "description": "Package Collection Schema", "javaType": "org.folio.rest.jaxrs.model.PackageCollection", "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "description": "List of packages", "items": { "type": "object", "$ref": "packageCollectionItem.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", "jsonapi" ] }
- get_provider(providerId: str, **kwargs)
Get provider given providerId
GET /eholdings/providers/{providerId}- Parameters
providerId (str) –
**kwargs (properties) – Keyword Arguments
- Keyword Arguments
include (str) –
Name of nested resource to include
Example
packages
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Provider Object Schema", "description": "Provider Schema", "javaType": "org.folio.rest.jaxrs.model.Provider", "type": "object", "additionalProperties": false, "properties": { "data": { "type": "object", "description": "Provider Data", "$ref": "providerData.json" }, "included": { "type": "array", "description": "List of packages for a given provider", "items": { "type": "object", "$ref": "../packages/packageCollectionItem.json" } }, "jsonapi": { "type": "object", "description": "json api", "$ref": "../jsonapi.json" } }, "required": [ "data", "jsonapi" ] }
- get_providers(**kwargs)
Get a list of providers based on the search query.
GET /eholdings/providers- Parameters
**kwargs (properties) – Keyword Arguments
- Keyword Arguments
q (str) –
String used to search to retrieve a collection
Example
ABC-CLIO
filter[tags] (list) – Filter to narrow down results based on assigned tags. Contains list of required tags.
sort (str) – (default=relevance) Option by which results are sorted. Possible values are name, relevance.
page (int) –
(default=1) Page number
Example
1
count (int) –
(default=<<defaultCountValue>>) Page size
Example
100
- Returns
See Schema below
- Return type
dict
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Provider Collection Schema", "description": "Provider Collection Schema", "javaType": "org.folio.rest.jaxrs.model.ProviderCollection", "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "description": "List of providers", "items": { "type": "object", "$ref": "providers.json" } }, "meta": { "type": "object", "description": "metadata containing total results in providers collection", "$ref": "../metaTotalResults.json" }, "jsonapi": { "type": "object", "description": "version of json api", "$ref": "../jsonapi.json" } }, "required": [ "data" ] }
- modify_provider(providerId: str, provider: dict)
Update proxy and token information for a given provider Id.
PUT /eholdings/providers/{providerId}- Parameters
providerId (str) –
provider (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Provider Put Request Schema", "description": "Provider Put Request Schema using JSON API", "javaType": "org.folio.rest.jaxrs.model.ProviderPutRequest", "type": "object", "additionalProperties": false, "properties": { "data": { "type": "object", "description": "Data object of provider put request", "$ref": "providerPutData.json" } }, "required": [ "data" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Provider Object Schema", "description": "Provider Schema", "javaType": "org.folio.rest.jaxrs.model.Provider", "type": "object", "additionalProperties": false, "properties": { "data": { "type": "object", "description": "Provider Data", "$ref": "providerData.json" }, "included": { "type": "array", "description": "List of packages for a given provider", "items": { "type": "object", "$ref": "../packages/packageCollectionItem.json" } }, "jsonapi": { "type": "object", "description": "json api", "$ref": "../jsonapi.json" } }, "required": [ "data", "jsonapi" ] }
- modify_tag(providerId: str, tag: dict)
Update tags assigned to provider
PUT /eholdings/providers/{providerId}/tags- Parameters
providerId (str) –
tag (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Provider Tags PUT Request Schema", "description": "Provider Tags PUT Request Schema using JSON API", "javaType": "org.folio.rest.jaxrs.model.ProviderTagsPutRequest", "type": "object", "additionalProperties": false, "properties": { "data": { "description": "Data object of provider tags put request", "type": "object", "$ref": "providerTagsPutData.json" } }, "required": [ "data" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Provider Tags object schema", "description": "Provider Tags object schema", "javaType": "org.folio.rest.jaxrs.model.ProviderTags", "type": "object", "additionalProperties": false, "properties": { "data": { "type": "object", "description": "The Data Schema", "$ref": "providerTagsItem.json" }, "jsonapi": { "type": "object", "description": "version of json api", "$ref": "../jsonapi.json" } }, "required": [ "data", "jsonapi" ] }