|
2 | 2 | ## SDK Installation
|
3 | 3 |
|
4 | 4 | ```bash
|
5 |
| -gem install openapi |
| 5 | +go get github.com/speakeasy-api/speakeasy-client-sdk-ruby |
6 | 6 | ```
|
7 | 7 | <!-- End SDK Installation -->
|
8 | 8 |
|
9 | 9 | ## SDK Example Usage
|
10 | 10 | <!-- Start SDK Example Usage -->
|
11 |
| -```ruby |
12 |
| -require_relative sdk |
| 11 | +```go |
| 12 | +package main |
| 13 | + |
| 14 | +import( |
| 15 | + "context" |
| 16 | + "log" |
| 17 | + "openapi" |
| 18 | + "openapi/pkg/models/operations" |
| 19 | +) |
13 | 20 |
|
14 |
| -s = sdk::SDK.new() |
15 |
| -s.config_security( |
16 |
| - security=Shared::Security( |
17 |
| - api_key="YOUR_API_KEY_HERE", |
| 21 | +func main() { |
| 22 | + s := sdk.New( |
| 23 | + sdk.WithSecurity(shared.Security{ |
| 24 | + APIKey: "YOUR_API_KEY_HERE", |
| 25 | + }), |
18 | 26 | )
|
19 |
| -) |
20 |
| - |
21 |
| -req = operations.Operations::GetApisRequest( |
22 |
| - query_params=Operations::GetApisQueryParams( |
23 |
| - metadata={ |
24 |
| - "deserunt": [ |
| 27 | + |
| 28 | + ctx := context.Background() |
| 29 | + res, err := s.Apis.GetApis(ctx, operations.GetApisRequest{ |
| 30 | + Metadata: map[string][]string{ |
| 31 | + "provident": []string{ |
| 32 | + "quibusdam", |
| 33 | + "unde", |
25 | 34 | "nulla",
|
26 |
| - "id", |
27 |
| - "vero", |
28 |
| - ], |
29 |
| - "perspiciatis": [ |
30 |
| - "nihil", |
31 |
| - "fuga", |
32 |
| - "facilis", |
33 |
| - "eum", |
34 |
| - ], |
35 |
| - "iusto": [ |
36 |
| - "saepe", |
37 |
| - "inventore", |
38 |
| - ], |
| 35 | + }, |
| 36 | + "corrupti": []string{ |
| 37 | + "vel", |
| 38 | + "error", |
| 39 | + "deserunt", |
| 40 | + "suscipit", |
| 41 | + }, |
| 42 | + "iure": []string{ |
| 43 | + "debitis", |
| 44 | + "ipsa", |
| 45 | + }, |
39 | 46 | },
|
40 |
| - op=Operations::GetApisOp( |
41 |
| - and_=false, |
42 |
| - ), |
43 |
| - ), |
44 |
| -) |
45 |
| - |
46 |
| -res = s.apis::get_apis(req) |
47 |
| - |
48 |
| -if ! res.apis.nil? |
49 |
| - # handle response |
| 47 | + Op: &operations.GetApisOp{ |
| 48 | + And: false, |
| 49 | + }, |
| 50 | + }) |
| 51 | + if err != nil { |
| 52 | + log.Fatal(err) |
| 53 | + } |
| 54 | + |
| 55 | + if res.Apis != nil { |
| 56 | + // handle response |
| 57 | + } |
| 58 | +} |
50 | 59 | ```
|
51 | 60 | <!-- End SDK Example Usage -->
|
52 | 61 |
|
53 | 62 | <!-- Start SDK Available Operations -->
|
54 |
| -## SDK Available Operations |
| 63 | +## Available Resources and Operations |
55 | 64 |
|
| 65 | +### [SDK](docs/sdk/README.md) |
56 | 66 |
|
57 |
| -* `validate_api_key` - Validate the current api key. |
| 67 | +* [ValidateAPIKey](docs/sdk/README.md#validateapikey) - Validate the current api key. |
58 | 68 |
|
| 69 | +### [APIEndpoints](docs/apiendpoints/README.md) |
59 | 70 |
|
60 |
| -* `delete_api_endpoint` - Delete an ApiEndpoint. |
61 |
| -* `find_api_endpoint` - Find an ApiEndpoint via its displayName. |
62 |
| -* `generate_open_api_spec_for_api_endpoint` - Generate an OpenAPI specification for a particular ApiEndpoint. |
63 |
| -* `generate_postman_collection_for_api_endpoint` - Generate a Postman collection for a particular ApiEndpoint. |
64 |
| -* `get_all_api_endpoints` - Get all Api endpoints for a particular apiID. |
65 |
| -* `get_all_for_version_api_endpoints` - Get all ApiEndpoints for a particular apiID and versionID. |
66 |
| -* `get_api_endpoint` - Get an ApiEndpoint. |
67 |
| -* `upsert_api_endpoint` - Upsert an ApiEndpoint. |
| 71 | +* [DeleteAPIEndpoint](docs/apiendpoints/README.md#deleteapiendpoint) - Delete an ApiEndpoint. |
| 72 | +* [FindAPIEndpoint](docs/apiendpoints/README.md#findapiendpoint) - Find an ApiEndpoint via its displayName. |
| 73 | +* [GenerateOpenAPISpecForAPIEndpoint](docs/apiendpoints/README.md#generateopenapispecforapiendpoint) - Generate an OpenAPI specification for a particular ApiEndpoint. |
| 74 | +* [GeneratePostmanCollectionForAPIEndpoint](docs/apiendpoints/README.md#generatepostmancollectionforapiendpoint) - Generate a Postman collection for a particular ApiEndpoint. |
| 75 | +* [GetAllAPIEndpoints](docs/apiendpoints/README.md#getallapiendpoints) - Get all Api endpoints for a particular apiID. |
| 76 | +* [GetAllForVersionAPIEndpoints](docs/apiendpoints/README.md#getallforversionapiendpoints) - Get all ApiEndpoints for a particular apiID and versionID. |
| 77 | +* [GetAPIEndpoint](docs/apiendpoints/README.md#getapiendpoint) - Get an ApiEndpoint. |
| 78 | +* [UpsertAPIEndpoint](docs/apiendpoints/README.md#upsertapiendpoint) - Upsert an ApiEndpoint. |
68 | 79 |
|
| 80 | +### [Apis](docs/apis/README.md) |
69 | 81 |
|
70 |
| -* `delete_api` - Delete an Api. |
71 |
| -* `generate_open_api_spec` - Generate an OpenAPI specification for a particular Api. |
72 |
| -* `generate_postman_collection` - Generate a Postman collection for a particular Api. |
73 |
| -* `get_all_api_versions` - Get all Api versions for a particular ApiEndpoint. |
74 |
| -* `get_apis` - Get a list of Apis for a given workspace |
75 |
| -* `upsert_api` - Upsert an Api |
| 82 | +* [DeleteAPI](docs/apis/README.md#deleteapi) - Delete an Api. |
| 83 | +* [GenerateOpenAPISpec](docs/apis/README.md#generateopenapispec) - Generate an OpenAPI specification for a particular Api. |
| 84 | +* [GeneratePostmanCollection](docs/apis/README.md#generatepostmancollection) - Generate a Postman collection for a particular Api. |
| 85 | +* [GetAllAPIVersions](docs/apis/README.md#getallapiversions) - Get all Api versions for a particular ApiEndpoint. |
| 86 | +* [GetApis](docs/apis/README.md#getapis) - Get a list of Apis for a given workspace |
| 87 | +* [UpsertAPI](docs/apis/README.md#upsertapi) - Upsert an Api |
76 | 88 |
|
| 89 | +### [Embeds](docs/embeds/README.md) |
77 | 90 |
|
78 |
| -* `get_embed_access_token` - Get an embed access token for the current workspace. |
79 |
| -* `get_valid_embed_access_tokens` - Get all valid embed access tokens for the current workspace. |
80 |
| -* `revoke_embed_access_token` - Revoke an embed access EmbedToken. |
| 91 | +* [GetEmbedAccessToken](docs/embeds/README.md#getembedaccesstoken) - Get an embed access token for the current workspace. |
| 92 | +* [GetValidEmbedAccessTokens](docs/embeds/README.md#getvalidembedaccesstokens) - Get all valid embed access tokens for the current workspace. |
| 93 | +* [RevokeEmbedAccessToken](docs/embeds/README.md#revokeembedaccesstoken) - Revoke an embed access EmbedToken. |
81 | 94 |
|
| 95 | +### [Metadata](docs/metadata/README.md) |
82 | 96 |
|
83 |
| -* `delete_version_metadata` - Delete metadata for a particular apiID and versionID. |
84 |
| -* `get_version_metadata` - Get all metadata for a particular apiID and versionID. |
85 |
| -* `insert_version_metadata` - Insert metadata for a particular apiID and versionID. |
| 97 | +* [DeleteVersionMetadata](docs/metadata/README.md#deleteversionmetadata) - Delete metadata for a particular apiID and versionID. |
| 98 | +* [GetVersionMetadata](docs/metadata/README.md#getversionmetadata) - Get all metadata for a particular apiID and versionID. |
| 99 | +* [InsertVersionMetadata](docs/metadata/README.md#insertversionmetadata) - Insert metadata for a particular apiID and versionID. |
86 | 100 |
|
| 101 | +### [Plugins](docs/plugins/README.md) |
87 | 102 |
|
88 |
| -* `get_plugins` - Get all plugins for the current workspace. |
89 |
| -* `run_plugin` - Run a plugin |
90 |
| -* `upsert_plugin` - Upsert a plugin |
| 103 | +* [GetPlugins](docs/plugins/README.md#getplugins) - Get all plugins for the current workspace. |
| 104 | +* [RunPlugin](docs/plugins/README.md#runplugin) - Run a plugin |
| 105 | +* [UpsertPlugin](docs/plugins/README.md#upsertplugin) - Upsert a plugin |
91 | 106 |
|
| 107 | +### [Requests](docs/requests/README.md) |
92 | 108 |
|
93 |
| -* `generate_request_postman_collection` - Generate a Postman collection for a particular request. |
94 |
| -* `get_request_from_event_log` - Get information about a particular request. |
95 |
| -* `query_event_log` - Query the event log to retrieve a list of requests. |
| 109 | +* [GenerateRequestPostmanCollection](docs/requests/README.md#generaterequestpostmancollection) - Generate a Postman collection for a particular request. |
| 110 | +* [GetRequestFromEventLog](docs/requests/README.md#getrequestfromeventlog) - Get information about a particular request. |
| 111 | +* [QueryEventLog](docs/requests/README.md#queryeventlog) - Query the event log to retrieve a list of requests. |
96 | 112 |
|
| 113 | +### [Schemas](docs/schemas/README.md) |
97 | 114 |
|
98 |
| -* `delete_schema` - Delete a particular schema revision for an Api. |
99 |
| -* `download_schema` - Download the latest schema for a particular apiID. |
100 |
| -* `download_schema_revision` - Download a particular schema revision for an Api. |
101 |
| -* `get_schema` - Get information about the latest schema. |
102 |
| -* `get_schema_diff` - Get a diff of two schema revisions for an Api. |
103 |
| -* `get_schema_revision` - Get information about a particular schema revision for an Api. |
104 |
| -* `get_schemas` - Get information about all schemas associated with a particular apiID. |
105 |
| -* `register_schema` - Register a schema. |
| 115 | +* [DeleteSchema](docs/schemas/README.md#deleteschema) - Delete a particular schema revision for an Api. |
| 116 | +* [DownloadSchema](docs/schemas/README.md#downloadschema) - Download the latest schema for a particular apiID. |
| 117 | +* [DownloadSchemaRevision](docs/schemas/README.md#downloadschemarevision) - Download a particular schema revision for an Api. |
| 118 | +* [GetSchema](docs/schemas/README.md#getschema) - Get information about the latest schema. |
| 119 | +* [GetSchemaDiff](docs/schemas/README.md#getschemadiff) - Get a diff of two schema revisions for an Api. |
| 120 | +* [GetSchemaRevision](docs/schemas/README.md#getschemarevision) - Get information about a particular schema revision for an Api. |
| 121 | +* [GetSchemas](docs/schemas/README.md#getschemas) - Get information about all schemas associated with a particular apiID. |
| 122 | +* [RegisterSchema](docs/schemas/README.md#registerschema) - Register a schema. |
106 | 123 | <!-- End SDK Available Operations -->
|
107 | 124 |
|
108 | 125 | ### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)
|
0 commit comments