almanax

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2025 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

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 GatherAlmanaxData(initial bool, headless bool) error

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 AlmanaxBonusListing struct {
	Id   string `json:"id"`   // english-id
	Name string `json:"name"` // translated text
}

type AlmanaxBonusListingMeili

type AlmanaxBonusListingMeili struct {
	Id   string `json:"id"`   // meili specific id without utf8 guarantees
	Slug string `json:"slug"` // english-id
	Name string `json:"name"` // translated text
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL