GetProposals » 이력 » 버전 19
이름없음, 2022/02/21 05:22
| 1 | 1 | 이름없음 | h1. GetProposals |
|---|---|---|---|
| 2 | 2 | 이름없음 | |
| 3 | 10 | 이름없음 | * 신규 등록 포함 변경된(활성화, 폐기) 제안서를 조회합니다. |
| 4 | 2 | 이름없음 | |
| 5 | 17 | 이름없음 | --- |
| 6 | |||
| 7 | 18 | 이름없음 | <pre><code class="java"> |
| 8 | 17 | 이름없음 | getProposals( |
| 9 | param: ProposalListRequest |
||
| 10 | ): ProposalListResponse |
||
| 11 | </code></pre> |
||
| 12 | |||
| 13 | 10 | 이름없음 | *ProposalListRequest (param)* |
| 14 | 1 | 이름없음 | |
| 15 | 10 | 이름없음 | | *field* | *field* | *description* | *note* | |
| 16 | 16 | 이름없음 | | did | String | | 값 : listProposal | |
| 17 | 10 | 이름없음 | | command | String | | | |
| 18 | | lowerBound | String | 조회 범위(시작) | | |
||
| 19 | | upperBound | String | 조회 범위(끝) | | |
||
| 20 | | index | String | 목록 조회 기준(UpdatedAt 만 가능) | | |
||
| 21 | | pageSize | int | 한 페이지에 출력 할 proposal 수 (pageSize <= 100) | option(미 입력 시 pageNation 사용X) | |
||
| 22 | | pageNum | int | 해당 페이지 조회 (0번 시작) | option(미 입력 시 pageNation 사용X) | |
||
| 23 | 1 | 이름없음 | |
| 24 | *ProposalListResponse* |
||
| 25 | 4 | 이름없음 | |
| 26 | 10 | 이름없음 | | *field* | *type* | *description* | *note* | |
| 27 | 16 | 이름없음 | | command | String | | 값 : listProposal | |
| 28 | 13 | 이름없음 | | proposals | List<Proposal> | proposal 목록 | | |
| 29 | 5 | 이름없음 | |
| 30 | 14 | 이름없음 | *Proposal* |
| 31 | 5 | 이름없음 | |
| 32 | 10 | 이름없음 | | *field* | *type* | *description* | *note* | |
| 33 | | status | int | | | |
||
| 34 | | purpose | int | | | |
||
| 35 | | maxIssuable | int | | | |
||
| 36 | | category | int[] | | | |
||
| 37 | | disAllowMultiIssue | boolean | | | |
||
| 38 | | condition | String | | | |
||
| 39 | | content | String | | | |
||
| 40 | | createdAt | String | | | |
||
| 41 | | revokedAt | String | | | |
||
| 42 | | updatedAt | String | | | |
||
| 43 | | deposit | String | | | |
||
| 44 | | duration | String | | | |
||
| 45 | | filter | String | | | |
||
| 46 | | notAfter | String | | | |
||
| 47 | | notBefore | String | | | |
||
| 48 | | owner | String | | | |
||
| 49 | | proposalId | String | | | |
||
| 50 | | ticketValidFrom | String | | | |
||
| 51 | | description | String[] | | | |
||
| 52 | | imageurl | String[] | | | |
||
| 53 | | consumePolicy | ProposalConsumePolicy | | | |
||
| 54 | | rewardPolicy | ProposalRewardPolicy | | | |
||
| 55 | 5 | 이름없음 | |
| 56 | *ProposalConsumePolicy* |
||
| 57 | |||
| 58 | 10 | 이름없음 | | *field* | *type* | *description* | *note* | |
| 59 | | type | int | 소모 유형 | | |
||
| 60 | | count | int | 소모 허용 횟수 | | |
||
| 61 | | maxDataCount | int | consume시 최대 데이터 소모 수 | optional | |
||
| 62 | | period | String | 소모 주기 | optional | |
||
| 63 | 5 | 이름없음 | |
| 64 | *ProposalRewardPolicy* |
||
| 65 | |||
| 66 | | *field* | *type* | *description* | |
||
| 67 | 10 | 이름없음 | | type | int | 지급 유형 | |
| 68 | | amount | int | 티켓의 지급 가능 총량 | |
||
| 69 | 19 | 이름없음 | | tokenDuration | String | 리워드 유효기간 | |
| 70 | 6 | 이름없음 | |
| 71 | 9 | 이름없음 | --- |
| 72 | |||
| 73 | 7 | 이름없음 | *Request Example* |
| 74 | |||
| 75 | <pre><code class="java"> |
||
| 76 | 1 | 이름없음 | query { |
| 77 | getProposals(param: { |
||
| 78 | 9 | 이름없음 | command: "listProposal" |
| 79 | index:"UpdatedAt" |
||
| 80 | lowerBound: "2021-06-02T14:40:23+09:00" |
||
| 81 | upperBound: "2021-06-03T00:36:12.148Z" |
||
| 82 | did: "G5rw9qAMbozGxySHkMaztD" |
||
| 83 | 7 | 이름없음 | }) { |
| 84 | proposals { |
||
| 85 | condition |
||
| 86 | proposalId |
||
| 87 | purpose |
||
| 88 | consumePolicy { |
||
| 89 | count |
||
| 90 | maxDataCount |
||
| 91 | type |
||
| 92 | } |
||
| 93 | rewardPolicy { |
||
| 94 | amount |
||
| 95 | type |
||
| 96 | } |
||
| 97 | } |
||
| 98 | } |
||
| 99 | } |
||
| 100 | </code></pre> |
||
| 101 | |||
| 102 | *Response Example* |
||
| 103 | |||
| 104 | <pre><code class="java"> |
||
| 105 | { |
||
| 106 | "data": { |
||
| 107 | "getProposals": { |
||
| 108 | "proposals": [ |
||
| 109 | { |
||
| 110 | "condition": "*", |
||
| 111 | "proposalId": "orPxmv15e2oSPufT3Tm5ky1rnh4Bh1spR2NVefDnkGCAX6AnBap9UQ3k5QiSU6h5rgjv6ZSwZ5kKrTayqBZ9AYSeRX2pRSaSjLsbgtJ6aaEawfz8b", |
||
| 112 | "purpose": 1000, |
||
| 113 | "consumePolicy": { |
||
| 114 | "count": 1, |
||
| 115 | "maxDataCount": 0, |
||
| 116 | "type": 2 |
||
| 117 | }, |
||
| 118 | "rewardPolicy": { |
||
| 119 | "amount": 1000, |
||
| 120 | "type": 1 |
||
| 121 | } |
||
| 122 | } |
||
| 123 | ] |
||
| 124 | } |
||
| 125 | } |
||
| 126 | } |
||
| 127 | </code></pre> |
||
| 128 | 11 | 이름없음 | |
| 129 | --- |
||
| 130 | |||
| 131 | *필드 관련하여 자세한 내용은 아래 URL 참고* |
||
| 132 | |||
| 133 | 12 | 이름없음 | * "UNO.Cranberry ChainCode":https://snplab.synology.me/confluence/display/CBU/Cranberry+Chaincode |