Skip to content

Latest commit

 

History

History
482 lines (314 loc) · 11.5 KB

GlossaryApi.md

File metadata and controls

482 lines (314 loc) · 11.5 KB

client\GlossaryApi

All URIs are relative to https://api.gridly.com

Method HTTP request Description
Create Post /v1/glossaries Create a new glossary
Delete Delete /v1/glossaries/{id} Delete a glossary
ExportFile Get /v1/glossaries/{id}/export Export a glossary
Get Get /v1/glossaries/{id} get glossary info
GetAll Get /v1/glossaries List all glossaries
ImportFile Post /v1/glossaries/{id}/import Import a glossary from file
Update Put /v1/glossaries/{id} Update glossary info

Create

Glossary Create(ctx).CreateGlossary(createGlossary).Execute()

Create a new glossary

Example

package main

import (
    "context"
    "fmt"
    "os"
    gridly "./openapi"
)

func main() {
    createGlossary := *gridly.NewCreateGlossary("Name_example") // CreateGlossary |  (optional)

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.GlossaryApi.Create(context.Background()).CreateGlossary(createGlossary).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `GlossaryApi.Create``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Create`: Glossary
    fmt.Fprintf(os.Stdout, "Response from `GlossaryApi.Create`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
createGlossary CreateGlossary

Return type

Glossary

Authorization

ApiKey

HTTP request headers

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

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

Delete

Delete(ctx, id).Execute()

Delete a glossary

Example

package main

import (
    "context"
    "fmt"
    "os"
    gridly "./openapi"
)

func main() {
    id := int64(789) // int64 | 

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.GlossaryApi.Delete(context.Background(), id).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `GlossaryApi.Delete``: %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.
id int64

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKey

HTTP request headers

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

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

ExportFile

ExportFile(ctx, id).Fields(fields).Format(format).Langs(langs).Execute()

Export a glossary

Example

package main

import (
    "context"
    "fmt"
    "os"
    gridly "./openapi"
)

func main() {
    id := int64(789) // int64 | 
    fields := []string{"Inner_example"} // []string |  (optional)
    format := gridly.GlossaryExportFormat("csv") // GlossaryExportFormat |  (optional)
    langs := []string{"Inner_example"} // []string |  (optional)

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.GlossaryApi.ExportFile(context.Background(), id).Fields(fields).Format(format).Langs(langs).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `GlossaryApi.ExportFile``: %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.
id int64

Other Parameters

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

Name Type Description Notes

fields | []string | | format | GlossaryExportFormat | | langs | []string | |

Return type

(empty response body)

Authorization

ApiKey

HTTP request headers

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

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

Get

Glossary Get(ctx, id).Execute()

get glossary info

Example

package main

import (
    "context"
    "fmt"
    "os"
    gridly "./openapi"
)

func main() {
    id := int64(789) // int64 | 

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.GlossaryApi.Get(context.Background(), id).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `GlossaryApi.Get``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Get`: Glossary
    fmt.Fprintf(os.Stdout, "Response from `GlossaryApi.Get`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

Glossary

Authorization

ApiKey

HTTP request headers

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

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

GetAll

[]Glossary GetAll(ctx).Execute()

List all glossaries

Example

package main

import (
    "context"
    "fmt"
    "os"
    gridly "./openapi"
)

func main() {

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.GlossaryApi.GetAll(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `GlossaryApi.GetAll``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetAll`: []Glossary
    fmt.Fprintf(os.Stdout, "Response from `GlossaryApi.GetAll`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]Glossary

Authorization

ApiKey

HTTP request headers

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

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

ImportFile

ImportFile(ctx, id).ImportOption(importOption).File(file).Execute()

Import a glossary from file

Example

package main

import (
    "context"
    "fmt"
    "os"
    gridly "./openapi"
)

func main() {
    id := int64(789) // int64 | 
    importOption := gridly.ImportOption("ADD") // ImportOption |  (optional)
    file := map[string]interface{}{ ... } // map[string]interface{} |  (optional)

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.GlossaryApi.ImportFile(context.Background(), id).ImportOption(importOption).File(file).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `GlossaryApi.ImportFile``: %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.
id int64

Other Parameters

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

Name Type Description Notes

importOption | ImportOption | | file | map[string]interface{} | |

Return type

(empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: Not defined

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

Update

Update(ctx, id).UpdateGlossary(updateGlossary).Execute()

Update glossary info

Example

package main

import (
    "context"
    "fmt"
    "os"
    gridly "./openapi"
)

func main() {
    id := int64(789) // int64 | 
    updateGlossary := *gridly.NewUpdateGlossary() // UpdateGlossary |  (optional)

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.GlossaryApi.Update(context.Background(), id).UpdateGlossary(updateGlossary).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `GlossaryApi.Update``: %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.
id int64

Other Parameters

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

Name Type Description Notes

updateGlossary | UpdateGlossary | |

Return type

(empty response body)

Authorization

ApiKey

HTTP request headers

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

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