All URIs are relative to https://api.gridly.com
Method | HTTP request | Description |
---|---|---|
Cleanup | Put /v1/transmems/{tmId}/cleanup | Erases all the translation data of the provided tmId |
Create | Post /v1/transmems | Create a new translation memory |
CreateWithFile | Post /v1/transmems/upload | Create a new translation memory by uploading tmx file |
Delete | Delete /v1/transmems/{tmId} | Delete a translation memory by id |
Export | Get /v1/transmems/{tmId}/export | Export translation memory tmx file |
Get | Get /v1/transmems/{tmId} | Get translation memory info by id |
ImportTmx | Post /v1/transmems/{tmId}/import | Import a translation memory from tmx file |
ListTM | Get /v1/transmems | List all available translation memories or create default one if there is no translation memory |
Update | Put /v1/transmems/{tmId} | Update a translation memory |
Cleanup(ctx, tmId).Execute()
Erases all the translation data of the provided tmId
package main
import (
"context"
"fmt"
"os"
gridly "./openapi"
)
func main() {
tmId := "tmId_example" // string |
configuration := gridly.NewConfiguration()
apiClient := gridly.NewAPIClient(configuration)
resp, r, err := apiClient.TransmemApi.Cleanup(context.Background(), tmId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransmemApi.Cleanup``: %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. | |
tmId | string |
Other parameters are passed through a pointer to a apiCleanupRequest 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]
TransMem Create(ctx).CreateTransMem(createTransMem).Execute()
Create a new translation memory
package main
import (
"context"
"fmt"
"os"
gridly "./openapi"
)
func main() {
createTransMem := *gridly.NewCreateTransMem("Name_example") // CreateTransMem | (optional)
configuration := gridly.NewConfiguration()
apiClient := gridly.NewAPIClient(configuration)
resp, r, err := apiClient.TransmemApi.Create(context.Background()).CreateTransMem(createTransMem).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransmemApi.Create``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Create`: TransMem
fmt.Fprintf(os.Stdout, "Response from `TransmemApi.Create`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createTransMem | CreateTransMem |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransMem CreateWithFile(ctx).File(file).Execute()
Create a new translation memory by uploading tmx file
package main
import (
"context"
"fmt"
"os"
gridly "./openapi"
)
func main() {
file := os.NewFile(1234, "some_file") // *os.File |
configuration := gridly.NewConfiguration()
apiClient := gridly.NewAPIClient(configuration)
resp, r, err := apiClient.TransmemApi.CreateWithFile(context.Background()).File(file).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransmemApi.CreateWithFile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateWithFile`: TransMem
fmt.Fprintf(os.Stdout, "Response from `TransmemApi.CreateWithFile`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateWithFileRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
file | *os.File |
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransMem Delete(ctx, tmId).Execute()
Delete a translation memory by id
package main
import (
"context"
"fmt"
"os"
gridly "./openapi"
)
func main() {
tmId := "tmId_example" // string |
configuration := gridly.NewConfiguration()
apiClient := gridly.NewAPIClient(configuration)
resp, r, err := apiClient.TransmemApi.Delete(context.Background(), tmId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransmemApi.Delete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Delete`: TransMem
fmt.Fprintf(os.Stdout, "Response from `TransmemApi.Delete`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
tmId | string |
Other parameters are passed through a pointer to a apiDeleteRequest 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]
*os.File Export(ctx, tmId).Format(format).SourceLang(sourceLang).TargetLangs(targetLangs).Execute()
Export translation memory tmx file
package main
import (
"context"
"fmt"
"os"
gridly "./openapi"
)
func main() {
tmId := "tmId_example" // string |
format := gridly.ExportFormat("tmx") // ExportFormat | (optional)
sourceLang := "sourceLang_example" // string | (optional)
targetLangs := []string{"Inner_example"} // []string | (optional)
configuration := gridly.NewConfiguration()
apiClient := gridly.NewAPIClient(configuration)
resp, r, err := apiClient.TransmemApi.Export(context.Background(), tmId).Format(format).SourceLang(sourceLang).TargetLangs(targetLangs).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransmemApi.Export``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Export`: *os.File
fmt.Fprintf(os.Stdout, "Response from `TransmemApi.Export`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
tmId | string |
Other parameters are passed through a pointer to a apiExportRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
format | ExportFormat | | sourceLang | string | | targetLangs | []string | |
- Content-Type: Not defined
- Accept: application/octet-stream
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransMem Get(ctx, tmId).Execute()
Get translation memory info by id
package main
import (
"context"
"fmt"
"os"
gridly "./openapi"
)
func main() {
tmId := "tmId_example" // string |
configuration := gridly.NewConfiguration()
apiClient := gridly.NewAPIClient(configuration)
resp, r, err := apiClient.TransmemApi.Get(context.Background(), tmId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransmemApi.Get``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Get`: TransMem
fmt.Fprintf(os.Stdout, "Response from `TransmemApi.Get`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
tmId | string |
Other parameters are passed through a pointer to a apiGetRequest 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]
ImportTmx(ctx, tmId).File(file).Execute()
Import a translation memory from tmx file
package main
import (
"context"
"fmt"
"os"
gridly "./openapi"
)
func main() {
tmId := "tmId_example" // string |
file := map[string]interface{}{ ... } // map[string]interface{} |
configuration := gridly.NewConfiguration()
apiClient := gridly.NewAPIClient(configuration)
resp, r, err := apiClient.TransmemApi.ImportTmx(context.Background(), tmId).File(file).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransmemApi.ImportTmx``: %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. | |
tmId | string |
Other parameters are passed through a pointer to a apiImportTmxRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
file | map[string]interface{} | |
(empty response body)
- Content-Type: multipart/form-data
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]TransMem ListTM(ctx).ProjectId(projectId).Execute()
List all available translation memories or create default one if there is no translation memory
package main
import (
"context"
"fmt"
"os"
gridly "./openapi"
)
func main() {
projectId := int64(789) // int64 | (optional)
configuration := gridly.NewConfiguration()
apiClient := gridly.NewAPIClient(configuration)
resp, r, err := apiClient.TransmemApi.ListTM(context.Background()).ProjectId(projectId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransmemApi.ListTM``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListTM`: []TransMem
fmt.Fprintf(os.Stdout, "Response from `TransmemApi.ListTM`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListTMRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
projectId | int64 |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransMem Update(ctx, tmId).UpdateTransMem(updateTransMem).Execute()
Update a translation memory
package main
import (
"context"
"fmt"
"os"
gridly "./openapi"
)
func main() {
tmId := "tmId_example" // string |
updateTransMem := *gridly.NewUpdateTransMem() // UpdateTransMem | (optional)
configuration := gridly.NewConfiguration()
apiClient := gridly.NewAPIClient(configuration)
resp, r, err := apiClient.TransmemApi.Update(context.Background(), tmId).UpdateTransMem(updateTransMem).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransmemApi.Update``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Update`: TransMem
fmt.Fprintf(os.Stdout, "Response from `TransmemApi.Update`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
tmId | string |
Other parameters are passed through a pointer to a apiUpdateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateTransMem | UpdateTransMem | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]