Skip to content

Commit

Permalink
Auto-generated SDK v1.0.0-beta6
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions Bot committed Jun 6, 2024
1 parent c574ffa commit f3585c8
Show file tree
Hide file tree
Showing 157 changed files with 12,441 additions and 1,600 deletions.
8 changes: 8 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ api_webhooks.go
client.go
configuration.go
docs/APIKey.md
docs/APIKeyWithSecret.md
docs/AcceptInvite200Response.md
docs/AcceptInviteRequest.md
docs/AddKey.md
Expand Down Expand Up @@ -41,6 +42,8 @@ docs/ChainStatus.md
docs/ChainsAPI.md
docs/Contract.md
docs/ContractABI.md
docs/ContractABIError.md
docs/ContractABIErrorArgument.md
docs/ContractABIEvent.md
docs/ContractABIEventArgument.md
docs/ContractABIMethod.md
Expand Down Expand Up @@ -84,6 +87,7 @@ docs/EventsAPI.md
docs/ExecuteArbitraryEventQuery200Response.md
docs/FieldType.md
docs/GasParams.md
docs/GetApiKey200Response.md
docs/GetBlock200Response.md
docs/GetChainStatus200Response.md
docs/GetContract200Response.md
Expand Down Expand Up @@ -162,6 +166,7 @@ model_add_key.go
model_address.go
model_address_label.go
model_api_key.go
model_api_key_with_secret.go
model_audit_log.go
model_azure_account.go
model_azure_hardware_wallet.go
Expand All @@ -181,6 +186,8 @@ model_chain_name.go
model_chain_status.go
model_contract.go
model_contract_abi.go
model_contract_abi_error.go
model_contract_abi_error_argument.go
model_contract_abi_event.go
model_contract_abi_event_argument.go
model_contract_abi_method.go
Expand Down Expand Up @@ -222,6 +229,7 @@ model_event_type_conversion_options.go
model_execute_arbitrary_event_query_200_response.go
model_field_type.go
model_gas_params.go
model_get_api_key_200_response.go
model_get_block_200_response.go
model_get_chain_status_200_response.go
model_get_contract_200_response.go
Expand Down
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.1
7.6.0
35 changes: 20 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,28 @@ MultiBaas's REST APIv0.
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.

- API version: 0.0
- Package version: 1.0.0-beta0
- Package version: 1.0.0-beta6
- Generator version: 7.6.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen

## Installation

Install the following dependencies:

```shell
```sh
go get github.com/stretchr/testify/assert
go get golang.org/x/net/context
```

Put the package under your project folder and add the following in import:

```golang
```go
import multibaas "github.com/curvegrid/multibaas-sdk-go"
```

To use a proxy, set the environment variable `HTTP_PROXY`:

```golang
```go
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
```

Expand All @@ -36,17 +37,17 @@ Default configuration comes with `Servers` field that contains server objects as

### Select Server Configuration

For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
For using other server than the one defined on index 0 set context value `multibaas.ContextServerIndex` of type `int`.

```golang
```go
ctx := context.WithValue(context.Background(), multibaas.ContextServerIndex, 1)
```

### Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
Templated server URL is formatted using default variables from configuration or from context value `multibaas.ContextServerVariables` of type `map[string]string`.

```golang
```go
ctx := context.WithValue(context.Background(), multibaas.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Expand All @@ -58,9 +59,9 @@ Note, enum values are always validated and all unused variables are silently ign

Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
Similar rules for overriding default operation server index and variables applies by using `multibaas.ContextOperationServerIndices` and `multibaas.ContextOperationServerVariables` context maps.

```golang
```go
ctx := context.WithValue(context.Background(), multibaas.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
Expand Down Expand Up @@ -168,6 +169,7 @@ Class | Method | HTTP request | Description
## Documentation For Models

- [APIKey](docs/APIKey.md)
- [APIKeyWithSecret](docs/APIKeyWithSecret.md)
- [AcceptInvite200Response](docs/AcceptInvite200Response.md)
- [AcceptInviteRequest](docs/AcceptInviteRequest.md)
- [AddKey](docs/AddKey.md)
Expand All @@ -193,6 +195,8 @@ Class | Method | HTTP request | Description
- [ChainStatus](docs/ChainStatus.md)
- [Contract](docs/Contract.md)
- [ContractABI](docs/ContractABI.md)
- [ContractABIError](docs/ContractABIError.md)
- [ContractABIErrorArgument](docs/ContractABIErrorArgument.md)
- [ContractABIEvent](docs/ContractABIEvent.md)
- [ContractABIEventArgument](docs/ContractABIEventArgument.md)
- [ContractABIMethod](docs/ContractABIMethod.md)
Expand Down Expand Up @@ -233,6 +237,7 @@ Class | Method | HTTP request | Description
- [ExecuteArbitraryEventQuery200Response](docs/ExecuteArbitraryEventQuery200Response.md)
- [FieldType](docs/FieldType.md)
- [GasParams](docs/GasParams.md)
- [GetApiKey200Response](docs/GetApiKey200Response.md)
- [GetBlock200Response](docs/GetBlock200Response.md)
- [GetChainStatus200Response](docs/GetChainStatus200Response.md)
- [GetContract200Response](docs/GetContract200Response.md)
Expand Down Expand Up @@ -312,8 +317,8 @@ Authentication schemes defined for the API:

Example

```golang
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
```go
auth := context.WithValue(context.Background(), multibaas.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)
```

Expand All @@ -327,11 +332,11 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i

Example

```golang
```go
auth := context.WithValue(
context.Background(),
sw.ContextAPIKeys,
map[string]sw.APIKey{
multibaas.ContextAPIKeys,
map[string]multibaas.APIKey{
"token": {Key: "API_KEY_STRING"},
},
)
Expand Down
Loading

0 comments on commit f3585c8

Please sign in to comment.