sdk

package module
v0.0.0-...-2f99ba3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

OrchestKit Go SDK

Official Go client for the OrchestKit public docs API.

Homepage: https://orchestkit.dev

go get github.com/yonatangross/orchestkit/sdk
c := sdk.NewClient()
hits, rate, err := c.Search("hooks", 5)

The API is public, read-only, and unauthenticated. See https://orchestkit.dev/sdk

Documentation

Overview

Package sdk is the official Go client for the OrchestKit public docs API. Homepage: https://orchestkit.dev

Index

Constants

View Source
const DefaultBaseURL = "https://orchestkit.dev"

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Status     int
	Problem    Problem
	RetryAfter *int
}

func (*APIError) Error

func (e *APIError) Error() string

type Client

type Client struct {
	BaseURL    string
	HTTPClient *http.Client
}

func NewClient

func NewClient() *Client

func (*Client) Ask

func (c *Client) Ask(query string) (json.RawMessage, RateLimit, error)

func (*Client) ReadDoc

func (c *Client) ReadDoc(slug string) (string, RateLimit, error)

func (*Client) Search

func (c *Client) Search(query string, limit int) ([]SearchHit, RateLimit, error)

type Problem

type Problem struct {
	Type   string `json:"type,omitempty"`
	Title  string `json:"title,omitempty"`
	Status int    `json:"status,omitempty"`
	Detail string `json:"detail,omitempty"`
}

type RateLimit

type RateLimit struct {
	Limit     *int
	Remaining *int
	Reset     *int
}

type SearchHit

type SearchHit struct {
	ID          string `json:"id"`
	URL         string `json:"url"`
	Title       string `json:"title,omitempty"`
	Description string `json:"description,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL