Swift API client for YatLib
caution
The SDK code and documetnation are in ALPHA state and are under heavy development. As a result, the apis are still in flux, and the documentation may be out of date with the code.
Emoji ID is a directory service that associates almost any type of structured data with a short, memorable identifier the emoji id.
#
Installation#
CocoaPodsAdd pod 'YatLib'
to your project's Podfile
Run pod install
#
Documentation for API EndpointsClass | Method | HTTP request | Description |
---|---|---|---|
ApiKeysAPI | createApiKey | POST /api_keys | Create new api key for current user |
ApiKeysAPI | deleteApiKey | DELETE /api_keys/{id} | Delete provided api key |
ApiKeysAPI | listApiKeys | GET /api_keys | Load api keys for user |
CartAPI | addItems | POST /cart | Update cart items by adding new items to the cart |
CartAPI | applyPromoCode | POST /cart/promo_code | Apply promo code |
CartAPI | checkout | POST /cart/checkout | Checkout last payment cart |
CartAPI | checkoutOrder | POST /cart/checkout/{id} | Checkout saved cart by id |
CartAPI | clearCart | DELETE /cart | Remove all items from cart |
CartAPI | convertOrderToDraft | POST /cart/convert_to_draft | Convert pending payment cart back into Draft status |
CartAPI | deletePaymentMethods | DELETE /payment_methods/{id} | Delete payment method |
CartAPI | getItems | GET /cart | Return cart content |
CartAPI | listPaymentMethods | GET /payment_methods | Fetch payment methods for the user |
CartAPI | removeItem | DELETE /cart/cart_items/{cart_item_id} | Removes an order item from the cart |
DiscountsAPI | activateRandomYatCode | POST /codes/{code_id}/random_yat | Use random yat code |
DiscountsAPI | addPubkeyForCode | POST /codes/{code_id}/pubkeys/{pubkey} | Add pubkey for code |
DiscountsAPI | listCodes | GET /codes | Fetch codes |
DiscountsAPI | revokePubkeyForCode | DELETE /codes/{code_id}/pubkeys/{pubkey} | Revoke pubkey for code |
EmojiAPI | emojiList | GET /emoji | List of supported emoji characters |
EmojiIDAPI | editEmojiID | PATCH /emoji_id/{emoji_id} | Edit EmojiId |
EmojiIDAPI | emojiIDMetadata | GET /emoji_id/{emoji_id}/metadata | |
EmojiIDAPI | generateSignature | POST /emoji_id/{emoji_id}/generate_signature | Generates a signature for the Yat allowing it to be minted |
EmojiIDAPI | getStats | GET /emoji_id/{eid}/stats | Get statistics for EmojiId |
EmojiIDAPI | linkRedirect | GET /redirect | Redirect by EmojiId link |
EmojiIDAPI | listEmojiIDs | GET /emoji_id | List user's Emoji Ids |
EmojiIDAPI | listExtended | GET /emoji_id/extended | List extended view user's Emoji Ids |
EmojiIDAPI | loadJson | GET /emoji_id/{eid}/json/{key} | Load value from EmojiId key value store |
EmojiIDAPI | loadJsonIndex | GET /emoji_id/{eid}/json | Load value from EmojiId key value store with data keyed by YatJsonStoreKeys |
EmojiIDAPI | lookupEmojiID | GET /emoji_id/{emoji_id} | Lookup EmojiId |
EmojiIDAPI | lookupEmojiIDPayment | GET /emoji_id/{emoji_id}/payment | Lookup EmojiId Payment addresses |
EmojiIDAPI | lookupEmojiIdTicker | GET /emoji_id/{emoji_id}/{tag} | Lookup EmojiId data based on a symbol or ticker |
EmojiIDAPI | metadata | GET /nft_transfers/metadata/{token_id} | |
EmojiIDAPI | random | GET /emoji_id/random | Return random Emoji |
EmojiIDAPI | recent | GET /emoji_id/recent | Return list of recently purchased emoji |
EmojiIDAPI | rhythm | GET /emoji_id/{emoji_id}/rhythm | Calculate EmojiId rhythm score |
EmojiIDAPI | searchEmojiID | GET /emoji_id/search | Search for EmojiID |
EmojiIDAPI | storeJson | POST /emoji_id/{eid}/json/{key} | Store value under EmojiId key |
KeyManagementAPI | addPubkey | POST /pubkeys/{pubkey} | Add pubkey for current user |
KeyManagementAPI | addPubkeyForUser | POST /users/{user_id}/pubkeys/{pubkey} | Add pubkey for user by user_id |
KeyManagementAPI | createWallet | POST /pubkeys | Generate custodial wallet |
KeyManagementAPI | getPubkeys | GET /pubkeys | Retrieve pubkeys |
KeyManagementAPI | getPubkeysForUser | GET /users/{user_id}/pubkeys | Retrieve pubkeys by user_id |
LootBoxTypeAPI | createType | POST /lootbox_type | Create a new lootbox category |
LootBoxTypeAPI | generateLootBoxes | POST /lootbox_type/generate | Generates a set of loot boxes |
LootBoxTypeAPI | getTypes | GET /lootbox_type | List all loot box categories |
LootBoxesAPI | createLootbox | POST /lootboxes | Create a new lootbox |
LootBoxesAPI | deleteLootbox | DELETE /lootboxes/{id} | Delete a lootbox |
LootBoxesAPI | listLootboxes | GET /lootboxes | Fetch lootboxes |
LootBoxesAPI | openLootbox | POST /lootboxes/{id}/open | Open lootbox |
LootBoxesAPI | showLootbox | GET /lootboxes/{id} | Show information about lootbox |
LootBoxesAPI | updateLootbox | PATCH /lootboxes/{id} | Update a lootbox |
OrganizationAPI | getBranding | GET /organizations/{id}/branding | Load organization branding paramters |
OrganizationAPI | setBranding | PUT /organizations/{id}/branding | Set organization branding parameters |
ProxyAPI | callProxy | POST /proxy | Calls a pre-defined proxy service with the provided data |
TransferAPI | deleteTransfer | DELETE /transfers/{transfer_id} | Mark transfer request as deleted |
TransferAPI | listFiltered | GET /transfers | List outgoing transfer requests for current or specified user If limit is omitted will display top 50 transfer requests |
TransferAPI | listIncoming | GET /transfers/incoming | List transfer requests assigned to user |
TransferAPI | receiverAcceptTransfer | POST /transfers/{transfer_id}/receiver_accept | As a receiver, accept transfer request by id. |
TransferAPI | requestTransfer | POST /transfers | Transfer eid to either the pubkey or email address supplied in the PUT data |
TransferAPI | resendCode | POST /transfers/{transfer_id}/resend_code | Resend a new transfer OTP code for the current user, if the transfer allows it. |
TransferAPI | senderAcceptTransfer | POST /transfers/{transfer_id}/sender_accept | As a sender, confirm the transfer request by transfer id. |
UserAuthenticationAPI | login | POST /auth/token | Login via password |
UserAuthenticationAPI | logout | POST /logout | Invalidates all user's access tokens |
UserAuthenticationAPI | magicLinkLogin | POST /auth/magic_link | Generate magic link for login |
UserAuthenticationAPI | refreshToken | POST /auth/token/refresh | Refresh access token |
UserAuthenticationAPI | twoFactorAuthentication | POST /auth/2fa | Two factor authentication |
UserFeatureAPI | readFeatures | GET /user_features | List users features |
UserInterestAPI | deleteUserInterest | DELETE /user_interests/{emoji_id} | Destroys the user interest preventing this Emoji ID's notification emails from being sent for this user |
UserInterestAPI | getInterestedUsers | GET /user_interests | Returns a paginated list of user interest records associated with the user |
UserInterestAPI | getUserInterestForYat | GET /user_interests/{emoji_id} | Given an EmojiId returns information about the user interest if a record exists for this user |
UserInterestAPI | registerInterest | POST /user_interests | Create new interest in emoji to be notified when available |
UsersAPI | backupDisable2FA | POST /account/2fa/backup_disable | Disable choosen 2FA provider or disable completely using backup code and user primary ID |
UsersAPI | confirm2FA | POST /account/2fa/confirm | Confirm two factor authentication update |
UsersAPI | createUser | POST /users | Register a User |
UsersAPI | deleteUser | DELETE /users/{id} | Delete a user |
UsersAPI | disable2FA | POST /account/2fa/disable | Disable choosen 2FA provider or disable completely |
UsersAPI | enable2FA | POST /account/2fa/enable | Enables two factor authentication method |
UsersAPI | getAccount | GET /account | Current user account |
UsersAPI | getAllUsers | GET /users | List users |
UsersAPI | load | GET /account/load | Load user data for a session |
UsersAPI | send2FASms | POST /account/2fa/sms_code | Send SMS 2FA code |
UsersAPI | showUser | GET /users/{id} | Show users |
UsersAPI | updateAccount | PATCH /account | Update the currently logged in user |
UsersAPI | updateUserByAdmin | PATCH /users/{id} | Update a user as an admin |
WalletsAPI | listWallets | GET /wallets | Fetch associated wallet addresses for the user |
WalletsAPI | syncWallet | POST /wallets | Associate new wallet address with user |
#
Documentation For Models- AcceptTransfer
- AddItemsCartRequest
- AddItemsCartRequestItems
- AdminNewLootBoxBody
- AdminNewLootBoxType
- AdminNewLootBoxTypeConfig
- AdminNewLootBoxTypeConfigGuarantees
- AdminNewLootBoxTypeConfigWeights
- AdminUpdateLootBoxBody
- AdminUpdateUserParameters
- ApplyPromoCodeRequest
- BackupDisableBody
- CheckoutCartRequest
- Confirm2Fa
- Confirm2FaUpdate
- CreateApiKeyBody
- CurrentUser
- CurrentUserFeatures
- CurrentUserUser
- Disable2FABody
- DisplayApiKey
- DisplayFeature
- DisplayOrder
- DisplayOrderOrderItems
- DisplayOrderPaymentMethodData
- DisplayOrderPaymentMethodDataMethods
- DisplayOrderUser
- DisplayTransferRequest
- DisplayUser
- DisplayUserExtended
- EditRequest
- EditRequestInsert
- EidResponse
- EidResponseError
- EidResponseResult
- EmojiListItem
- EmojiListItemShape
- EmojiStatsResponse
- EmojiStatsResponseMetrics
- Enable2FABody
- Enable2FAResponse
- ListOfCodeAvailability
- ListOfCodeAvailabilityData
- ListOfCodeAvailabilityPaging
- ListOfDisplayTransferRequest
- ListOfDisplayTransferRequestData
- ListOfDisplayUserExtended
- ListOfDisplayUserExtendedData
- ListOfPublicLootBox
- ListOfPublicLootBoxData
- ListOfPublicLootBoxLootboxType
- ListOfPublicLootBoxLootboxTypeConfig
- ListOfPublicLootBoxOwner
- ListOfUserInterest
- ListOfUserInterestData
- LoadJsonResponse
- LoadUser
- LoadUserCurrentUser
- LoadUserExtendedList
- LoadUserOutgoingTransfers
- LoadUserWallets
- LoginRequest
- LookupResponse
- LootBoxGenerationRequest
- LootBoxSet
- MagicLinkLoginRequest
- MagicLinkLoginResponse
- Metadata
- MetadataAttributes
- NewUserInterestParameters
- OrganizationBranding
- PaymentAddressResponse
- PaymentAddressResponseResult
- PaymentMethod
- ProxyCallParameters
- ProxyResult
- PublicLootBox
- PublicLootBoxType
- RandomResult
- RandomResultResult
- RandomYatActivateBody
- RecentlyPurchasedResult
- RefreshRequest
- RegisterUserParameters
- RhythmResponse
- SearchResult
- SearchResultResult
- ShapeMatch
- SignatureRequest
- SignatureResponse
- StoreJsonBody
- SuccessResponse
- SuccessResponse2FA
- TokenResponse
- TransferRequest
- UpdateAccountResponse
- UpdateAccountResponseTokenResponse
- UpdateOrganizationBranding
- UpdateUserParameters
- UserInterest
- Wallet
- WalletSyncRequest
#
Documentation For Authorization#
JWT- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
#
apiKey- Type: API key
- API key parameter name: Authorization,X-Api-Key
- Location: HTTP header
#
two_factor- Type: API key
- API key parameter name: Authorization
- Location: HTTP header