EmojiIDApi
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| editEmojiID | PATCH /emoji_id/{emoji_id} | Edit EmojiId |
| emojiIDMetadata | GET /emoji_id/{emoji_id}/metadata | |
| generateSignature | POST /emoji_id/{emoji_id}/generate_signature | Generates a signature for the Yat allowing it to be minted |
| getStats | GET /emoji_id/{eid}/stats | Get statistics for EmojiId |
| linkRedirect | GET /redirect | Redirect by EmojiId link |
| listEmojiIDs | GET /emoji_id | List user's Emoji Ids |
| listExtended | GET /emoji_id/extended | List extended view user's Emoji Ids |
| loadJson | GET /emoji_id/{eid}/json/{key} | Load value from EmojiId key value store |
| loadJsonIndex | GET /emoji_id/{eid}/json | Load value from EmojiId key value store with data keyed by YatJsonStoreKeys |
| lookupEmojiID | GET /emoji_id/{emoji_id} | Lookup EmojiId |
| lookupEmojiIDPayment | GET /emoji_id/{emoji_id}/payment | Lookup EmojiId Payment addresses |
| lookupEmojiIdTicker | GET /emoji_id/{emoji_id}/{tag} | Lookup EmojiId data based on a symbol or ticker |
| metadata | GET /nft_transfers/metadata/{token_id} | |
| random | GET /emoji_id/random | Return random Emoji |
| recent | GET /emoji_id/recent | Return list of recently purchased emoji |
| rhythm | GET /emoji_id/{emoji_id}/rhythm | Calculate EmojiId rhythm score |
| searchEmojiID | GET /emoji_id/search | Search for EmojiID |
| storeJson | POST /emoji_id/{eid}/json/{key} | Store value under EmojiId key |
editEmojiID#
/*** @returns Object**/async function editEmojiID(emojiId: String, body: EditRequest)Edit EmojiId
Notes:#
Add and remove records in EmojiId, update merkle_root and signature too. Certain tags, such as CryptocurrenyAddress, EmojiNick, EmojiDescription, EmojiPreferred, Redirect only allow a single value to be stored by default. Only the latest values will be stored and older values deleted. To allow multiple values for the same tag pass in true for bypass_single_restrictions Access notes: user expected to own the emoji's pubkey, have Admin role or be power member of organization if pubkey belongs to organization, otherwise operation will fail.
Example#
const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
let emojiId = "emojiId_example"; // String // populate emojiId...
let body = new YatJs.EditRequest(); // EditRequest // populate body...
try { let res = await api.emojiID().editEmojiID(emojiId, body); // res is of type Object console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| emojiId | String | ||
| body | EditRequest | ||
Return type#
Object
Authorization#
HTTP request headers#
- Content-Type: Not defined
- Accept: /
emojiIDMetadata#
/*** @returns ShapeMatch**/async function emojiIDMetadata(emojiId: String)Example#
const yat = require('yatjs');const api = new yat.YatJs();
let emojiId = "emojiId_example"; // String // populate emojiId...
try { let res = await api.emojiID().emojiIDMetadata(emojiId); // res is of type ShapeMatch console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| emojiId | String |
Return type#
Authorization#
No authorization required
HTTP request headers#
- Content-Type: Not defined
- Accept: /
generateSignature#
/*** @returns SignatureResponse**/async function generateSignature(emojiId: String, body: SignatureRequest)Generates a signature for the Yat allowing it to be minted
Notes:#
If the yat has any active transfers for it or is in the pending transfer period this action fails
Example#
const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
let emojiId = "emojiId_example"; // String // populate emojiId...
let body = new YatJs.SignatureRequest(); // SignatureRequest // populate body...
try { let res = await api.emojiID().generateSignature(emojiId, body); // res is of type SignatureResponse console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| emojiId | String | ||
| body | SignatureRequest | ||
Return type#
Authorization#
HTTP request headers#
- Content-Type: Not defined
- Accept: /
getStats#
/*** @returns EmojiStatsResponse**/async function getStats(eid: String)Get statistics for EmojiId
Example#
const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
let eid = "eid_example"; // String // populate eid...
try { let res = await api.emojiID().getStats(eid); // res is of type EmojiStatsResponse console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| eid | String |
Return type#
Authorization#
HTTP request headers#
- Content-Type: Not defined
- Accept: /
linkRedirect#
/*** @returns null**/async function linkRedirect(emojiId: String, link: String)Redirect by EmojiId link
Notes:#
Will redirect to a link if it is part of Emoji ID
Example#
const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
let emojiId = "emojiId_example"; // String // populate emojiId...
let link = "link_example"; // String // populate link...
try { await api.emojiID().linkRedirect(emojiId, link); console.log('API called successfully.');} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| emojiId | String | ||
| link | String |
Return type#
null (empty response body)
Authorization#
HTTP request headers#
- Content-Type: Not defined
- Accept: Not defined
listEmojiIDs#
/*** @returns [String]**/async function listEmojiIDs(opts)List user's Emoji Ids
Notes:#
If no parameters provided will return all Emoji Ids of current user. When user_id or organization_id specified the endpoint will return the Emoji Ids owned by specified user or organization, requires Admin or organization power user access. Result is an array of emoji ids in display format (i.e. with all skin tone modifiers applied) [\"๐ค๐พ๐๐ฝ๐ป\",\"๐๐๐ฟ๐ฏ\"]
Example#
const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
let opts = { 'organizationId': null, // String | Lookup emojis owned by `organization_id`, requires organization power user role 'userId': null // String | Lookup emojis owned by `user_id`, requires Admin role};try { let res = await api.emojiID().listEmojiIDs(opts); // res is of type [String] console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| organizationId | String | ||
| Lookup emojis owned by `organization_id`, requires organization power user role | [optional] | ||
| userId | String | ||
| Lookup emojis owned by `user_id`, requires Admin role | [optional] |
Return type#
[String]
Authorization#
HTTP request headers#
- Content-Type: Not defined
- Accept: /
listExtended#
/*** @returns [EmojiListItem]**/async function listExtended(opts)List extended view user's Emoji Ids
Notes:#
Will return list of user's Emoji Ids with canonical and display representation. Display representation is Emoji Id with applied modifiers. If no parameters provided will return all Emoji Ids of the current user. When user_id or organization_id is specified the endpoint will return the Emoji Ids owned by the specified user or organization, requires Admin or organization power user access.
Example#
const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
let opts = { 'organizationId': null, // String | Lookup emojis owned by `organization_id`, requires organization power user role 'userId': null // String | Lookup emojis owned by `user_id`, requires Admin role};try { let res = await api.emojiID().listExtended(opts); // res is of type [EmojiListItem] console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| organizationId | String | ||
| Lookup emojis owned by `organization_id`, requires organization power user role | [optional] | ||
| userId | String | ||
| Lookup emojis owned by `user_id`, requires Admin role | [optional] |
Return type#
Authorization#
HTTP request headers#
- Content-Type: Not defined
- Accept: /
loadJson#
/*** @returns LoadJsonResponse**/async function loadJson(eid: String, key: String)Load value from EmojiId key value store
Notes:#
Any data stored previously can be retrieved as a json object in EmojiID key value store. In the case when there was no data associated with EmojiID key before it will return empty object. User should have AdminEmojiWrite scope or own emoji
Example#
const yat = require('yatjs');const api = new yat.YatJs();
let eid = "eid_example"; // String | EmojiID// populate eid...
let key = "key_example"; // String | Key to store data// populate key...
try { let res = await api.emojiID().loadJson(eid, key); // res is of type LoadJsonResponse console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| eid | String | EmojiID | |
| key | String | Key to store data |
Return type#
Authorization#
No authorization required
HTTP request headers#
- Content-Type: Not defined
- Accept: /
loadJsonIndex#
/*** @returns {String: LoadJsonResponse}**/async function loadJsonIndex(eid: String, keys: [String])Load value from EmojiId key value store with data keyed by YatJsonStoreKeys
Notes:#
Any data stored previously can be retrieved as a json object in EmojiID key value store. In the case when there was no data associated with EmojiID key before it will return empty object. User should have AdminEmojiWrite scope or own emoji
Example#
const yat = require('yatjs');const api = new yat.YatJs();
let eid = "eid_example"; // String // populate eid...
let keys = ["null"]; // [String] | Key to store data// populate keys...
try { let res = await api.emojiID().loadJsonIndex(eid, keys); // res is of type {String: LoadJsonResponse} console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| eid | String | ||
| keys | [String] | ||
| Key to store data |
Return type#
Authorization#
No authorization required
HTTP request headers#
- Content-Type: Not defined
- Accept: /
lookupEmojiID#
/*** @returns LookupResponse**/async function lookupEmojiID(emojiId: String, opts)Lookup EmojiId
Notes:#
Will filter and return data from supplied tags, If tags filter is not supplied will return all tags attached. It will also try to get views for the past month, if not available will return -1. This method is called when a user wants to look up an Emoji ID's records such as a crypto address or a redirect
Example#
const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
let emojiId = "emojiId_example"; // String // populate emojiId...
let opts = { 'tags': "tags_example" // String | Comma-separated list of tags to display, skip it to display all, e.g. `?tags=0x0001,0x1001`};try { let res = await api.emojiID().lookupEmojiID(emojiId, opts); // res is of type LookupResponse console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| emojiId | String | ||
| tags | String | Comma-separated list of tags to display, skip it to display all, e.g. `?tags=0x0001,0x1001` | [optional] |
Return type#
Authorization#
HTTP request headers#
- Content-Type: Not defined
- Accept: /
lookupEmojiIDPayment#
/*** @returns PaymentAddressResponse**/async function lookupEmojiIDPayment(emojiId: String, opts)Lookup EmojiId Payment addresses
Notes:#
Will filter and return data from supplied tags, If tags filter is not supplied will return all payment tags attached. This method is called when a user wants to look up an Emoji ID's payment records and return a KV pair This endpoint returns a single result for each category type (except 0x6300) which it returns a unique 0x6300:short_name:settlement_network key instead. If there are multiple results for a crypto type it takes the most recent value unless there is a value that has the default flag set, in which case it uses the most recent default value.
Example#
const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
let emojiId = "emojiId_example"; // String // populate emojiId...
let opts = { 'tags': "tags_example" // String | Comma-separated list of tags to display, skip it to display all, e.g. `?tags=0x0001,0x1001`};try { let res = await api.emojiID().lookupEmojiIDPayment(emojiId, opts); // res is of type PaymentAddressResponse console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| emojiId | String | ||
| tags | String | Comma-separated list of tags to display, skip it to display all, e.g. `?tags=0x0001,0x1001` | [optional] |
Return type#
Authorization#
HTTP request headers#
- Content-Type: Not defined
- Accept: /
lookupEmojiIdTicker#
/*** @returns EidResponse**/async function lookupEmojiIdTicker(emojiId: String, tag: String)Lookup EmojiId data based on a symbol or ticker
Example#
const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
let emojiId = "emojiId_example"; // String // populate emojiId...
let tag = "tag_example"; // String // populate tag...
try { let res = await api.emojiID().lookupEmojiIdTicker(emojiId, tag); // res is of type EidResponse console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| emojiId | String | ||
| tag | String |
Return type#
Authorization#
HTTP request headers#
- Content-Type: Not defined
- Accept: /
metadata#
/*** @returns Metadata**/async function metadata(tokenId: Number)Example#
const yat = require('yatjs');const api = new yat.YatJs();
let tokenId = 789; // Number // populate tokenId...
try { let res = await api.emojiID().metadata(tokenId); // res is of type Metadata console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| tokenId | Number |
Return type#
Authorization#
No authorization required
HTTP request headers#
- Content-Type: Not defined
- Accept: /
random#
/*** @returns RandomResult**/async function random()Return random Emoji
Notes:#
Returns price, availability and other information for random emoji
Example#
const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
try { let res = await api.emojiID().random(); // res is of type RandomResult console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
This endpoint does not have any parameters.
Return type#
Authorization#
HTTP request headers#
- Content-Type: Not defined
- Accept: /
recent#
/*** @returns RecentlyPurchasedResult**/async function recent()Return list of recently purchased emoji
Example#
const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
try { let res = await api.emojiID().recent(); // res is of type RecentlyPurchasedResult console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
This endpoint does not have any parameters.
Return type#
Authorization#
HTTP request headers#
- Content-Type: Not defined
- Accept: /
rhythm#
/*** @returns RhythmResponse**/async function rhythm(emojiId: String)Calculate EmojiId rhythm score
Notes:#
The rhythm score is an indicator of a Yat's prestige, or status. Factors that affect the rhythm are length, shape, and the popularity of emojis present in the yat. The yat rhythm ranges from 1 (least prestigious) to 100 (most prestigious).
Example#
const yat = require('yatjs');const api = new yat.YatJs();
let emojiId = "emojiId_example"; // String // populate emojiId...
try { let res = await api.emojiID().rhythm(emojiId); // res is of type RhythmResponse console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| emojiId | String |
Return type#
Authorization#
No authorization required
HTTP request headers#
- Content-Type: Not defined
- Accept: /
searchEmojiID#
/*** @returns SearchResult**/async function searchEmojiID(emojiId: String)Search for EmojiID
Notes:#
Returns price, availability and other information on emoji and its alternates (similar EmojiIDs that are currently available)
Example#
const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
let emojiId = "emojiId_example"; // String | Emoji ID in percent url-encoded form// populate emojiId...
try { let res = await api.emojiID().searchEmojiID(emojiId); // res is of type SearchResult console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| emojiId | String | Emoji ID in percent url-encoded form |
Return type#
Authorization#
HTTP request headers#
- Content-Type: Not defined
- Accept: /
storeJson#
/*** @returns null**/async function storeJson(eid: String, key: String, body: StoreJsonBody)Store value under EmojiId key
Notes:#
Any data can be stored as a json object, this data is stored in a centralized DB and is not taking blockchain storage. In addition to unformatted data this endpoint allows to edit tags in the same way as edit endpoint allows to. User should have AdminEmojiWrite scope or own emoji
Example#
const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
let eid = "eid_example"; // String | EmojiID// populate eid...
let key = "key_example"; // String | Key to store data// populate key...
let body = new YatJs.StoreJsonBody(); // StoreJsonBody // populate body...
try { await api.emojiID().storeJson(eid, key, body); console.log('API called successfully.');} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| eid | String | EmojiID | |
| key | String | Key to store data | |
| body | StoreJsonBody | ||
Return type#
null (empty response body)
Authorization#
HTTP request headers#
- Content-Type: Not defined
- Accept: Not defined