diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 8c3d2fd..42f8fe6 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -56,6 +56,7 @@ docs/ResponsesPrice.md docs/ResponsesRedelegation.md docs/ResponsesRollup.md docs/ResponsesRollupAllSeriesItem.md +docs/ResponsesRollupAllSeriesResponse.md docs/ResponsesRollupGroupedStats.md docs/ResponsesRollupStats24h.md docs/ResponsesRollupWithDayStats.md @@ -124,6 +125,7 @@ model_responses_price.go model_responses_redelegation.go model_responses_rollup.go model_responses_rollup_all_series_item.go +model_responses_rollup_all_series_response.go model_responses_rollup_grouped_stats.go model_responses_rollup_stats24h.go model_responses_rollup_with_day_stats.go diff --git a/README.md b/README.md index aadde40..9ffc8d5 100644 --- a/README.md +++ b/README.md @@ -200,6 +200,7 @@ Class | Method | HTTP request | Description - [ResponsesRedelegation](docs/ResponsesRedelegation.md) - [ResponsesRollup](docs/ResponsesRollup.md) - [ResponsesRollupAllSeriesItem](docs/ResponsesRollupAllSeriesItem.md) + - [ResponsesRollupAllSeriesResponse](docs/ResponsesRollupAllSeriesResponse.md) - [ResponsesRollupGroupedStats](docs/ResponsesRollupGroupedStats.md) - [ResponsesRollupStats24h](docs/ResponsesRollupStats24h.md) - [ResponsesRollupWithDayStats](docs/ResponsesRollupWithDayStats.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 8595658..633f060 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -2502,11 +2502,7 @@ paths: application/json: schema: items: - additionalProperties: - items: - $ref: '#/components/schemas/responses.RollupAllSeriesItem' - type: array - type: object + $ref: '#/components/schemas/responses.RollupAllSeriesResponse' type: array description: OK "400": @@ -5879,6 +5875,30 @@ components: format: integer type: integer type: object + responses.RollupAllSeriesResponse: + example: + time: 2023-07-04T03:10:57Z + items: + - blobs_count: 123 + size: 123 + fee: "123" + name: Rollup name + logo: https://some_link.com/image.png + - blobs_count: 123 + size: 123 + fee: "123" + name: Rollup name + logo: https://some_link.com/image.png + properties: + items: + items: + $ref: '#/components/schemas/responses.RollupAllSeriesItem' + type: array + time: + example: 2023-07-04T03:10:57Z + format: date-time + type: string + type: object responses.RollupGroupedStats: example: blobs_count: 2 @@ -6349,6 +6369,7 @@ components: example: synced: true chain_id: mocha-4 + total_namespaces: 312 total_supply: "312" total_tx: 23456 total_stake: "312" @@ -6403,6 +6424,10 @@ components: example: "312" format: string type: string + total_namespaces: + example: 312 + format: string + type: integer total_stake: example: "312" format: string diff --git a/api_rollup.go b/api_rollup.go index bb1e567..061e020 100644 --- a/api_rollup.go +++ b/api_rollup.go @@ -154,7 +154,7 @@ type ApiGetRollupAllSeriesRequest struct { timeframe string } -func (r ApiGetRollupAllSeriesRequest) Execute() ([]map[string][]ResponsesRollupAllSeriesItem, *http.Response, error) { +func (r ApiGetRollupAllSeriesRequest) Execute() ([]ResponsesRollupAllSeriesResponse, *http.Response, error) { return r.ApiService.GetRollupAllSeriesExecute(r) } @@ -176,13 +176,13 @@ func (a *RollupAPIService) GetRollupAllSeries(ctx context.Context, timeframe str } // Execute executes the request -// @return []map[string][]ResponsesRollupAllSeriesItem -func (a *RollupAPIService) GetRollupAllSeriesExecute(r ApiGetRollupAllSeriesRequest) ([]map[string][]ResponsesRollupAllSeriesItem, *http.Response, error) { +// @return []ResponsesRollupAllSeriesResponse +func (a *RollupAPIService) GetRollupAllSeriesExecute(r ApiGetRollupAllSeriesRequest) ([]ResponsesRollupAllSeriesResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue []map[string][]ResponsesRollupAllSeriesItem + localVarReturnValue []ResponsesRollupAllSeriesResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RollupAPIService.GetRollupAllSeries") diff --git a/docs/ResponsesRollupAllSeriesResponse.md b/docs/ResponsesRollupAllSeriesResponse.md new file mode 100644 index 0000000..20b604f --- /dev/null +++ b/docs/ResponsesRollupAllSeriesResponse.md @@ -0,0 +1,82 @@ +# ResponsesRollupAllSeriesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | Pointer to [**[]ResponsesRollupAllSeriesItem**](ResponsesRollupAllSeriesItem.md) | | [optional] +**Time** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewResponsesRollupAllSeriesResponse + +`func NewResponsesRollupAllSeriesResponse() *ResponsesRollupAllSeriesResponse` + +NewResponsesRollupAllSeriesResponse instantiates a new ResponsesRollupAllSeriesResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponsesRollupAllSeriesResponseWithDefaults + +`func NewResponsesRollupAllSeriesResponseWithDefaults() *ResponsesRollupAllSeriesResponse` + +NewResponsesRollupAllSeriesResponseWithDefaults instantiates a new ResponsesRollupAllSeriesResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetItems + +`func (o *ResponsesRollupAllSeriesResponse) GetItems() []ResponsesRollupAllSeriesItem` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *ResponsesRollupAllSeriesResponse) GetItemsOk() (*[]ResponsesRollupAllSeriesItem, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *ResponsesRollupAllSeriesResponse) SetItems(v []ResponsesRollupAllSeriesItem)` + +SetItems sets Items field to given value. + +### HasItems + +`func (o *ResponsesRollupAllSeriesResponse) HasItems() bool` + +HasItems returns a boolean if a field has been set. + +### GetTime + +`func (o *ResponsesRollupAllSeriesResponse) GetTime() time.Time` + +GetTime returns the Time field if non-nil, zero value otherwise. + +### GetTimeOk + +`func (o *ResponsesRollupAllSeriesResponse) GetTimeOk() (*time.Time, bool)` + +GetTimeOk returns a tuple with the Time field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTime + +`func (o *ResponsesRollupAllSeriesResponse) SetTime(v time.Time)` + +SetTime sets Time field to given value. + +### HasTime + +`func (o *ResponsesRollupAllSeriesResponse) HasTime() bool` + +HasTime returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponsesState.md b/docs/ResponsesState.md index 1811346..4209750 100644 --- a/docs/ResponsesState.md +++ b/docs/ResponsesState.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **TotalAccounts** | Pointer to **int64** | | [optional] **TotalBlobsSize** | Pointer to **int64** | | [optional] **TotalFee** | Pointer to **string** | | [optional] +**TotalNamespaces** | Pointer to **int32** | | [optional] **TotalStake** | Pointer to **string** | | [optional] **TotalSupply** | Pointer to **string** | | [optional] **TotalTx** | Pointer to **int64** | | [optional] @@ -289,6 +290,31 @@ SetTotalFee sets TotalFee field to given value. HasTotalFee returns a boolean if a field has been set. +### GetTotalNamespaces + +`func (o *ResponsesState) GetTotalNamespaces() int32` + +GetTotalNamespaces returns the TotalNamespaces field if non-nil, zero value otherwise. + +### GetTotalNamespacesOk + +`func (o *ResponsesState) GetTotalNamespacesOk() (*int32, bool)` + +GetTotalNamespacesOk returns a tuple with the TotalNamespaces field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalNamespaces + +`func (o *ResponsesState) SetTotalNamespaces(v int32)` + +SetTotalNamespaces sets TotalNamespaces field to given value. + +### HasTotalNamespaces + +`func (o *ResponsesState) HasTotalNamespaces() bool` + +HasTotalNamespaces returns a boolean if a field has been set. + ### GetTotalStake `func (o *ResponsesState) GetTotalStake() string` diff --git a/docs/RollupAPI.md b/docs/RollupAPI.md index c0c08dc..bdbd76a 100644 --- a/docs/RollupAPI.md +++ b/docs/RollupAPI.md @@ -91,7 +91,7 @@ No authorization required ## GetRollupAllSeries -> []map[string][]ResponsesRollupAllSeriesItem GetRollupAllSeries(ctx, timeframe).Execute() +> []ResponsesRollupAllSeriesResponse GetRollupAllSeries(ctx, timeframe).Execute() Get series for all rollups @@ -119,7 +119,7 @@ func main() { fmt.Fprintf(os.Stderr, "Error when calling `RollupAPI.GetRollupAllSeries``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `GetRollupAllSeries`: []map[string][]ResponsesRollupAllSeriesItem + // response from `GetRollupAllSeries`: []ResponsesRollupAllSeriesResponse fmt.Fprintf(os.Stdout, "Response from `RollupAPI.GetRollupAllSeries`: %v\n", resp) } ``` @@ -143,7 +143,7 @@ Name | Type | Description | Notes ### Return type -[**[]map[string][]ResponsesRollupAllSeriesItem**](map.md) +[**[]ResponsesRollupAllSeriesResponse**](ResponsesRollupAllSeriesResponse.md) ### Authorization diff --git a/model_responses_rollup_all_series_response.go b/model_responses_rollup_all_series_response.go new file mode 100644 index 0000000..c839fe6 --- /dev/null +++ b/model_responses_rollup_all_series_response.go @@ -0,0 +1,164 @@ +/* +Celenium API + +Celenium API is a powerful tool to access all blockchain data that is processed and indexed by our proprietary indexer. With Celenium API you can retrieve all historical data, off-chain data, blobs and statistics through our REST API. Celenium API indexer are open source, which allows you to not depend on third-party services. You can clone, build and run them independently, giving you full control over all components. If you have any questions or feature requests, please feel free to contact us. We appreciate your feedback! + +API version: 1.0 +Contact: celenium@pklabs.me +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package celenium + +import ( + "encoding/json" + "time" +) + +// checks if the ResponsesRollupAllSeriesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponsesRollupAllSeriesResponse{} + +// ResponsesRollupAllSeriesResponse struct for ResponsesRollupAllSeriesResponse +type ResponsesRollupAllSeriesResponse struct { + Items []ResponsesRollupAllSeriesItem `json:"items,omitempty"` + Time *time.Time `json:"time,omitempty"` +} + +// NewResponsesRollupAllSeriesResponse instantiates a new ResponsesRollupAllSeriesResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponsesRollupAllSeriesResponse() *ResponsesRollupAllSeriesResponse { + this := ResponsesRollupAllSeriesResponse{} + return &this +} + +// NewResponsesRollupAllSeriesResponseWithDefaults instantiates a new ResponsesRollupAllSeriesResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponsesRollupAllSeriesResponseWithDefaults() *ResponsesRollupAllSeriesResponse { + this := ResponsesRollupAllSeriesResponse{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ResponsesRollupAllSeriesResponse) GetItems() []ResponsesRollupAllSeriesItem { + if o == nil || IsNil(o.Items) { + var ret []ResponsesRollupAllSeriesItem + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponsesRollupAllSeriesResponse) GetItemsOk() ([]ResponsesRollupAllSeriesItem, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ResponsesRollupAllSeriesResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []ResponsesRollupAllSeriesItem and assigns it to the Items field. +func (o *ResponsesRollupAllSeriesResponse) SetItems(v []ResponsesRollupAllSeriesItem) { + o.Items = v +} + +// GetTime returns the Time field value if set, zero value otherwise. +func (o *ResponsesRollupAllSeriesResponse) GetTime() time.Time { + if o == nil || IsNil(o.Time) { + var ret time.Time + return ret + } + return *o.Time +} + +// GetTimeOk returns a tuple with the Time field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponsesRollupAllSeriesResponse) GetTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.Time) { + return nil, false + } + return o.Time, true +} + +// HasTime returns a boolean if a field has been set. +func (o *ResponsesRollupAllSeriesResponse) HasTime() bool { + if o != nil && !IsNil(o.Time) { + return true + } + + return false +} + +// SetTime gets a reference to the given time.Time and assigns it to the Time field. +func (o *ResponsesRollupAllSeriesResponse) SetTime(v time.Time) { + o.Time = &v +} + +func (o ResponsesRollupAllSeriesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponsesRollupAllSeriesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + if !IsNil(o.Time) { + toSerialize["time"] = o.Time + } + return toSerialize, nil +} + +type NullableResponsesRollupAllSeriesResponse struct { + value *ResponsesRollupAllSeriesResponse + isSet bool +} + +func (v NullableResponsesRollupAllSeriesResponse) Get() *ResponsesRollupAllSeriesResponse { + return v.value +} + +func (v *NullableResponsesRollupAllSeriesResponse) Set(val *ResponsesRollupAllSeriesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableResponsesRollupAllSeriesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableResponsesRollupAllSeriesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponsesRollupAllSeriesResponse(val *ResponsesRollupAllSeriesResponse) *NullableResponsesRollupAllSeriesResponse { + return &NullableResponsesRollupAllSeriesResponse{value: val, isSet: true} +} + +func (v NullableResponsesRollupAllSeriesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponsesRollupAllSeriesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_responses_state.go b/model_responses_state.go index 8a38bf8..fc08246 100644 --- a/model_responses_state.go +++ b/model_responses_state.go @@ -31,6 +31,7 @@ type ResponsesState struct { TotalAccounts *int64 `json:"total_accounts,omitempty"` TotalBlobsSize *int64 `json:"total_blobs_size,omitempty"` TotalFee *string `json:"total_fee,omitempty"` + TotalNamespaces *int32 `json:"total_namespaces,omitempty"` TotalStake *string `json:"total_stake,omitempty"` TotalSupply *string `json:"total_supply,omitempty"` TotalTx *int64 `json:"total_tx,omitempty"` @@ -375,6 +376,38 @@ func (o *ResponsesState) SetTotalFee(v string) { o.TotalFee = &v } +// GetTotalNamespaces returns the TotalNamespaces field value if set, zero value otherwise. +func (o *ResponsesState) GetTotalNamespaces() int32 { + if o == nil || IsNil(o.TotalNamespaces) { + var ret int32 + return ret + } + return *o.TotalNamespaces +} + +// GetTotalNamespacesOk returns a tuple with the TotalNamespaces field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponsesState) GetTotalNamespacesOk() (*int32, bool) { + if o == nil || IsNil(o.TotalNamespaces) { + return nil, false + } + return o.TotalNamespaces, true +} + +// HasTotalNamespaces returns a boolean if a field has been set. +func (o *ResponsesState) HasTotalNamespaces() bool { + if o != nil && !IsNil(o.TotalNamespaces) { + return true + } + + return false +} + +// SetTotalNamespaces gets a reference to the given int32 and assigns it to the TotalNamespaces field. +func (o *ResponsesState) SetTotalNamespaces(v int32) { + o.TotalNamespaces = &v +} + // GetTotalStake returns the TotalStake field value if set, zero value otherwise. func (o *ResponsesState) GetTotalStake() string { if o == nil || IsNil(o.TotalStake) { @@ -575,6 +608,9 @@ func (o ResponsesState) ToMap() (map[string]interface{}, error) { if !IsNil(o.TotalFee) { toSerialize["total_fee"] = o.TotalFee } + if !IsNil(o.TotalNamespaces) { + toSerialize["total_namespaces"] = o.TotalNamespaces + } if !IsNil(o.TotalStake) { toSerialize["total_stake"] = o.TotalStake }