@plasma-platform/tm-service-api v2.5.0
TM Micro Service API Prototype class
This class provide fetch wrapper, token and Service URL setter mainly. Just to avoid code duplication.
Requirements
Possibly you will need babel-polyfill to use it.
Documentation
Table of Contents
ErrorBadRequest
Custom error message for Bad Request server response
Parameters
message(string | null) error details (optional, defaultnull)
ErrorCache
Custom error message for cache fail
Parameters
message(string | null) error details (optional, defaultnull)
ErrorNotFound
Custom error message for Not Found server response
Parameters
message(string | null) error details (optional, defaultnull)
ErrorServerResponse
Custom error message for abstract server response
Parameters
statusCodenumber http status codestatusTextstring http status code textmessage(string | null) error details (optional, defaultnull)
TMMicroServiceAPI
TM Micro Service Proto API
Parameters
urlstring service urltoken(string | null) user access tocken if available (optional, defaultnull)
url
Service URL
Properties
servicestring url
token
User access token
Properties
token(string | null)? user access tocken if available
messages
Object with class service messages
setToken
Set access token
Parameters
tokenstring access token
setVersion
Set service version
Parameters
versionstring service version
checkVersion
Validate service version
Parameters
versionstring service version
- Throws Error if URL do not match format Error will be thrown
Returns string version - service version
request
Fetch remote resource
Parameters
Returns Promise Promise with server Response
tmpVersion
Service version
Properties
versionstring? service version
2 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago