프로젝트

일반

사용자정보

GetProposals » 이력 » 버전 18

이름없음, 2021/06/10 05:30

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 6 이름없음
70 9 이름없음
---
71
72 7 이름없음
*Request Example*
73
74
<pre><code class="java">
75 1 이름없음
query {
76
  getProposals(param: {
77 9 이름없음
    command: "listProposal" 
78
    index:"UpdatedAt" 
79
    lowerBound: "2021-06-02T14:40:23+09:00" 
80
    upperBound: "2021-06-03T00:36:12.148Z" 
81
    did: "G5rw9qAMbozGxySHkMaztD" 
82 7 이름없음
  }) {
83
    proposals {
84
      condition
85
      proposalId
86
      purpose
87
      consumePolicy {
88
        count
89
        maxDataCount
90
        type
91
      }
92
      rewardPolicy {
93
        amount
94
        type
95
      }
96
    }
97
  }
98
}
99
</code></pre>
100
101
*Response Example*
102
103
<pre><code class="java">
104
{
105
  "data": {
106
    "getProposals": {
107
      "proposals": [
108
        {
109
          "condition": "*",
110
          "proposalId": "orPxmv15e2oSPufT3Tm5ky1rnh4Bh1spR2NVefDnkGCAX6AnBap9UQ3k5QiSU6h5rgjv6ZSwZ5kKrTayqBZ9AYSeRX2pRSaSjLsbgtJ6aaEawfz8b",
111
          "purpose": 1000,
112
          "consumePolicy": {
113
            "count": 1,
114
            "maxDataCount": 0,
115
            "type": 2
116
          },
117
          "rewardPolicy": {
118
            "amount": 1000,
119
            "type": 1
120
          }
121
        }
122
      ]
123
    }
124
  }
125
}
126
</code></pre>
127 11 이름없음
128
---
129
130
*필드 관련하여 자세한 내용은 아래 URL 참고*
131
132 12 이름없음
* "UNO.Cranberry ChainCode":https://snplab.synology.me/confluence/display/CBU/Cranberry+Chaincode
클립보드 이미지 추가 (최대 크기: 97.7 MB)