Skip to content

farnsworth2008/moar-rpc-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Classes

Client

Client for JSON/REST/RPC over http with AWS4 signatures

Typedefs

CallResult : CallResultArray

Map of s for the associated calls

CallResultArray
CallStructure : CallResultArray

A structure with method names and their associated parameters.

Each result is an for the associated call key.

Client

Client for JSON/REST/RPC over http with AWS4 signatures

Kind: global class

new Client(host, keys)

Create client for a host

Param Type Description
host string Host name
keys Credentials Optional credentials for AWS4 signing

Example

const client = new Client('api.moarhealth.com')
client.call({
    greeting: "Mark",
    initialize: { "some": "stuff" }
}).then(results => {
     console.log(`Result for greeting was ${results.greeting}`)
     console.log(`Result for initialize was ${results.initialize}`)
})

client.call(structures) ⇒ CallResult

Call one or more methods

Kind: instance method of Client
Returns: CallResult - A promise to produce

Param Type Description
structures CallStructure Structure for the calls the client will make.

CallResult : CallResultArray

Map of s for the associated calls

Kind: global typedef

CallResultArray

Kind: global typedef
Properties

Name Type Description
0 object Error object
1 object Data object

CallStructure : CallResultArray

A structure with method names and their associated parameters.

Each result is an for the associated call key.

Kind: global typedef

About

RPC Client for JSON/REST over http with AWS4 signatures

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published