MetaFab API
- API version: 1.5.1
- Build date: 2023-02-19T17:38:27.237153-05:00[America/New_York]
Complete MetaFab API references and guides can be found at: https://trymetafab.com
For more information, please visit https://trymetafab.com
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.8+
- Maven (3.8.3+)/Gradle (7.2+)
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>org.metafab</groupId>
<artifactId>metafab-java</artifactId>
<version>1.5.1</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
repositories {
mavenCentral() // Needed if the 'metafab-java' jar has been published to maven central.
mavenLocal() // Needed if the 'metafab-java' jar has been published to the local maven repo.
}
dependencies {
implementation "org.metafab:metafab-java:1.5.1"
}
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/metafab-java-1.5.1.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
// Import classes:
import org.metafab.client.ApiClient;
import org.metafab.client.ApiException;
import org.metafab.client.Configuration;
import org.metafab.client.models.*;
import org.metafab.client.api.ContractsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.trymetafab.com");
ContractsApi apiInstance = new ContractsApi(defaultClient);
String xAuthorization = "game_sk_02z4Mv3c85Ig0gNowY9Dq0N2kjb1xwzr27ArLE0669RrRI6dLf822iPO26K1p1FP"; // String | The `secretKey` of the authenticating game.
CreateContractRequest createContractRequest = new CreateContractRequest(); // CreateContractRequest |
try {
ContractModel result = apiInstance.createContract(xAuthorization, createContractRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ContractsApi#createContract");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
All URIs are relative to https://api.trymetafab.com
Class | Method | HTTP request | Description |
---|---|---|---|
ContractsApi | createContract | POST /v1/contracts | Create custom contract |
ContractsApi | getContracts | GET /v1/contracts | Get contracts |
ContractsApi | readContract | GET /v1/contracts/{contractId}/reads | Read contract data |
ContractsApi | transferContractOwnership | POST /v1/contracts/{contractId}/owners | Transfer contract ownership |
ContractsApi | upgradeContractTrustedForwarder | POST /v1/contracts/{contractId}/forwarders | Upgrade contract trusted forwarder |
ContractsApi | writeContract | POST /v1/contracts/{contractId}/writes | Write contract data |
CurrenciesApi | batchTransferCurrency | POST /v1/currencies/{currencyId}/batchTransfers | Batch transfer currency |
CurrenciesApi | burnCurrency | POST /v1/currencies/{currencyId}/burns | Burn currency |
CurrenciesApi | createCurrency | POST /v1/currencies | Create currency |
CurrenciesApi | getCurrencies | GET /v1/currencies | Get currencies |
CurrenciesApi | getCurrencyBalance | GET /v1/currencies/{currencyId}/balances | Get currency balance |
CurrenciesApi | getCurrencyFees | GET /v1/currencies/{currencyId}/fees | Get currency fees |
CurrenciesApi | getCurrencyRole | GET /v1/currencies/{currencyId}/roles | Get currency role |
CurrenciesApi | grantCurrencyRole | POST /v1/currencies/{currencyId}/roles | Grant currency role |
CurrenciesApi | mintCurrency | POST /v1/currencies/{currencyId}/mints | Mint currency |
CurrenciesApi | revokeCurrencyRole | DELETE /v1/currencies/{currencyId}/roles | Revoke currency role |
CurrenciesApi | setCurrencyFees | POST /v1/currencies/{currencyId}/fees | Set currency fees |
CurrenciesApi | transferCurrency | POST /v1/currencies/{currencyId}/transfers | Transfer currency |
EcosystemsApi | approveEcosystemGame | POST /v1/ecosystems/{ecosystemId}/games | Approve ecosystem game |
EcosystemsApi | authEcosystem | GET /v1/ecosystems/auth | Authenticate ecosystem |
EcosystemsApi | authProfile | GET /v1/profiles/auth | Authenticate profile |
EcosystemsApi | authProfilePlayer | GET /v1/profiles/{profileId}/games/{gameId}/players/auth | Authenticate profile player |
EcosystemsApi | createEcosystem | POST /v1/ecosystems | Create ecosystem |
EcosystemsApi | createProfile | POST /v1/profiles | Create profile |
EcosystemsApi | createProfilePlayer | POST /v1/profiles/{profileId}/games/{gameId}/players | Create profile player |
EcosystemsApi | getEcosystem | GET /v1/ecosystems/{ecosystemId} | Get ecosystem |
EcosystemsApi | getEcosystemGame | GET /v1/ecosystems/{ecosystemId}/games/{gameId} | Get ecosystem game |
EcosystemsApi | getEcosystemGames | GET /v1/ecosystems/{ecosystemId}/games | Get ecosystem games |
EcosystemsApi | getProfileGame | GET /v1/profiles/{profileId}/games/{gameId} | Get profile game |
EcosystemsApi | getProfileGames | GET /v1/profiles/{profileId}/games | Get profile games |
EcosystemsApi | unapproveEcosystemGame | DELETE /v1/ecosystems/{ecosystemId}/games/{gameId} | Unapprove ecosystem game |
EcosystemsApi | updateEcosystem | PATCH /v1/ecosystems/{ecosystemId} | Update ecosystem |
EcosystemsApi | updateProfile | PATCH /v1/profiles/{profileId} | Update profile |
EcosystemsApi | updateProfilePlayer | PATCH /v1/profiles/{profileId}/games/{gameId}/players/{playerId} | Update profile player |
GamesApi | authGame | GET /v1/games/auth | Authenticate game |
GamesApi | createGame | POST /v1/games | Create game |
GamesApi | getGame | GET /v1/games/{gameId} | Get game |
GamesApi | updateGame | PATCH /v1/games/{gameId} | Update game |
ItemsApi | batchMintCollectionItems | POST /v1/collections/{collectionId}/batchMints | Batch mint collection items |
ItemsApi | batchTransferCollectionItems | POST /v1/collections/{collectionId}/batchTransfers | Batch transfer collection items |
ItemsApi | burnCollectionItem | POST /v1/collections/{collectionId}/items/{collectionItemId}/burns | Burn collection item |
ItemsApi | createCollection | POST /v1/collections | Create collection |
ItemsApi | createCollectionItem | POST /v1/collections/{collectionId}/items | Create collection item |
ItemsApi | getCollectionApproval | GET /v1/collections/{collectionId}/approvals | Get collection approval |
ItemsApi | getCollectionItem | GET /v1/collections/{collectionId}/items/{collectionItemId} | Get collection item |
ItemsApi | getCollectionItemBalance | GET /v1/collections/{collectionId}/items/{collectionItemId}/balances | Get collection item balance |
ItemsApi | getCollectionItemBalances | GET /v1/collections/{collectionId}/balances | Get collection item balances |
ItemsApi | getCollectionItemSupplies | GET /v1/collections/{collectionId}/supplies | Get collection item supplies |
ItemsApi | getCollectionItemSupply | GET /v1/collections/{collectionId}/items/{collectionItemId}/supplies | Get collection item supply |
ItemsApi | getCollectionItemTimelock | GET /v1/collections/{collectionId}/items/{collectionItemId}/timelocks | Get collection item timelock |
ItemsApi | getCollectionItems | GET /v1/collections/{collectionId}/items | Get collection items |
ItemsApi | getCollectionRole | GET /v1/collections/{collectionId}/roles | Get collection role |
ItemsApi | getCollections | GET /v1/collections | Get collections |
ItemsApi | grantCollectionRole | POST /v1/collections/{collectionId}/roles | Grant collection role |
ItemsApi | mintCollectionItem | POST /v1/collections/{collectionId}/items/{collectionItemId}/mints | Mint collection item |
ItemsApi | revokeCollectionRole | DELETE /v1/collections/{collectionId}/roles | Revoke collection role |
ItemsApi | setCollectionApproval | POST /v1/collections/{collectionId}/approvals | Set collection approval |
ItemsApi | setCollectionItemTimelock | POST /v1/collections/{collectionId}/items/{collectionItemId}/timelocks | Set collection item timelock |
ItemsApi | transferCollectionItem | POST /v1/collections/{collectionId}/items/{collectionItemId}/transfers | Transfer collection item |
LootboxesApi | createLootboxManager | POST /v1/lootboxManagers | Create lootbox manager |
LootboxesApi | getLootboxManagerLootbox | GET /v1/lootboxManagers/{lootboxManagerId}/lootboxes/{lootboxManagerLootboxId} | Get lootbox manager lootbox |
LootboxesApi | getLootboxManagerLootboxes | GET /v1/lootboxManagers/{lootboxManagerId}/lootboxes | Get lootbox manager lootboxes |
LootboxesApi | getLootboxManagers | GET /v1/lootboxManagers | Get lootbox managers |
LootboxesApi | openLootboxManagerLootbox | POST /v1/lootboxManagers/{lootboxManagerId}/lootboxes/{lootboxManagerLootboxId}/opens | Open lootbox manager lootbox |
LootboxesApi | removeLootboxManagerLootbox | DELETE /v1/lootboxManagers/{lootboxManagerId}/lootboxes/{lootboxManagerLootboxId} | Remove lootbox manager lootbox |
LootboxesApi | setLootboxManagerLootbox | POST /v1/lootboxManagers/{lootboxManagerId}/lootboxes | Set lootbox manager lootbox |
PlayersApi | authPlayer | GET /v1/players/auth | Authenticate player |
PlayersApi | createPlayer | POST /v1/players | Create player |
PlayersApi | getPlayer | GET /v1/players/{playerId} | Get player |
PlayersApi | getPlayerData | GET /v1/players/{playerId}/data | Get player data |
PlayersApi | getPlayers | GET /v1/players | Get players |
PlayersApi | removePlayerConnectedWallet | DELETE /v1/players/{playerId}/wallets/{playerWalletId} | Remove player connected wallet |
PlayersApi | setPlayerConnectedWallet | POST /v1/players/{playerId}/wallets | Set player connected wallet |
PlayersApi | setPlayerData | POST /v1/players/{playerId}/data | Set player data |
PlayersApi | updatePlayer | PATCH /v1/players/{playerId} | Update player |
ShopsApi | createShop | POST /v1/shops | Create shop |
ShopsApi | getShopOffer | GET /v1/shops/{shopId}/offers/{shopOfferId} | Get shop offer |
ShopsApi | getShopOffers | GET /v1/shops/{shopId}/offers | Get shop offers |
ShopsApi | getShops | GET /v1/shops | Get shops |
ShopsApi | removeShopOffer | DELETE /v1/shops/{shopId}/offers/{shopOfferId} | Remove shop offer |
ShopsApi | setShopOffer | POST /v1/shops/{shopId}/offers | Set shop offer |
ShopsApi | useShopOffer | POST /v1/shops/{shopId}/offers/{shopOfferId}/uses | Use shop offer |
ShopsApi | withdrawFromShop | POST /v1/shops/{shopId}/withdrawals | Withdraw from shop |
TransactionsApi | getTransaction | GET /v1/transactions/{transactionId} | Get transaction |
WalletsApi | createWalletSignature | POST /v1/wallets/{walletId}/signatures | Create wallet signature |
WalletsApi | getWallet | GET /v1/wallets/{walletId} | Get wallet |
WalletsApi | getWalletBalances | GET /v1/wallets/{walletId}/balances | Get wallet balances |
WalletsApi | getWalletTransactions | GET /v1/wallets/{walletId}/transactions | Get wallet transactions |
- ApproveEcosystemGameRequest
- AuthGame200Response
- AuthGame200ResponseAllOf
- AuthPlayer200Response
- AuthPlayer200ResponseAllOf
- AuthProfile200Response
- BatchMintCollectionItemsRequest
- BatchTransferCollectionItemsRequest
- BatchTransferCurrencyRequest
- BurnCollectionItemRequest
- BurnCurrencyRequest
- CollectionItem
- CollectionItemAttributesInner
- CollectionItemAttributesInnerValue
- CollectionModel
- ContractModel
- CreateCollection200Response
- CreateCollection200ResponseAllOf
- CreateCollection200ResponseAllOfContract
- CreateCollection200ResponseAllOfContractAllOf
- CreateCollectionItemRequest
- CreateCollectionItemRequestAttributesInner
- CreateCollectionRequest
- CreateContractRequest
- CreateCurrency200Response
- CreateCurrencyRequest
- CreateEcosystemRequest
- CreateGameRequest
- CreateLootboxManager200Response
- CreateLootboxManagerRequest
- CreatePlayerRequest
- CreateProfilePlayerRequest
- CreateProfileRequest
- CreateShop200Response
- CreateShopRequest
- CreateWalletSignatureRequest
- CurrencyModel
- EcosystemGameModel
- EcosystemModel
- GameModel
- GetCollections200ResponseInner
- GetCollections200ResponseInnerAllOf
- GetCurrencies200ResponseInner
- GetCurrencyFees200Response
- GetLootboxManagers200ResponseInner
- GetPlayerData200Response
- GetProfileGames200ResponseInner
- GetShops200ResponseInner
- GrantCollectionRoleRequest
- GrantCurrencyRoleRequest
- LootboxManagerLootbox
- LootboxManagerModel
- MintCollectionItemRequest
- MintCurrencyRequest
- PlayerModel
- ProfileModel
- ProfilePermissionsValue
- PublicEcosystem
- PublicGame
- PublicPlayer
- PublicPlayerCustodialWallet
- PublicProfile
- RemovePlayerConnectedWalletRequest
- RevokeCollectionRoleRequest
- SetCollectionApprovalRequest
- SetCollectionItemTimelockRequest
- SetCurrencyFeesRequest
- SetLootboxManagerLootboxRequest
- SetPlayerConnectedWallet200Response
- SetPlayerConnectedWalletRequest
- SetPlayerDataRequest
- SetShopOfferRequest
- ShopModel
- ShopOffer
- TransactionModel
- TransferCollectionItemRequest
- TransferContractOwnershipRequest
- TransferCurrencyRequest
- UpdateEcosystemRequest
- UpdateGame200Response
- UpdateGame200ResponseAllOf
- UpdateGameRequest
- UpdatePlayer200Response
- UpdatePlayerRequest
- UpdateProfilePlayer200Response
- UpdateProfilePlayer200ResponseAllOf
- UpdateProfilePlayerRequest
- UpdateProfileRequest
- UpgradeContractTrustedForwarderRequest
- WalletModel
- WithdrawFromShopRequest
- WriteContractRequest
- WriteContractRequestArgsInner
Authentication schemes defined for the API:
- Type: HTTP basic authentication
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.