All URIs are relative to https://api.rankvectors.com
| Method | HTTP request | Description |
|---|---|---|
| CreateProject | Post /api/projects | Create a new project |
| DeleteProject | Delete /api/projects/{projectId} | Delete a project |
| GetProject | Get /api/projects/{projectId} | Get project details |
| ListProjects | Get /api/projects | List all projects |
| SyncProject | Post /api/projects/{projectId}/sync | Sync project |
Project CreateProject(ctx).CreateProjectRequest(createProjectRequest).Execute()
Create a new project
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/rankvectors/rankvectors-go-sdk"
)
func main() {
createProjectRequest := *openapiclient.NewCreateProjectRequest("My Website", "https://example.com") // CreateProjectRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProjectsAPI.CreateProject(context.Background()).CreateProjectRequest(createProjectRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProjectsAPI.CreateProject``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateProject`: Project
fmt.Fprintf(os.Stdout, "Response from `ProjectsAPI.CreateProject`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateProjectRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| createProjectRequest | CreateProjectRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteProject200Response DeleteProject(ctx, projectId).Execute()
Delete a project
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/rankvectors/rankvectors-go-sdk"
)
func main() {
projectId := "proj-123" // string | Unique identifier for the project
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProjectsAPI.DeleteProject(context.Background(), projectId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProjectsAPI.DeleteProject``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteProject`: DeleteProject200Response
fmt.Fprintf(os.Stdout, "Response from `ProjectsAPI.DeleteProject`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectId | string | Unique identifier for the project |
Other parameters are passed through a pointer to a apiDeleteProjectRequest 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]
Project GetProject(ctx, projectId).Execute()
Get project details
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/rankvectors/rankvectors-go-sdk"
)
func main() {
projectId := "proj-123" // string | Unique identifier for the project
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProjectsAPI.GetProject(context.Background(), projectId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProjectsAPI.GetProject``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetProject`: Project
fmt.Fprintf(os.Stdout, "Response from `ProjectsAPI.GetProject`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectId | string | Unique identifier for the project |
Other parameters are passed through a pointer to a apiGetProjectRequest 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]
[]Project ListProjects(ctx).Execute()
List all projects
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/rankvectors/rankvectors-go-sdk"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProjectsAPI.ListProjects(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProjectsAPI.ListProjects``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListProjects`: []Project
fmt.Fprintf(os.Stdout, "Response from `ProjectsAPI.ListProjects`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListProjectsRequest 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]
SyncProject200Response SyncProject(ctx, projectId).SyncProjectRequest(syncProjectRequest).Execute()
Sync project
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/rankvectors/rankvectors-go-sdk"
)
func main() {
projectId := "proj-123" // string | Unique identifier for the project
syncProjectRequest := *openapiclient.NewSyncProjectRequest() // SyncProjectRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProjectsAPI.SyncProject(context.Background(), projectId).SyncProjectRequest(syncProjectRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProjectsAPI.SyncProject``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SyncProject`: SyncProject200Response
fmt.Fprintf(os.Stdout, "Response from `ProjectsAPI.SyncProject`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectId | string | Unique identifier for the project |
Other parameters are passed through a pointer to a apiSyncProjectRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
syncProjectRequest | SyncProjectRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]