Documentation
¶
Index ¶
- Variables
- func GetAddonDatabaseTimestamp() (string, error)
- func GetAuthenticatedReponse(method, token, url string, b []byte) (*http.Response, error)
- func GetByteArrayHash(bytes []byte) int
- func GetFileHash(file string) (int, error)
- func GetHTTPResponse(method, url string, b []byte) (*http.Response, error)
- func ReadTokenFromDisk()
- func ResponseToString(response *http.Response) string
- func SetOAuth(token string)
- func TwitchApi() bool
- func UseCurseMeta()
- func UseTwitch()
- type Addon
- type AddonAttachments
- type AddonAuthors
- type AddonCategories
- type AddonCategorySection
- type AddonDependency
- type AddonGameVersion
- type AddonLatestFile
- type AddonModules
- type AuthSession
- type AuthenticationResponse
- type File
- type FingerprintList
- type FingerprintMatch
- type Login
- type Register
- type RenewTokenResponseContract
- type TwitchOAuthRequest
- type TwitchOAuthResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OAuthToken string WriteSession = false )
View Source
var (
EMPTY []byte
)
Functions ¶
func GetAuthenticatedReponse ¶
func GetByteArrayHash ¶
func GetFileHash ¶
func ResponseToString ¶
func UseCurseMeta ¶
func UseCurseMeta()
Types ¶
type Addon ¶
type Addon struct {
Attachments []AddonAttachments `json:"attachments"`
Authors []AddonAuthors `json:"authors"`
AvatarURL interface{} `json:"avatarUrl"`
Categories []AddonCategories `json:"categories"`
CategoryList string `json:"categoryList"`
CategorySection AddonCategorySection `json:"categorySection"`
ClientURL string `json:"clientUrl"`
CommentCount int `json:"commentCount"`
DateCreated string `json:"dateCreated"`
DateModified string `json:"dateModified"`
DateReleased string `json:"dateReleased"`
DefaultFileID int `json:"defaultFileId"`
DonationURL interface{} `json:"donationUrl"`
DownloadCount float64 `json:"downloadCount"`
ExternalURL interface{} `json:"externalUrl"`
FullDescription string `json:"fullDescription"`
GameID int `json:"gameId"`
GameName string `json:"gameName"`
GamePopularityRank int `json:"gamePopularityRank"`
GameVersionLatestFiles []AddonGameVersion `json:"gameVersionLatestFiles"`
ID int `json:"id"`
InstallCount int `json:"installCount"`
IsAvailable bool `json:"isAvailable"`
IsFeatured bool `json:"isFeatured"`
LatestFiles []AddonLatestFile `json:"latestFiles"`
Likes int `json:"likes"`
Name string `json:"name"`
PackageType int `json:"packageType"`
PopularityScore float64 `json:"popularityScore"`
PortalName string `json:"portalName"`
PrimaryAuthorName string `json:"primaryAuthorName"`
PrimaryCategoryAvatarURL string `json:"primaryCategoryAvatarUrl"`
PrimaryCategoryName string `json:"primaryCategoryName"`
Rating int `json:"rating"`
SectionName string `json:"sectionName"`
Slug string `json:"slug"`
Stage int `json:"stage"`
Status int `json:"status"`
Summary string `json:"summary"`
WebsiteURL string `json:"websiteUrl"`
}
func GetAllAddons ¶
Uses the search to find as many addons as possible, not perfect but should get most of them. This is a very expensive call, takes a while and uses a lot of api requests
type AddonAttachments ¶
type AddonAuthors ¶
type AddonCategories ¶
type AddonCategorySection ¶
type AddonDependency ¶
type AddonGameVersion ¶
type AddonLatestFile ¶
type AddonLatestFile struct {
AlternateFileID int `json:"alternateFileId"`
Dependencies []AddonDependency `json:"dependencies"`
DownloadURL string `json:"downloadUrl"`
FileDate string `json:"fileDate"`
FileName string `json:"fileName"`
FileNameOnDisk string `json:"fileNameOnDisk"`
FileStatus int `json:"fileStatus"`
GameVersion []string `json:"gameVersion"`
ID int `json:"id"`
IsAlternate bool `json:"isAlternate"`
IsAvailable bool `json:"isAvailable"`
Modules []AddonModules `json:"modules"`
PackageFingerprint int `json:"packageFingerprint"`
ReleaseType int `json:"releaseType"`
}
type AddonModules ¶
type AuthSession ¶
type AuthSession struct {
UserID int `json:"UserID"`
Username string `json:"Username"`
DisplayName string `json:"DisplayName"`
SessionID string `json:"SessionID"`
Token string `json:"Token"`
EmailAddress string `json:"EmailAddress"`
EffectivePremiumStatus bool `json:"EffectivePremiumStatus"`
ActualPremiumStatus bool `json:"ActualPremiumStatus"`
SubscriptionToken int `json:"SubscriptionToken"`
Expires int `json:"Expires"`
RenewAfter int `json:"RenewAfter"`
IsTemporaryAccount bool `json:"IsTemporaryAccount"`
IsMerged bool `json:"IsMerged"`
Bans int `json:"Bans"`
}
type AuthenticationResponse ¶
type AuthenticationResponse struct {
Status int `json:"Status"`
StatusMessage string `json:"StatusMessage"`
Session AuthSession `json:"Session"`
}
type File ¶
type File struct {
ID int `json:"id"`
FileName string `json:"fileName"`
FileNameOnDisk string `json:"fileNameOnDisk"`
FileDate string `json:"fileDate"`
ReleaseType int `json:"releaseType"`
FileStatus int `json:"fileStatus"`
DownloadURL string `json:"downloadUrl"`
IsAlternate bool `json:"isAlternate"`
AlternateFileID int `json:"alternateFileId"`
Dependencies []interface{} `json:"dependencies"`
IsAvailable bool `json:"isAvailable"`
Modules []AddonModules `json:"modules"`
PackageFingerprint int64 `json:"packageFingerprint"`
GameVersion []string `json:"gameVersion"`
}
func GetAddonFiles ¶
type FingerprintList ¶
type FingerprintList struct {
IsCacheBuilt bool `json:"isCacheBuilt"`
ExactMatches []FingerprintMatch `json:"exactMatches"`
ExactFingerprints []int `json:"exactFingerprints"`
InstalledFingerprints []int `json:"installedFingerprints"`
}
func GetHashMatches ¶
func GetHashMatches(addons []int) (*FingerprintList, error)
type FingerprintMatch ¶
type TwitchOAuthRequest ¶
type TwitchOAuthRequest struct {
ClientID string `json:"ClientID"`
Code string `json:"Code"`
RedirectUri string `json:"RedirectUri"`
State string `json:"State"`
}
https://logins-v1.curseapp.net/Help/Api/POST-login-twitch-oauth
type TwitchOAuthResponse ¶
Click to show internal directories.
Click to hide internal directories.