# README
github.com/speakeasy-api/speakeasy-client-sdk-go
SDK Installation
go get github.com/speakeasy-api/speakeasy-client-sdk-go
SDK Example Usage
package main
import (
"context"
speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go"
"github.com/speakeasy-api/speakeasy-client-sdk-go/pkg/models/operations"
"github.com/speakeasy-api/speakeasy-client-sdk-go/pkg/models/shared"
"log"
)
func main() {
s := speakeasyclientsdkgo.New(
speakeasyclientsdkgo.WithSecurity(""),
)
ctx := context.Background()
res, err := s.Apis.GetApis(ctx, operations.GetApisRequest{
Metadata: map[string][]string{
"key": []string{
"string",
},
},
Op: &operations.GetApisOp{
And: false,
},
})
if err != nil {
log.Fatal(err)
}
if res.Apis != nil {
// handle response
}
}
Available Resources and Operations
Speakeasy SDK
- ValidateAPIKey - Validate the current api key.
APIEndpoints
- DeleteAPIEndpoint - Delete an ApiEndpoint.
- FindAPIEndpoint - Find an ApiEndpoint via its displayName.
- GenerateOpenAPISpecForAPIEndpoint - Generate an OpenAPI specification for a particular ApiEndpoint.
- GeneratePostmanCollectionForAPIEndpoint - Generate a Postman collection for a particular ApiEndpoint.
- GetAllAPIEndpoints - Get all Api endpoints for a particular apiID.
- GetAllForVersionAPIEndpoints - Get all ApiEndpoints for a particular apiID and versionID.
- GetAPIEndpoint - Get an ApiEndpoint.
- UpsertAPIEndpoint - Upsert an ApiEndpoint.
Apis
- DeleteAPI - Delete an Api.
- GenerateOpenAPISpec - Generate an OpenAPI specification for a particular Api.
- GeneratePostmanCollection - Generate a Postman collection for a particular Api.
- GetAllAPIVersions - Get all Api versions for a particular ApiEndpoint.
- GetApis - Get a list of Apis for a given workspace
- UpsertAPI - Upsert an Api
Embeds
- GetEmbedAccessToken - Get an embed access token for the current workspace.
- GetValidEmbedAccessTokens - Get all valid embed access tokens for the current workspace.
- RevokeEmbedAccessToken - Revoke an embed access EmbedToken.
Metadata
- DeleteVersionMetadata - Delete metadata for a particular apiID and versionID.
- GetVersionMetadata - Get all metadata for a particular apiID and versionID.
- InsertVersionMetadata - Insert metadata for a particular apiID and versionID.
Plugins
- GetPlugins - Get all plugins for the current workspace.
- RunPlugin - Run a plugin
- UpsertPlugin - Upsert a plugin
Requests
- GenerateRequestPostmanCollection - Generate a Postman collection for a particular request.
- GetRequestFromEventLog - Get information about a particular request.
- QueryEventLog - Query the event log to retrieve a list of requests.
Schemas
- DeleteSchema - Delete a particular schema revision for an Api.
- DownloadSchema - Download the latest schema for a particular apiID.
- DownloadSchemaRevision - Download a particular schema revision for an Api.
- GetSchema - Get information about the latest schema.
- GetSchemaDiff - Get a diff of two schema revisions for an Api.
- GetSchemaRevision - Get information about a particular schema revision for an Api.
- GetSchemas - Get information about all schemas associated with a particular apiID.
- RegisterSchema - Register a schema.
Dev Containers
Experience our SDK in an enhanced sandbox environment. Try it now in GitHub Codespaces!
Pagination
Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
returned response object will have a Next
method that can be called to pull down the next group of results. If the
return value of Next
is nil
, then there are no more pages to be fetched.
Here's an example of one such pagination call:
SDK Generated by Speakeasy
# Packages
No description provided by the author
# Functions
Bool provides a helper function to return a pointer to a bool.
Float32 provides a helper function to return a pointer to a float32.
Float64 provides a helper function to return a pointer to a float64.
Int provides a helper function to return a pointer to an int.
Int64 provides a helper function to return a pointer to an int64.
New creates a new instance of the SDK with the provided options.
String provides a helper function to return a pointer to a string.
WithClient allows the overriding of the default HTTP client used by the SDK.
No description provided by the author
No description provided by the author
WithServer allows the overriding of the default server by name.
WithServerURL allows the overriding of the default server URL.
WithTemplatedServerURL allows the overriding of the default server URL with a templated URL populated with the provided parameters.
# Constants
No description provided by the author
# Variables
ServerList contains the list of servers available to the SDK.
# Structs
Speakeasy API: The Speakeasy API allows teams to manage common operations with their APIs
/docs - The Speakeasy Platform Documentation.
# Interfaces
HTTPClient provides an interface for suplying the SDK with a custom HTTP client.
# Type aliases
No description provided by the author