Skip to content

Latest commit

 

History

History
281 lines (176 loc) · 6.94 KB

CustomPhrasesAPI.md

File metadata and controls

281 lines (176 loc) · 6.94 KB

\CustomPhrasesAPI

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

DeleteCustomPhrase(ctx, languageTag).Execute()

Delete custom phrase

Example

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)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
languageTag string

Other Parameters

Other parameters are passed through a pointer to a apiDeleteCustomPhraseRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

ManagementApi

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetCustomPhrase

ListCustomPhrases200ResponseInner GetCustomPhrase(ctx, languageTag).Execute()

Get custom phrases

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
languageTag string

Other Parameters

Other parameters are passed through a pointer to a apiGetCustomPhraseRequest struct via the builder pattern

Name Type Description Notes

Return type

ListCustomPhrases200ResponseInner

Authorization

ManagementApi

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListCustomPhrases

[]ListCustomPhrases200ResponseInner ListCustomPhrases(ctx).Execute()

Get all custom phrases

Example

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)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiListCustomPhrasesRequest struct via the builder pattern

Return type

[]ListCustomPhrases200ResponseInner

Authorization

ManagementApi

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ReplaceCustomPhrase

ReplaceCustomPhrase(ctx, languageTag).TranslationObject(translationObject).Execute()

Upsert custom phrases

Example

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)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
languageTag string

Other Parameters

Other parameters are passed through a pointer to a apiReplaceCustomPhraseRequest struct via the builder pattern

Name Type Description Notes

translationObject | TranslationObject | |

Return type

(empty response body)

Authorization

ManagementApi

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]