Constructor
new File(API)
Parameters:
Name |
Type |
Description |
API |
ApiOptions
|
options object |
- Source:
Extends
Methods
(async) add(path, optionsopt)
Add a file local to the Textile node into the node.
NOTE: Files API does not currently have options for adding; so we are
falling back to the CLI for the time being.
Parameters:
Name |
Type |
Attributes |
Description |
path |
string
|
|
File path to add |
options |
object
|
<optional>
|
Additional options to pass in as headers
Properties
Name |
Type |
Attributes |
Description |
thread |
string
|
<optional>
|
Thread ID of which to add the file |
caption |
string
|
<optional>
|
Caption to add to the file object |
group |
string
|
<optional>
|
Group of which to add the file object |
|
- 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: