Documentation ¶
Overview ¶
Package amo implements a client for the addons.mozilla.org (AMO) API.
Index ¶
Constants ¶
View Source
const ( APIURL = "https://services.addons.mozilla.org/api" // AMO API URL APIVersion = "1.5" // AMO API version )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AMOClient ¶
AMOClient represents an AMO API client.
func NewAMOClient ¶
func NewAMOClient() *AMOClient
NewAMOClient constructs a new AMOClient using the constant URL and versions defined in this package.
func (*AMOClient) Addon ¶
Addon requests an addon description from the AMO API, parses the data, and returns a pointer to the Addon object.
func (*AMOClient) AddonByIdOrName ¶
AddonByIdOrName searches for an addon by numeric ID or name, and returns a pointer to the best match Addon object.
type Addon ¶
type Addon struct { XMLName xml.Name `xml:"addon" json:"-"` ID uint `xml:"id,attr" json:"id"` GUID string `xml:"guid" json:"guid"` Name string `xml:"name" json:"name"` Version string `xml:"version" json:"version"` URL string `xml:"install" json:"url"` Homepage string `xml:"homepage" json:"homepage"` Summary string `xml:"summary" json:"summary"` }
Addon represents a Mozilla addon.
Click to show internal directories.
Click to hide internal directories.