new OIPAPI(settingsopt) → {Index}
Spawn a new OIP Index with a specific OIPd URL
Parameters:
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
settings |
Object |
<optional> |
The Settings to use for the Index Properties
|
- Source:
Returns:
- Type:
- Index
Methods
(async) get041Artifact(txid) → {Promise.<Object>}
Get an OIP041 Artifact from the Index by TXID
Parameters:
Name | Type | Description |
---|---|---|
txid |
string |
transaction id of the artifact you wish to retrieve |
Example
//return example
{success: true, artifact: Artifact}
//or error
{success: false, error: error}
Returns:
Returns a Promise that will resolve to an Artifact or an object containing an error
- Type:
- Promise.<Object>
(async) get041Artifacts(txids) → {Promise.<Object>}
Get multiple OIP041 Artifacts by their TXID
Parameters:
Name | Type | Description |
---|---|---|
txids |
Array.<string> |
an array of transaction IDs |
Example
//return example
{success: true, artifacts: artifacts>}
//or error
{success: false, error: error}
Returns:
- Type:
- Promise.<Object>
(async) getAlexandriaMediaArtifact(txid) → {Promise.<Object>}
Get an Alexandria Media Artifact from the Index by TXID
Parameters:
Name | Type | Description |
---|---|---|
txid |
string |
transaction id of the artifact you wish to retrieve |
Example
//return example
{success: true, artifact: Artifact}
//or error
{success: false, error: error}
Returns:
Returns a Promise that will resolve to an Artifact or an object containing an error
- Type:
- Promise.<Object>
(async) getAlexandriaMediaArtifacts(txids) → {Promise.<Object>}
Get one or more Alexandria Media Artifacts by their TXID
Parameters:
Name | Type | Description |
---|---|---|
txids |
Array.<string> |
an array of transaction IDs |
Example
//return example
{success: true, artifacts: artifacts}
//or error
{success: false, error: error}
Returns:
- Type:
- Promise.<Object>
(async) getArtifact(txid) → {Promise.<Object>}
Get an Artifact from the Index by TXID
Parameters:
Name | Type | Description |
---|---|---|
txid |
string |
transaction id of the artifact you wish to retrieve |
Example
//return example
{success: true, artifact: Artifact}
//or error
{success: false, error: error}
Returns:
Returns a Promise that will resolve to an Artifact or an object containing an error
- Type:
- Promise.<Object>
(async) getArtifacts(txids) → {Promise.<Object>}
Get multiple Artifacts by their TXID
Parameters:
Name | Type | Description |
---|---|---|
txids |
Array.<string> |
an array of transaction IDs |
Example
//return example
{success: true, artifacts: artifacts>}
//or error
{success: false, error: error}
Returns:
- Type:
- Promise.<Object>
(async) getFloData(txid)
Get floData by TXID
Parameters:
Name | Type | Description |
---|---|---|
txid |
string |
the transaction id you wish to grab the floData from |
(async) getHistorianData(txid) → {Promise.<Object>}
Get a historian data point by its txid
Parameters:
Name | Type | Description |
---|---|---|
txid |
string |
Returns:
- Type:
- Promise.<Object>
(async) getLastestHistorianData(limitopt) → {Promise.<{Object}>}
Get the latest historian data points
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
limit |
number |
<optional> |
100 |
- Source:
Returns:
- Type:
- Promise.<{Object}>
(async) getLatest041Artifacts(limitopt, nsfwopt) → {Promise.<Object>}
Get the Latest OIP041 Artifacts published to the Index
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
limit |
number |
<optional> |
100 |
The amount of artifacts you want returns ( max: 1000 ) |
nsfw |
boolean |
<optional> |
false |
not safe for work artifacts (don't be sick!) |
- Source:
Example
//return example
{success: true, artifacts: Array.<Artifact>}
//or error
{success: false, error: error}
Returns:
- Type:
- Promise.<Object>
(async) getLatest042Artifacts(limitopt, nsfwopt) → {Promise.<Object>}
Get the Latest OIP042 Artifacts published to the Index
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
limit |
number |
<optional> |
100 |
The amount of artifacts you want returns ( max: 1000 ) |
nsfw |
boolean |
<optional> |
false |
not safe for work artifacts (don't be sick!) |
Example
//return example
{success: true, artifacts: Array.<Artifact>}
//or error
{success: false, error: error}
Returns:
- Type:
- Promise.<Object>
(async) getLatestAlexandriaMediaArtifacts(limitopt, nsfwopt) → {Promise.<Object>}
Get the Latest Alexandria Media Artifacts published to the Index
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
limit |
number |
<optional> |
100 |
The amount of artifacts you want returns ( max: 1000 ) |
nsfw |
boolean |
<optional> |
false |
not safe for work artifacts (don't be sick!) |
- Source:
Example
//return example
{success: true, artifacts: Array.<Artifact>}
//or error
{success: false, error: error}
Returns:
- Type:
- Promise.<Object>
(async) getLatestArtifacts(limitopt, nsfwopt) → {Promise.<Object>}
Get the Latest Artifacts published to the Index
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
limit |
number |
<optional> |
100 |
The amount of artifacts you want returns ( max: 1000 ) |
nsfw |
boolean |
<optional> |
false |
not safe for work artifacts (don't be sick!) |
Example
//return example
{success: true, artifacts: Array.<Artifact>}
//or error
{success: false, error: error}
Returns:
- Type:
- Promise.<Object>
(async) getMultipart(txid) → {Promise.<Object>}
Get a Multipart by its TXID
Parameters:
Name | Type | Description |
---|---|---|
txid |
Returns:
- Type:
- Promise.<Object>
(async) getMultiparts(ref, limitopt) → {Promise.<Object>}
Get OIP Multiparts by the First TXID Reference
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
ref |
string |
the TXID reference of the first multipart |
|
limit |
number |
<optional> |
max num of results |
Returns:
- Type:
- Promise.<Object>
(async) getVersion() → {Promise.<Object>}
Get OIP Daemon specs
Returns:
- Type:
- Promise.<Object>
(async) searchArtifacts(query, limitopt) → {Promise.<Object>}
Search The Index for Artifacts that match your search query
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
query |
string |
your search query |
||
limit |
number |
<optional> |
100 |
max num of results |
Returns:
//return example {success: true, artifacts: artifacts, ...}
//or error {success: false, error: error, ...}
- Type:
- Promise.<Object>
(async) searchFloData(query, limitopt) → {Promise.<Object>}
Search all the floData published into the Flo Blockchain, this is provided by a connection to an OIPd server
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
query |
string |
your search query |
|
limit |
number |
<optional> |
max num of results |
- Source:
Returns:
//return example
{success: true, floData: Array.
//or error {success: false, error: error}
- Type:
- Promise.<Object>