@plasma-platform/service-api
v2.6.0
Published
Common tm microservice api methods
Downloads
204
Readme
Full documentation
install:npm i @plasma-platform/service-api -S
Short documentation
Table of Contents
- TMMicroServiceAPI
- url
- token
- timeOut
- timeOutObjects
- messages
- setUrl
- setToken
- setTimeOut
- setVersion
- checkVersion
- request
- tmpVersion
- ErrorNotFound
- ErrorServerResponse
- ErrorBadRequest
TMMicroServiceAPI
TM Micro Service Proto API
Parameters
url
Service URL
Properties
service
string url
token
User access token
Properties
token
(string | null)? user access token if available
timeOut
timeOut for request
Properties
timeOutObjects
timeOutObjects container for timeouts
Properties
timeOut
object? container for timeouts
messages
Object with class service messages
Type: Object
setUrl
Set url
Parameters
url
string
setToken
Set access token
Parameters
token
string access token
setTimeOut
Set timeOut
Parameters
milliseconds
integer milliseconds time
setVersion
Set service version
Parameters
version
string service version
checkVersion
Validate service version
Parameters
Returns string version - service version
request
Fetch remote resource
Parameters
Returns Promise Promise with server Response
tmpVersion
Service version
Properties
version
string? service version
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
statusCode
number http status codestatusText
string http status code textmessage
(string | null) error details (optional, defaultnull
)
ErrorBadRequest
Custom error message for Bad Request server response
Parameters
message
(string | null) error details (optional, defaultnull
)