1.1.20 • Published 5 years ago

saramjs v1.1.20

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
5 years ago

Build Status npm

SaramJs

The node library to interact with Saram. Both Typescript and Javascipt can be used.

This library exports three main classes.

  • Saram
  • SaramInit
  • SaramAPI

The Saram class is primary used to interact with the Saram server, and send it various output from commands run, files read, or script variables. This class simplifies the use of the Saram API.

The SaramInit class is purely intended to set the .saram.conf file which all modules of Saram relies on.

The SaramAPI class exposes the entire Saram API to be used programmatically.

Installation

npm i saramjs --save

Usage

Before use

saramJs relies of obtaining the API key and username from a local config file. To set up this config file, use:

const {SaramInit} = require('saramjs')
SaramInit('yourApiKey').init()

This will create the local creds file for you. Optionally, pass base_url or local to true modify the base url that is set.

Javascript

// require Saram
const {Saram} = require('saramjs')
// Initialize a new Saram instance
const saram = new saramJs.Saram('someToken')

// Call any avaialble methods using 
saram.methodName() 
// Example: This will read the script itself and send to the server
saram.readScriptSelf().send()

Typescript

// Only difference between TS and JS is how it is imported
import { Saram } from 'saramjs'

Docs

Docs are available here To generate docs using Typedoc, use

npm run docs
1.1.20

5 years ago

1.1.19

5 years ago

1.1.18

5 years ago

1.1.17

5 years ago

1.1.16

5 years ago

1.1.15

5 years ago

1.1.14

5 years ago

1.1.13

5 years ago

1.1.11

5 years ago

1.1.10

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago