Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrBadRequest = Err("api: bad request") ErrForbidden = Err("api: forbidden") ErrNotFound = Err("api: resource not found") ErrInternalError = Err("api: internal error") ErrUnknown = Err("api: unexpected error occurred") )
Error Constants
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { // BaseURL for API. Set using NewClient or you can set directly. BaseURL string // DeveloperID is the base64 decoded developer ID DeveloperID string // Token is the personal access token for interacting with the skills service Token string //HTTP Client to use for making requests, allowing the user to supply their own if required. HTTPClient *http.Client }
Client is the main client for interacting with the library. It can be created using NewClient
func NewClient ¶
NewClient is a helper function that returns an new api client given a token and developer ID. Optionally you can provide your own http client or use nil to use the default. This is done to ensure you're aware of the decision you're making to not provide your own http client.
func (*Client) CreateSkill ¶
CreateSkill will create a new skill
func (*Client) DeleteSkill ¶
DeleteSkill is used delete a skill. It is required to pass the ID.
type Skill ¶
type Skill struct { SkillID *string `json:"skill_id,omitempty"` DeveloperID *string `json:"developer_id,omitempty"` URL *string `json:"url,omitempty"` Name *string `json:"name,omitempty"` ContactEmail *string `json:"contact_email,omitempty"` Public *bool `json:"public,omitempty"` Deleted *bool `json:"deleted,omitempty"` CreatedAt *string `json:"created_at,omitempty"` DeletedAt *string `json:"deleted_at,omitempty"` ModifiedAt *string `json:"modified_at,omitempty"` LastActiveAt *string `json:"last_active_at,omitempty"` SuggestedInvocationNames []string `json:"suggested_invocation_names,omitempty"` Languages []string `json:"languages,omitempty"` HomePage *string `json:"home_page,omitempty"` Description *string `json:"description,omitempty"` Secret *string `json:"secret,omitempty"` PublicKey *string `json:"public_key,omitempty"` }
Skill represents a skill service skill TODO: Make helpers to access pointer values to avoid panics
Click to show internal directories.
Click to hide internal directories.