Skip to content

Latest commit

 

History

History
640 lines (417 loc) · 17.8 KB

LanguageAPI.md

File metadata and controls

640 lines (417 loc) · 17.8 KB

\LanguageAPI

All URIs are relative to https://yasm.prodyna.com:443/api/graph/v1

Method HTTP request Description
AddLanguageToCountry Post /countries/{countryId}/languages/{languageId} Assign a language to a country
AddPersonLanguage Post /persons/{personId}/languages/{languageId} Assign a language to the person
CreateLanguage Post /languages Create a new language
DeleteLanguage Delete /languages/{languageId} Delete a language
GetLanguage Get /languages/{languageId} Get details about a language
RemoveLanguageFromCountry Delete /countries/{countryId}/languages/{languageId} Assign a language to a country
RemovePersonLanguage Delete /persons/{personId}/languages/{languageId} Remove a language from a person
SearchLanguages Post /languages/search Search over languages
UpdatePersonLanguage Put /persons/{personId}/languages/{languageId} Update a language of a person

AddLanguageToCountry

CountryDetails AddLanguageToCountry(ctx, countryId, languageId).Execute()

Assign a language to a country

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/prodyna-yasm/yasm-api-go"
)

func main() {
    countryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 
    languageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.LanguageAPI.AddLanguageToCountry(context.Background(), countryId, languageId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LanguageAPI.AddLanguageToCountry``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AddLanguageToCountry`: CountryDetails
    fmt.Fprintf(os.Stdout, "Response from `LanguageAPI.AddLanguageToCountry`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

CountryDetails

Authorization

oidcScheme, bearerScheme

HTTP request headers

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

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

AddPersonLanguage

PersonDetails AddPersonLanguage(ctx, personId, languageId).Level(level).Execute()

Assign a language to the person

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/prodyna-yasm/yasm-api-go"
)

func main() {
    personId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 
    languageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 
    level := *openapiclient.NewLevel() // Level | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.LanguageAPI.AddPersonLanguage(context.Background(), personId, languageId).Level(level).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LanguageAPI.AddPersonLanguage``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AddPersonLanguage`: PersonDetails
    fmt.Fprintf(os.Stdout, "Response from `LanguageAPI.AddPersonLanguage`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

level | Level | |

Return type

PersonDetails

Authorization

oidcScheme, bearerScheme

HTTP request headers

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

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

CreateLanguage

LanguageDetails CreateLanguage(ctx).Language(language).Execute()

Create a new language

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/prodyna-yasm/yasm-api-go"
)

func main() {
    language := *openapiclient.NewLanguage("Id_example", "Name_example") // Language | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.LanguageAPI.CreateLanguage(context.Background()).Language(language).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LanguageAPI.CreateLanguage``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateLanguage`: LanguageDetails
    fmt.Fprintf(os.Stdout, "Response from `LanguageAPI.CreateLanguage`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
language Language

Return type

LanguageDetails

Authorization

oidcScheme, bearerScheme

HTTP request headers

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

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

DeleteLanguage

Status DeleteLanguage(ctx, languageId).Execute()

Delete a language

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/prodyna-yasm/yasm-api-go"
)

func main() {
    languageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

Status

Authorization

oidcScheme, bearerScheme

HTTP request headers

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

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

GetLanguage

LanguageDetails GetLanguage(ctx, languageId).Execute()

Get details about a language

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/prodyna-yasm/yasm-api-go"
)

func main() {
    languageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

LanguageDetails

Authorization

oidcScheme, bearerScheme

HTTP request headers

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

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

RemoveLanguageFromCountry

CountryDetails RemoveLanguageFromCountry(ctx, countryId, languageId).Execute()

Assign a language to a country

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/prodyna-yasm/yasm-api-go"
)

func main() {
    countryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 
    languageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.LanguageAPI.RemoveLanguageFromCountry(context.Background(), countryId, languageId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LanguageAPI.RemoveLanguageFromCountry``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `RemoveLanguageFromCountry`: CountryDetails
    fmt.Fprintf(os.Stdout, "Response from `LanguageAPI.RemoveLanguageFromCountry`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

CountryDetails

Authorization

oidcScheme, bearerScheme

HTTP request headers

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

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

RemovePersonLanguage

PersonDetails RemovePersonLanguage(ctx, personId, languageId).Execute()

Remove a language from a person

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/prodyna-yasm/yasm-api-go"
)

func main() {
    personId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 
    languageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.LanguageAPI.RemovePersonLanguage(context.Background(), personId, languageId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LanguageAPI.RemovePersonLanguage``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `RemovePersonLanguage`: PersonDetails
    fmt.Fprintf(os.Stdout, "Response from `LanguageAPI.RemovePersonLanguage`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

PersonDetails

Authorization

oidcScheme, bearerScheme

HTTP request headers

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

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

SearchLanguages

PagedLanguages SearchLanguages(ctx).Search(search).Execute()

Search over languages

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/prodyna-yasm/yasm-api-go"
)

func main() {
    search := *openapiclient.NewSearch(int32(123), int32(123)) // Search |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.LanguageAPI.SearchLanguages(context.Background()).Search(search).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LanguageAPI.SearchLanguages``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `SearchLanguages`: PagedLanguages
    fmt.Fprintf(os.Stdout, "Response from `LanguageAPI.SearchLanguages`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
search Search

Return type

PagedLanguages

Authorization

oidcScheme, bearerScheme

HTTP request headers

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

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

UpdatePersonLanguage

PersonDetails UpdatePersonLanguage(ctx, personId, languageId).Level(level).Execute()

Update a language of a person

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/prodyna-yasm/yasm-api-go"
)

func main() {
    personId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 
    languageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 
    level := *openapiclient.NewLevel() // Level | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.LanguageAPI.UpdatePersonLanguage(context.Background(), personId, languageId).Level(level).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LanguageAPI.UpdatePersonLanguage``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdatePersonLanguage`: PersonDetails
    fmt.Fprintf(os.Stdout, "Response from `LanguageAPI.UpdatePersonLanguage`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

level | Level | |

Return type

PersonDetails

Authorization

oidcScheme, bearerScheme

HTTP request headers

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

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