All URIs are relative to /v1
Method | HTTP request | Description |
---|---|---|
GetSourceById | Get /sources/{sourceId} | Get a source by ID. |
GetSources | Get /sources | List all sources. |
Source GetSourceById(ctx, sourceId).Execute()
Get a source by ID.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
sourceId := "sourceId_example" // string | The ID of the source.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SourcesApi.GetSourceById(context.Background(), sourceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SourcesApi.GetSourceById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSourceById`: Source
fmt.Fprintf(os.Stdout, "Response from `SourcesApi.GetSourceById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
sourceId | string | The ID of the source. |
Other parameters are passed through a pointer to a apiGetSourceByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListSourcesResponse GetSources(ctx).Execute()
List all sources.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SourcesApi.GetSources(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SourcesApi.GetSources``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSources`: ListSourcesResponse
fmt.Fprintf(os.Stdout, "Response from `SourcesApi.GetSources`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetSourcesRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]