Documentation
¶
Index ¶
- Constants
- Variables
- func GatherAlmanaxData(initial bool, headless bool) error
- func GetAlmanaxRange(w http.ResponseWriter, r *http.Request)
- func GetAlmanaxSingle(w http.ResponseWriter, r *http.Request)
- func ListBonuses(w http.ResponseWriter, r *http.Request)
- func SearchBonuses(w http.ResponseWriter, r *http.Request)
- func SetJsonHeader(w *http.ResponseWriter)
- func UpdateAlmanaxBonusIndex(init bool, db *database.Repository) int
- type AlmanaxBonusListing
- type AlmanaxBonusListingMeili
- type AlmanaxResponse
- type ApiImageUrls
Constants ¶
View Source
const ( TwitterWebhookType string = "twitter" RSSWebhookType = "rss" AlmanaxWebhookType = "almanax" )
Variables ¶
View Source
var ( DataRepoOwner = "dofusdude" DataRepoName = "dofus3-main" MappedAlmanaxFileName = "MAPPED_ALMANAX.json" )
Functions ¶
func GatherAlmanaxData ¶
func GetAlmanaxRange ¶
func GetAlmanaxRange(w http.ResponseWriter, r *http.Request)
func GetAlmanaxSingle ¶
func GetAlmanaxSingle(w http.ResponseWriter, r *http.Request)
func ListBonuses ¶
func ListBonuses(w http.ResponseWriter, r *http.Request)
func SearchBonuses ¶
func SearchBonuses(w http.ResponseWriter, r *http.Request)
func SetJsonHeader ¶
func SetJsonHeader(w *http.ResponseWriter)
func UpdateAlmanaxBonusIndex ¶
func UpdateAlmanaxBonusIndex(init bool, db *database.Repository) int
Types ¶
type AlmanaxBonusListing ¶
type AlmanaxResponse ¶
type AlmanaxResponse struct {
Date string `json:"date"`
Bonus struct {
Description string `json:"description"`
BonusType struct {
Name string `json:"name"`
Id string `json:"id"`
} `json:"type"`
} `json:"bonus"`
RewardKamas int `json:"reward_kamas"`
RewardXp *int `json:"reward_xp,omitempty"`
Tribute struct {
Item struct {
AnkamaId int64 `json:"ankama_id"`
ImageUrls ApiImageUrls `json:"image_urls"`
Name string `json:"name"`
Subtype string `json:"subtype"`
} `json:"item"`
Quantity int `json:"quantity"`
} `json:"tribute"`
}
type ApiImageUrls ¶
type ApiImageUrls struct {
Icon string `json:"icon"`
Sd string `json:"sd,omitempty"`
Hq string `json:"hq,omitempty"`
Hd string `json:"hd,omitempty"`
}
func RenderImageUrls ¶
func RenderImageUrls(urls []string) ApiImageUrls
Click to show internal directories.
Click to hide internal directories.