Constructor
new Peer(opts)
Parameters:
Name | Type | Description |
---|---|---|
opts |
ApiOptions | API options object |
- Source:
Extends
Methods
(async) address()
Retrieves the address of the Textile node
- Source:
(async) get()
Retrieve the peer ID of the Textile node
- Source:
(async) ping()
Pings the textile node
- Source:
(async) sendGet(url, args, opts)
Make a get request to the Textile node
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The relative URL of the API endpoint |
args |
Array.<string> | An array of arguments to pass as Textile args headers |
opts |
Object | An object of options to pass as Textile options headers |
- Inherited From:
- Source:
(async) sendPost(url, args, opts, data)
Make a post request to the Textile node
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The relative URL of the API endpoint |
args |
Array.<string> | An array of arguments to pass as Textile args headers |
opts |
Object | An object of options to pass as Textile options headers |
data |
Object | An object of data to post |
- Inherited From:
- Source:
(async) sendPostMultiPart(url, args, opts, data)
Make a post request to the Textile node using a multi-part form
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The relative URL of the API endpoint |
args |
Array.<string> | An array of arguments to pass as Textile args headers |
opts |
Object | An object of options to pass as Textile options headers |
data |
Object | An object of data to post |
- Inherited From:
- Source: