All URIs are relative to https://api-mainnet.celenium.io/v1
| Method | HTTP request | Description |
|---|---|---|
| GetProposal | Get /proposal/{id} | Get proposal info |
| ListProposal | Get /proposal | List proposal info |
| ProposalVotes | Get /proposal/{id}/votes | Get proposal's votes |
ResponsesProposal GetProposal(ctx, id).Execute()
Get proposal info
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
id := int32(56) // int32 | Internal identity
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProposalAPI.GetProposal(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProposalAPI.GetProposal``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetProposal`: ResponsesProposal
fmt.Fprintf(os.Stdout, "Response from `ProposalAPI.GetProposal`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 | Internal identity |
Other parameters are passed through a pointer to a apiGetProposalRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ResponsesProposal ListProposal(ctx).Limit(limit).Offset(offset).Sort(sort).Proposer(proposer).Status(status).Type_(type_).Execute()
List proposal info
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
limit := int32(56) // int32 | Count of requested entities (optional)
offset := int32(56) // int32 | Offset (optional)
sort := "sort_example" // string | Sort order. Default: desc (optional)
proposer := "proposer_example" // string | Proposer celestia address (optional)
status := "status_example" // string | Comma-separated proposal status list (optional)
type_ := "type__example" // string | Comma-separated proposal type list (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProposalAPI.ListProposal(context.Background()).Limit(limit).Offset(offset).Sort(sort).Proposer(proposer).Status(status).Type_(type_).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProposalAPI.ListProposal``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListProposal`: []ResponsesProposal
fmt.Fprintf(os.Stdout, "Response from `ProposalAPI.ListProposal`: %v\n", resp)
}Other parameters are passed through a pointer to a apiListProposalRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | int32 | Count of requested entities | |
| offset | int32 | Offset | |
| sort | string | Sort order. Default: desc | |
| proposer | string | Proposer celestia address | |
| status | string | Comma-separated proposal status list | |
| type_ | string | Comma-separated proposal type list |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ResponsesVote ProposalVotes(ctx, id).Limit(limit).Offset(offset).Option(option).Voter(voter).Address(address).Validator(validator).Execute()
Get proposal's votes
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
id := int32(56) // int32 | Internal identity
limit := int32(56) // int32 | Count of requested entities (optional)
offset := int32(56) // int32 | Offset (optional)
option := "option_example" // string | Option (optional)
voter := "voter_example" // string | Voter type (optional)
address := "address_example" // string | Voter address (optional)
validator := "validator_example" // string | Voter address (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProposalAPI.ProposalVotes(context.Background(), id).Limit(limit).Offset(offset).Option(option).Voter(voter).Address(address).Validator(validator).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProposalAPI.ProposalVotes``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ProposalVotes`: []ResponsesVote
fmt.Fprintf(os.Stdout, "Response from `ProposalAPI.ProposalVotes`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 | Internal identity |
Other parameters are passed through a pointer to a apiProposalVotesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
limit | int32 | Count of requested entities | offset | int32 | Offset | option | string | Option | voter | string | Voter type | address | string | Voter address | validator | string | Voter address |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]