Skip to content

talkops/sdk-nodejs

Repository files navigation

TalkOps SDK: Node.js

This software development kit is made to create TalkOps extensions using Node.js.

Documentation

Table of Contents

Attachment

Extends Link

Represents an attachment.

Parameters

  • url
  • filename

setFilename

Parameters
  • filename String The filename of the attachment.
  • Throws TypeError If the filename is not valid.

Returns Attachment The updated attachment instance.

Extension

Represents an extension.

start

Returns Extension The starting extension instance.

on

Parameters

Returns Extension The updated extension instance.

isEnabled

Returns Boolean If the extension is enabled.

setDemo

Parameters
  • demo Boolean If the extension is a demonstration.

Returns Extension The updated extension instance.

setName

Parameters
  • name String The name of the extension.

Returns Extension The updated extension instance.

setIcon

Parameters
  • icon String The icon url of the extension.

Returns Extension The updated extension instance.

setWebsite

Parameters
  • website String The website url of the extension.

Returns Extension The updated extension instance.

setCategory

Parameters
  • category String The category of the extension.

Returns Extension The updated extension instance.

setFeatures

Parameters
  • features Array<String> The features of the extension.

Returns Extension The updated extension instance.

setinstallationSteps

Parameters
  • installationSteps Array<String> The installation steps of the extension.

Returns Extension The updated extension instance.

setParameters

Parameters

Returns Extension The updated extension instance.

setInstructions

Parameters
  • instructions String The instructions of the extension.

Returns Extension The updated extension instance.

setFunctionSchemas

Parameters
  • functionSchemas Array<Object> The function schemas of the extension.

Returns Extension The updated extension instance.

setFunctions

Parameters

Returns Extension The updated extension instance.

enableAlarm

Enables alarm.

sendMedias

Send one or more medias.

Parameters

sendMessage

Send a message.

Parameters
  • text String The text of the message.

sendNotification

Send a notification.

Parameters
  • text String The text of the notification.

Image

Extends Link

Represents an image.

Link

Extends Media

Represents a link.

Parameters

  • url

setUrl

Parameters
  • url String The url of the link.
  • Throws TypeError If the url is not a valid URL.

Returns Link The updated link instance.

Media

Represents a media.

Parameter

Represents a parameter.

Parameters

  • name String The name of the parameter.

getName

Returns String The name of the parameter.

setOptional

Parameters
  • optional Boolean If the parameter is optional.

Returns Parameter The updated parameter instance.

isOptional

Returns Boolean If the parameter is optional.

setDescription

Parameters
  • description String The description of the parameter.

Returns Parameter The updated parameter instance.

setDefaultValue

Parameters
  • defaultValue String The default value of the parameter.

Returns Parameter The updated parameter instance.

setType

Parameters
  • type String The type of the parameter.

Returns Parameter The updated parameter instance.

getValue

Returns String The value of the parameter.

setValue

Parameters
  • value String The value of the parameter.

Returns Parameter The updated parameter instance.

hasValue

Returns Boolean If the parameter is not empty.

setAvailableValues

Parameters
  • availableValues Array<String> The available values of the parameter.

Returns Parameter The updated parameter instance.

setPossibleValues

Parameters
  • possibleValues Array<String> The possible values of the parameter.

Returns Parameter The updated parameter instance.

Video

Extends Link

Represents an video.

About

TalkOps Node.js SDK

Topics

Resources

License

Stars

Watchers

Forks