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 |
CountryDetails AddLanguageToCountry(ctx, countryId, languageId).Execute()
Assign a language to a country
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| countryId | string | ||
| languageId | string |
Other parameters are passed through a pointer to a apiAddLanguageToCountryRequest 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]
PersonDetails AddPersonLanguage(ctx, personId, languageId).Level(level).Execute()
Assign a language to the person
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| personId | string | ||
| languageId | string |
Other parameters are passed through a pointer to a apiAddPersonLanguageRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
level | Level | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LanguageDetails CreateLanguage(ctx).Language(language).Execute()
Create a new language
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)
}Other parameters are passed through a pointer to a apiCreateLanguageRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| language | Language |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Status DeleteLanguage(ctx, languageId).Execute()
Delete a language
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| languageId | string |
Other parameters are passed through a pointer to a apiDeleteLanguageRequest 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]
LanguageDetails GetLanguage(ctx, languageId).Execute()
Get details about a language
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| languageId | string |
Other parameters are passed through a pointer to a apiGetLanguageRequest 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]
CountryDetails RemoveLanguageFromCountry(ctx, countryId, languageId).Execute()
Assign a language to a country
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| countryId | string | ||
| languageId | string |
Other parameters are passed through a pointer to a apiRemoveLanguageFromCountryRequest 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]
PersonDetails RemovePersonLanguage(ctx, personId, languageId).Execute()
Remove a language from a person
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| personId | string | ||
| languageId | string |
Other parameters are passed through a pointer to a apiRemovePersonLanguageRequest 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]
PagedLanguages SearchLanguages(ctx).Search(search).Execute()
Search over languages
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)
}Other parameters are passed through a pointer to a apiSearchLanguagesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| search | Search |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PersonDetails UpdatePersonLanguage(ctx, personId, languageId).Level(level).Execute()
Update a language of a person
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| personId | string | ||
| languageId | string |
Other parameters are passed through a pointer to a apiUpdatePersonLanguageRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
level | Level | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]