toolhub

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseURLV1 = "https://toolhub.wikimedia.org/api"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient() *Client

func (*Client) GetTool

func (c *Client) GetTool(ctx context.Context, name string, options *ToolsOptions) (*Tool, error)

func (*Client) GetTools

func (c *Client) GetTools(ctx context.Context, options *ToolsOptions) (*Tools, error)

func (*Client) SearchTools

func (c *Client) SearchTools(ctx context.Context, searchString string, options *ToolsOptions) (*Tools, error)

type Tool

type Tool struct {
	Name                 string        `json:"name"`
	Title                string        `json:"title"`
	Description          string        `json:"description"`
	URL                  string        `json:"url"`
	Keywords             []string      `json:"keywords"`
	Author               []interface{} `json:"author"`
	Repository           string        `json:"repository"`
	Subtitle             interface{}   `json:"subtitle"`
	OpenhubID            interface{}   `json:"openhub_id"`
	URLAlternates        []interface{} `json:"url_alternates"`
	BotUsername          interface{}   `json:"bot_username"`
	Deprecated           bool          `json:"deprecated"`
	ReplacedBy           interface{}   `json:"replaced_by"`
	Experimental         bool          `json:"experimental"`
	ForWikis             []interface{} `json:"for_wikis"`
	Icon                 interface{}   `json:"icon"`
	License              interface{}   `json:"license"`
	Sponsor              []interface{} `json:"sponsor"`
	AvailableUILanguages []interface{} `json:"available_ui_languages"`
	TechnologyUsed       []interface{} `json:"technology_used"`
	Type                 string        `json:"tool_type"`
	APIURL               interface{}   `json:"api_url"`
	DeveloperDocsURL     []interface{} `json:"developer_docs_url"`
	UserDocsURL          []interface{} `json:"user_docs_url"`
	FeedbackURL          []interface{} `json:"feedback_url"`
	PrivacyPolicyURL     []interface{} `json:"privacy_policy_url"`
	TranslateURL         interface{}   `json:"translate_url"`
	BugtrackerURL        interface{}   `json:"bugtracker_url"`
	Schema               interface{}   `json:"_schema"`
	Language             string        `json:"_language"`
	Origin               string        `json:"origin"`
	CreatedBy            struct {
		ID       int    `json:"id"`
		Username string `json:"username"`
	} `json:"created_by"`
	CreatedDate time.Time `json:"created_date"`
	ModifiedBy  struct {
		ID       int    `json:"id"`
		Username string `json:"username"`
	} `json:"modified_by"`
	ModifiedDate time.Time `json:"modified_date"`
}

type Tools

type Tools struct {
	Count    int         `json:"count"`
	Next     string      `json:"next"`
	Previous interface{} `json:"previous"`
	Results  []Tool      `json:"results"`
}

type ToolsOptions

type ToolsOptions struct {
	Limit int `json:"limit"`
	Page  int `json:"page"`
}

Jump to

Keyboard shortcuts

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