diff --git a/main.go b/main.go index 4c7bfd7..4765774 100644 --- a/main.go +++ b/main.go @@ -1,40 +1,15 @@ package main import ( + "encoding/json" + "fmt" "log" - "slices" "github.com/karashiiro/bingode" "github.com/xivapi/godestone/v2" ) func main() { - ignore := []string{ - "Carpenter", - "Blacksmith", - "Armorer", - "Goldsmith", - "Leatherworker", - "Weaver", - "Alchemist", - "Culinarian", - "Miner", - "Botanist", - "Fisher", - } - - base_levels := make(map[string]int) - - base_levels["Dark Knight"] = 30 - base_levels["Astrologian"] = 30 - base_levels["Machinist"] = 30 - base_levels["Red Mage"] = 50 - base_levels["Samurai"] = 50 - base_levels["Gunbreaker"] = 60 - base_levels["Dancer"] = 60 - base_levels["Reaper"] = 70 - base_levels["Sage"] = 70 - s := godestone.NewScraper(bingode.New(), godestone.EN) c, err := s.FetchCharacter(29932586) @@ -42,16 +17,6 @@ func main() { log.Fatalln(err) } - total := 0 - for _, v := range c.ClassJobs { - if v.Name != "Scholar" && !slices.Contains(ignore[:], v.Name) { - base_level, ok := base_levels[v.Name] - if !ok { - base_level = 0 - } - total += int(v.Level) - base_level - } - } - - println(total) + data, _ := json.Marshal(c.ClassJobs) + fmt.Printf("%s\n", data) }