All URIs are relative to https://graphhopper.com/api/1
| Method | HTTP request | Description |
|---|---|---|
| DeleteProfile | Delete /profiles/{profileId} | Delete a custom routing profile |
| GetProfile | Get /profiles | List your custom routing profiles |
| PostProfile | Post /profiles | Create a custom routing profile |
DeleteProfile(ctx, profileId).Execute()
Delete a custom routing profile
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/meission/go-graphhopper"
)
func main() {
profileId := "cp_shc_1_4390ba24-e6cb-406b-acc6-3402dd4d229d" // string | The profile to delete
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.CustomProfilesAPI.DeleteProfile(context.Background(), profileId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomProfilesAPI.DeleteProfile``: %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. | |
| profileId | string | The profile to delete |
Other parameters are passed through a pointer to a apiDeleteProfileRequest 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]
ProfileGetResponse GetProfile(ctx).Execute()
List your custom routing profiles
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/meission/go-graphhopper"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomProfilesAPI.GetProfile(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomProfilesAPI.GetProfile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetProfile`: ProfileGetResponse
fmt.Fprintf(os.Stdout, "Response from `CustomProfilesAPI.GetProfile`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetProfileRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ProfileResponse PostProfile(ctx).ProfileRequest(profileRequest).Execute()
Create a custom routing profile
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/meission/go-graphhopper"
)
func main() {
profileRequest := *openapiclient.NewProfileRequest() // ProfileRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomProfilesAPI.PostProfile(context.Background()).ProfileRequest(profileRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomProfilesAPI.PostProfile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostProfile`: ProfileResponse
fmt.Fprintf(os.Stdout, "Response from `CustomProfilesAPI.PostProfile`: %v\n", resp)
}Other parameters are passed through a pointer to a apiPostProfileRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| profileRequest | ProfileRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]