0.3.4 • Published 8 years ago

origami-stack-io v0.3.4

Weekly downloads
2
License
ISC
Repository
gitlab
Last release
8 years ago

Origami 2 plugin socket.io helper

constructor

Params:

  • api required: Plugin constructor function.
  • privateKey required: Plugin private key.
  • dependenciesMap optional: An object containing string keys and string values. For example:
{
  "constructorParameterName": "OtherPluginName"
}

A client object will be created, that client will use the same context as the plugin invoked method. Each key like constructorParameterName will be mapped to an API proxy.

  • locals optional: An object containing string keys and string values. For example:
{
  "param1": 1,
  "param2": "another",
  "db": myDb
}
  • events optional:

    Each key like param1 will be set as the value on the constructor of the same name.

An additional constructor will be passed: emit which receives one parameter and broadcast the event to the stack.

.connect

Returns: a Promise to be resolved once connected Params:

It is expected the other end to be using the stack socket.io helper

.listenSocket

Returns: a Promise to be resolved once connected Params:

It is expected the other end to be using the stack socket.io helper

0.3.4

8 years ago

0.3.3

8 years ago

0.3.2

8 years ago

0.2.27

8 years ago

0.1.26

8 years ago

0.1.25

8 years ago

0.1.23

8 years ago

0.1.21

8 years ago

0.1.20

8 years ago

0.1.17

8 years ago

0.1.16

8 years ago

0.1.14

8 years ago

0.1.12

8 years ago

0.1.11

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.0

8 years ago