All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
DeleteCustomPhrase | Delete /api/custom-phrases/{languageTag} | Delete custom phrase |
GetCustomPhrase | Get /api/custom-phrases/{languageTag} | Get custom phrases |
ListCustomPhrases | Get /api/custom-phrases | Get all custom phrases |
ReplaceCustomPhrase | Put /api/custom-phrases/{languageTag} | Upsert custom phrases |
DeleteCustomPhrase(ctx, languageTag).Execute()
Delete custom phrase
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
languageTag := "languageTag_example" // string |
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
r, err := apiClient.CustomPhrasesAPI.DeleteCustomPhrase(context.Background(), languageTag).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomPhrasesAPI.DeleteCustomPhrase``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
languageTag | string |
Other parameters are passed through a pointer to a apiDeleteCustomPhraseRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListCustomPhrases200ResponseInner GetCustomPhrase(ctx, languageTag).Execute()
Get custom phrases
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
languageTag := "languageTag_example" // string |
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
resp, r, err := apiClient.CustomPhrasesAPI.GetCustomPhrase(context.Background(), languageTag).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomPhrasesAPI.GetCustomPhrase``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCustomPhrase`: ListCustomPhrases200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `CustomPhrasesAPI.GetCustomPhrase`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
languageTag | string |
Other parameters are passed through a pointer to a apiGetCustomPhraseRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
ListCustomPhrases200ResponseInner
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ListCustomPhrases200ResponseInner ListCustomPhrases(ctx).Execute()
Get all custom phrases
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
resp, r, err := apiClient.CustomPhrasesAPI.ListCustomPhrases(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomPhrasesAPI.ListCustomPhrases``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCustomPhrases`: []ListCustomPhrases200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `CustomPhrasesAPI.ListCustomPhrases`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListCustomPhrasesRequest struct via the builder pattern
[]ListCustomPhrases200ResponseInner
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ReplaceCustomPhrase(ctx, languageTag).TranslationObject(translationObject).Execute()
Upsert custom phrases
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
languageTag := "languageTag_example" // string |
translationObject := *logto.NewTranslationObject() // TranslationObject |
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
r, err := apiClient.CustomPhrasesAPI.ReplaceCustomPhrase(context.Background(), languageTag).TranslationObject(translationObject).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomPhrasesAPI.ReplaceCustomPhrase``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
languageTag | string |
Other parameters are passed through a pointer to a apiReplaceCustomPhraseRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
translationObject | TranslationObject | |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]