Socket
Book a DemoInstallSign in
Socket

@plasma-platform/service-api

Package Overview
Dependencies
Maintainers
7
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@plasma-platform/service-api

Common tm microservice api methods

npmnpm
Version
2.5.15
Version published
Weekly downloads
9
Maintainers
7
Weekly downloads
 
Created
Source

version nextVersion downloads license dependency

Full documentation
install:
npm i @plasma-platform/service-api -S

Short documentation

Table of Contents

TMMicroServiceAPI

TM Micro Service Proto API

Parameters

  • url string service url
  • token (string | null) user access token if available (optional, default null)

url

Service URL

Properties

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

setToken

Set access token

Parameters

setTimeOut

Set timeOut

Parameters

  • milliseconds integer milliseconds time

setVersion

Set service version

Parameters

  • version string service version

checkVersion

Validate service version

Parameters

  • version string service version

  • Throws Error if URL do not match format Error will be thrown

Returns string version - service version

request

Fetch remote resource

Parameters

  • url string resource url
  • userOptions Object user defined options

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, default null)

ErrorServerResponse

Custom error message for abstract server response

Parameters

  • statusCode number http status code
  • statusText string http status code text
  • message (string | null) error details (optional, default null)

ErrorBadRequest

Custom error message for Bad Request server response

Parameters

  • message (string | null) error details (optional, default null)

Keywords

TM Micro Service

FAQs

Package last updated on 13 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts