Skip to content

RankVectors/go-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for rankvectors

Intelligent internal linking optimization API using AI.

RankVectors helps you automatically discover and implement optimal internal links across your website to improve SEO performance and user experience.

Key Features

  • AI-Powered Analysis: Uses OpenAI embeddings to find optimal linking opportunities
  • Smart Crawling: Automatically crawls and analyzes your website content
  • Automated Implementation: Implement links via webhooks or manual instructions
  • Page-Based Plans: Predictable pricing by number of pages monitored
  • Multi-Platform Support: Works with any CMS or platform via REST API

Getting Started

  1. Create a project with your website URL
  2. Start a crawl to analyze your content
  3. Generate AI-powered link suggestions
  4. Implement suggestions via API or webhook
  5. Track performance and manage page usage and limits

Authentication

Most API endpoints support authentication using your RankVectors API key. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Get your API key from your RankVectors dashboard: Settings → API Keys

Note: Some endpoints (marked in the documentation) support both API key authentication and web session authentication (Stack Auth). API key authentication is required for SDK usage and external integrations like WordPress plugins.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.3.1
  • Package version: 1.3.1
  • Generator version: 7.16.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://rankvectors.com/docs

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import rankvectors "github.com/rankvectors/rankvectors-go-sdk"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value rankvectors.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), rankvectors.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value rankvectors.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), rankvectors.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using rankvectors.ContextOperationServerIndices and rankvectors.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), rankvectors.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), rankvectors.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

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

Class Method HTTP request Description
APIKeysAPI CreateApiKey Post /api/api-keys Create API key
APIKeysAPI DeleteApiKey Delete /api/api-keys/{id} Delete API key
APIKeysAPI ListApiKeys Get /api/api-keys List API keys
APIKeysAPI UpdateApiKey Patch /api/api-keys/{id} Update API key
AnalyticsAPI GetProjectAnalytics Get /api/projects/{projectId}/analytics Get project analytics
ContentVerificationAPI GetPageChanges Get /api/projects/{projectId}/changes Get page changes
ContentVerificationAPI VerifyContent Post /api/projects/{projectId}/verify-content Verify page content
CrawlingAPI GetCrawlHistory Get /api/projects/{projectId}/crawl Get crawl history
CrawlingAPI StartCrawl Post /api/projects/{projectId}/crawl Start website crawl
ImplementationsAPI GetImplementation Get /api/projects/{projectId}/implementations/{implementationId} Get implementation details
ImplementationsAPI ImplementLinks Post /api/projects/{projectId}/implementations Implement link suggestions
ImplementationsAPI ListImplementations Get /api/projects/{projectId}/implementations List implementations
ImplementationsAPI RollbackImplementation Post /api/projects/{projectId}/implementations/{implementationId}/rollback Rollback implementation
PagesAPI BatchSyncPages Post /api/projects/{projectId}/pages/batch Batch sync pages
PagesAPI ListPages Get /api/projects/{projectId}/pages List pages
ProjectsAPI CreateProject Post /api/projects Create a new project
ProjectsAPI DeleteProject Delete /api/projects/{projectId} Delete a project
ProjectsAPI GetProject Get /api/projects/{projectId} Get project details
ProjectsAPI ListProjects Get /api/projects List all projects
ProjectsAPI SyncProject Post /api/projects/{projectId}/sync Sync project
SuggestionsAPI DeleteSuggestion Delete /api/projects/{projectId}/suggestions/{suggestionId} Delete suggestion
SuggestionsAPI GenerateSuggestions Post /api/projects/{projectId}/suggestions Generate link suggestions
SuggestionsAPI GetSuggestions Get /api/projects/{projectId}/suggestions Get link suggestions
SuggestionsAPI UpdateSuggestion Patch /api/projects/{projectId}/suggestions/{suggestionId} Update suggestion status
UserAPI GetUserInfo Get /api/user/me Get authenticated user information
WebhooksAPI GetImplementationInstructions Get /api/webhook/implement-link Get implementation instructions
WebhooksAPI ReportImplementationStatus Post /api/webhook/implement-link Report implementation status

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

ApiKeyAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Note, each API key must be added to a map of map[string]APIKey where the key is: ApiKeyAuth and passed in as the auth context for each request.

Example

auth := context.WithValue(
		context.Background(),
		rankvectors.ContextAPIKeys,
		map[string]rankvectors.APIKey{
			"ApiKeyAuth": {Key: "API_KEY_STRING"},
		},
	)
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

tj@rankvectors.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages