Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultBaseURL is the base URL for the release-monitoring.org API
DefaultBaseURL = "https://release-monitoring.org/api/v2"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a client for the release-monitoring.org API
func New ¶
New creates a new anitya client with a custom HTTP client The httpClient parameter is required and should be obtained from httpclient.NewHTTPClient()
func (*Client) GetLatestVersion ¶
GetLatestVersion returns the latest version for a project by ID
func (*Client) GetProject ¶
GetProject fetches a project by its ID
func (*Client) GetStableVersions ¶
GetStableVersions returns all stable versions for a project by ID
func (*Client) IsAuthenticated ¶
IsAuthenticated checks if the client is using authentication
type Project ¶
type Project struct {
ID int `json:"id"`
Name string `json:"name"`
Backend string `json:"backend"`
Ecosystem string `json:"ecosystem"`
Homepage string `json:"homepage"`
CreatedOn UnixTime `json:"created_on"`
UpdatedOn UnixTime `json:"updated_on"`
Version string `json:"version"`
StableVersions []string `json:"stable_versions"`
Versions []string `json:"versions"`
}
Project represents a project from the release-monitoring.org API
type ProjectResponse ¶
type ProjectResponse struct {
Items []Project `json:"items"`
Page int `json:"page"`
ItemsCount int `json:"items_count"`
Total int `json:"total"`
}
ProjectResponse represents the API response structure
Click to show internal directories.
Click to hide internal directories.