스팀 앱 개발기 #39 - condenser_api.get_dynamic_global_properties API 실행에 필요한 데이터 클래스 추가

in kr-dev 커뮤니티2 years ago (edited)

시작하며...

condenser_api.get_dynamic_global_properties API 연동을 구현하기 전에 관련 데이터 클래스를 먼저 정의해야 합니다. 이번 포스트에서는 파라메터 및 응답 클래스들을 작성해 봅니다.


GetDynamicGlobalPropertiesParamsDTO 클래스

API 실행시 파라메터로 보낼 데이터를 나타내는 클래스입니다.

data class GetDynamicGlobalPropertiesParamsDTO(
    val jsonrpc: String = "2.0",
    val method: String = "condenser_api.get_dynamic_global_properties",
    val params: Array<Any> = arrayOf(),
    val id: Int
)


응답 클래스

응답 관련 클래스들은 아래와 같습니다. 데이터들이 많아서 이들이 무엇인지 지금은 다 파악이 어렵네요. 필요할 때마다 조금씩 정리할 예정입니다.

data class GetDynamicGlobalPropertiesResponseDTO(
    val jsonrpc: String?,
    val result: GetDynamicGlobalPropertiesDTO?,
    val id: Int?
)

data class GetDynamicGlobalPropertiesDTO(
    val head_block_number: Int?,
    val head_block_id: String?,
    val time: String?,
    val current_witness: String?,
    val total_pow: Int?,
    val num_pow_witnesses: Int?,
    val virtual_supply: String?,
    val current_supply: String?,
    val confidential_supply: String?,
    val init_sbd_supply: String?,
    val current_sbd_supply: String?,
    val confidential_sbd_supply: String?,
    val total_vesting_fund_steem: String?,
    val total_vesting_shares: String?,
    val total_reward_fund_steem: String?,
    val total_reward_shares2: String?,
    val pending_rewarded_vesting_shares: String?,
    val pending_rewarded_vesting_steem: String?,
    val sbd_interest_rate: Int?,
    val sbd_print_rate: Int?,
    val maximum_block_size: Int?,
    val required_actions_partition_percent: Int?,
    val current_aslot: Int?,
    val recent_slots_filled: String?,
    val participation_count: Int?,
    val last_irreversible_block_num: Int?,
    val vote_power_reserve_rate: Int?,
    val delegation_return_period: Int?,
    val reverse_auction_seconds: Int?,
    val available_account_subsidies: Int?,
    val sbd_stop_percent: Int?,
    val sbd_start_percent: Int?,
    val next_maintenance_time: String?,
    val last_budget_time: String?,
    val content_reward_percent: Int?,
    val vesting_reward_percent: Int?,
    val sps_fund_percent: Int?,
    val sps_interval_ledger: String?,
    val downvote_pool_percent: Int?
)

GitHub Commit


지난 스팀 앱 개발기

Sort:  
 2 years ago 

[광고] STEEM 개발자 커뮤니티에 참여 하시면, 다양한 혜택을 받을 수 있습니다.

Coin Marketplace

STEEM 0.18
TRX 0.14
JST 0.029
BTC 57956.22
ETH 3126.99
USDT 1.00
SBD 2.45