Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Base URL for API requests. Defaults to the public GitHub API, but can be // set to a domain endpoint to use with GitHub Enterprise. BaseURL should // always be specified with a trailing slash. BaseURL *url.URL // API Key for Tautulli APIKey string // User agent used when communicating with the GitHub API. UserAgent string Notifications *NotificationsService // contains filtered or unexported fields }
A Client manages communication with the Tautulli API.
func NewClient ¶
NewClient returns a new Tautulli API client. If a nil httpClient is provided, a new http.Client will be used.
func (*Client) NewCommand ¶
NewCommand creates an API request. A relative URL can be provided in urlStr, in which case it is resolved relative to the BaseURL of the Client. Relative URLs should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.
type CommonParameters ¶
type CommonParameters struct { APIKey string `url:"apikey"` // Command string `url:"cmd"` // OutType string `url:"out_type"` // Callback string `url:"callback"` // Debug int `url:"debug"` // }
CommonParameters are the parameters that are common to all requests.
type NotificationsService ¶
type NotificationsService service
NotificationsService handles communication with the notification related methods of the Tautulli API.
func (*NotificationsService) Notify ¶
func (s *NotificationsService) Notify(ctx context.Context, params *NotifyParameters) (*http.Response, error)
Notify sends a notification using the Tautulli API.
type NotifyParameters ¶
type NotifyParameters struct { NotifierID int `url:"notifier_id"` // The ID number of the notification agent Subject string `url:"subject"` // The subject of the message Body string `url:"body"` // The body of the message Headers string `url:"headers,omitempty"` // Optional. The JSON headers for webhook notifications ScriptArgs string `url:"script_args,omitempty"` // Optional. The arguments for script notifications }
NotifyParameters are parameters for sending a notification using the Tautulli API.