Package com.syntifi.near.api.indexer
Interface NearIndexerClient
-
public interface NearIndexerClient
Near indexer client uses http API to retrieve useful information on chain data- Since:
- 0.2.0
- Author:
- Alexandre Carvalho, Andre Bertolace
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description retrofit2.Call<AccountIdList>
getAccountLikelyFTs(java.lang.String accountId)
Fetches all likely FTs (Tokens) given an accountIdretrofit2.Call<AccountIdList>
getAccountLikelyNFTs(java.lang.String accountId)
Fetches all likely NFTs given an accountIdretrofit2.Call<java.util.List<java.lang.String>>
getNearAccounts(java.lang.String publicKey)
Fetches a list of accounts for a given public keyretrofit2.Call<RecentActivity>
getNearRecentActivity(java.lang.String accountId)
Fetches a list of recent activities for one accountretrofit2.Call<NearValue>
getNearValue()
Fetches the value of near in fiat currencyretrofit2.Call<java.util.List<StakingDeposit>>
getStakingDeposits(java.lang.String accountId)
Fetches staking deposits for an accountretrofit2.Call<java.util.List<java.lang.String>>
getStakingPools()
Fetches staking pool idsstatic NearIndexerClient
usingNetwork(Network network)
NearIndexerService builder
-
-
-
Method Detail
-
getAccountLikelyNFTs
@GET("account/{accountId}/likelyNFTs") retrofit2.Call<AccountIdList> getAccountLikelyNFTs(@Path("accountId") java.lang.String accountId)
Fetches all likely NFTs given an accountId- Parameters:
accountId
- the account to search information for- Returns:
- a retrofit call for a AccountIdList
-
getAccountLikelyFTs
@GET("account/{accountId}/likelyTokens") retrofit2.Call<AccountIdList> getAccountLikelyFTs(@Path("accountId") java.lang.String accountId)
Fetches all likely FTs (Tokens) given an accountId- Parameters:
accountId
- the account to search information for- Returns:
- a retrofit call for a AccountIdList
-
getStakingPools
@GET("stakingPools") retrofit2.Call<java.util.List<java.lang.String>> getStakingPools()
Fetches staking pool ids- Returns:
- a list with all staking pool ids
-
getStakingDeposits
@GET("staking-deposits/{accountId}") retrofit2.Call<java.util.List<StakingDeposit>> getStakingDeposits(@Path("accountId") java.lang.String accountId)
Fetches staking deposits for an account- Parameters:
accountId
- the account to search information for- Returns:
- a retrofit call for a list of StakingDeposits
-
getNearRecentActivity
@GET("account/{accountId}/activity") retrofit2.Call<RecentActivity> getNearRecentActivity(@Path("accountId") java.lang.String accountId)
Fetches a list of recent activities for one account- Parameters:
accountId
- the account to fetch activity- Returns:
- list of recent activity for the account
-
getNearValue
@GET("/fiat") retrofit2.Call<NearValue> getNearValue()
Fetches the value of near in fiat currency- Returns:
- the Near fiat value
-
getNearAccounts
@GET("publicKey/{publicKey}/accounts") retrofit2.Call<java.util.List<java.lang.String>> getNearAccounts(@Path("publicKey") java.lang.String publicKey)
Fetches a list of accounts for a given public key- Parameters:
publicKey
- the account public key- Returns:
- list containing all account ids
-
usingNetwork
static NearIndexerClient usingNetwork(Network network)
NearIndexerService builder- Parameters:
network
- the indexer url to connect to- Returns:
- the indexer service instance
-
-