diff --git a/LICENSE b/LICENSE
index 23cfdd1..62c432c 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2017-2021 Allen Flickinger
+Copyright (c) 2017-2023 Allen Flickinger
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index e16e0b4..ac07d84 100644
--- a/README.md
+++ b/README.md
@@ -270,7 +270,7 @@ fmt.Println(header.LastModified)
## Documentation
-See the [Blizzard API reference](https://develop.battle.net/documentation/guides) and the [Go reference](https://pkg.go.dev/github.com/FuzzyStatic/blizzard/v2) for all the different datasets that can be acquired.
+See the [Blizzard API reference](https://develop.battle.net/documentation/guides) and the [Go reference](https://pkg.go.dev/github.com/FuzzyStatic/blizzard/v3) for all the different datasets that can be acquired.
## Special Thanks
diff --git a/v3/blizzard.go b/blizzard.go
similarity index 100%
rename from v3/blizzard.go
rename to blizzard.go
diff --git a/v3/d3c.go b/d3c.go
similarity index 100%
rename from v3/d3c.go
rename to d3c.go
diff --git a/v3/d3c_test.go b/d3c_test.go
similarity index 100%
rename from v3/d3c_test.go
rename to d3c_test.go
diff --git a/v3/d3gd.go b/d3gd.go
similarity index 100%
rename from v3/d3gd.go
rename to d3gd.go
diff --git a/v3/d3gd_test.go b/d3gd_test.go
similarity index 100%
rename from v3/d3gd_test.go
rename to d3gd_test.go
diff --git a/v3/errors.go b/errors.go
similarity index 100%
rename from v3/errors.go
rename to errors.go
diff --git a/v3/examples/authCodeFlow/main.go b/examples/authCodeFlow/main.go
similarity index 98%
rename from v3/examples/authCodeFlow/main.go
rename to examples/authCodeFlow/main.go
index 353e4d6..eb6e4cc 100644
--- a/v3/examples/authCodeFlow/main.go
+++ b/examples/authCodeFlow/main.go
@@ -8,8 +8,8 @@ import (
"net/http"
"os"
+ "github.com/FuzzyStatic/blizzard"
"github.com/FuzzyStatic/blizzard/oauth"
- "github.com/FuzzyStatic/blizzard/v3"
"golang.org/x/oauth2"
)
diff --git a/v3/examples/search/main.go b/examples/search/main.go
similarity index 97%
rename from v3/examples/search/main.go
rename to examples/search/main.go
index dcb514f..c9faa8b 100644
--- a/v3/examples/search/main.go
+++ b/examples/search/main.go
@@ -8,7 +8,7 @@ import (
"net/http"
"os"
- "github.com/FuzzyStatic/blizzard/v3"
+ "github.com/FuzzyStatic/blizzard"
"github.com/FuzzyStatic/blizzard/wowsearch"
)
diff --git a/v3/examples/simpleClient/main.go b/examples/simpleClient/main.go
similarity index 95%
rename from v3/examples/simpleClient/main.go
rename to examples/simpleClient/main.go
index 09714d4..ef08692 100644
--- a/v3/examples/simpleClient/main.go
+++ b/examples/simpleClient/main.go
@@ -6,7 +6,7 @@ import (
"net/http"
"os"
- "github.com/FuzzyStatic/blizzard/v3"
+ "github.com/FuzzyStatic/blizzard"
)
var (
diff --git a/go.mod b/go.mod
index 522cb5d..3d1b82e 100644
--- a/go.mod
+++ b/go.mod
@@ -1,19 +1,19 @@
module github.com/FuzzyStatic/blizzard
-go 1.18
+go 1.20
require (
- github.com/go-playground/validator/v10 v10.11.1
- golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1
+ github.com/go-playground/validator/v10 v10.11.2
+ golang.org/x/oauth2 v0.5.0
)
require (
- github.com/go-playground/locales v0.14.0 // indirect
- github.com/go-playground/universal-translator v0.18.0 // indirect
+ github.com/go-playground/locales v0.14.1 // indirect
+ github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
- golang.org/x/crypto v0.1.0 // indirect
- golang.org/x/net v0.7.0 // indirect
+ golang.org/x/crypto v0.5.0 // indirect
+ golang.org/x/net v0.6.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
diff --git a/go.sum b/go.sum
index 9780ac1..d1a771b 100644
--- a/go.sum
+++ b/go.sum
@@ -1,60 +1,38 @@
-github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
-github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
-github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU=
-github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
-github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho=
-github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
-github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ=
-github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU=
+github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
+github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
+github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
+github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
+github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
+github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU=
+github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
-github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
-github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
-github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
-github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
-golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU=
-golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
+golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
+golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
-golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1 h1:3VPzK7eqH25j7GYw5w6g/GzNRc0/fYtrxz27z1gD4W0=
-golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
+golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q=
+golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
+golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s=
+golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -66,9 +44,5 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
-gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/v3/header.go b/header.go
similarity index 100%
rename from v3/header.go
rename to header.go
diff --git a/v3/hsgd.go b/hsgd.go
similarity index 100%
rename from v3/hsgd.go
rename to hsgd.go
diff --git a/v3/hsgd_test.go b/hsgd_test.go
similarity index 100%
rename from v3/hsgd_test.go
rename to hsgd_test.go
diff --git a/v3/init_test.go b/init_test.go
similarity index 100%
rename from v3/init_test.go
rename to init_test.go
diff --git a/v3/oauth.go b/oauth.go
similarity index 100%
rename from v3/oauth.go
rename to oauth.go
diff --git a/v3/oauth_test.go b/oauth_test.go
similarity index 100%
rename from v3/oauth_test.go
rename to oauth_test.go
diff --git a/v3/region_string.go b/region_string.go
similarity index 100%
rename from v3/region_string.go
rename to region_string.go
diff --git a/v3/sc2c.go b/sc2c.go
similarity index 100%
rename from v3/sc2c.go
rename to sc2c.go
diff --git a/v3/sc2c_test.go b/sc2c_test.go
similarity index 100%
rename from v3/sc2c_test.go
rename to sc2c_test.go
diff --git a/v3/sc2gd.go b/sc2gd.go
similarity index 100%
rename from v3/sc2gd.go
rename to sc2gd.go
diff --git a/v3/sc2gd_test.go b/sc2gd_test.go
similarity index 100%
rename from v3/sc2gd_test.go
rename to sc2gd_test.go
diff --git a/v2/blizzard.go b/v2/blizzard.go
deleted file mode 100644
index d0e9710..0000000
--- a/v2/blizzard.go
+++ /dev/null
@@ -1,391 +0,0 @@
-// Package blizzard is a client library designed to make calling and processing Blizzard Game APIs simple
-package blizzard
-
-import (
- "context"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "net/http"
- "strings"
-
- "github.com/FuzzyStatic/blizzard/v2/wowp"
- "github.com/FuzzyStatic/blizzard/v2/wowsearch"
- "golang.org/x/oauth2"
- "golang.org/x/oauth2/clientcredentials"
-)
-
-// For testing
-var c *Client
-
-// Client regional API URLs, locale, client ID, client secret
-type Client struct {
- httpClient *http.Client
- cfg clientcredentials.Config
- authorizedCfg oauth2.Config
- oauth OAuth
- oauthHost string
- apiHost string
- dynamicNamespace, staticNamespace string
- profileNamespace string
- dynamicClassicNamespace, staticClassicNamespace string
- region Region
- locale Locale
-}
-
-// Region type
-type Region int
-
-// Region constants (1=US, 2=EU, 3=KO and TW, 5=CN) DO NOT REARRANGE
-const (
- _ Region = iota
- US
- EU
- KR
- TW
- CN
-)
-
-func (region Region) String() string {
- var rr = []string{
- "",
- "us",
- "eu",
- "kr",
- "tw",
- "cn",
- }
-
- return rr[region]
-}
-
-// Locale generic locale string
-// enUS, esMX, ptBR, enGB, esES, frFR, ruRU, deDE, ptPT, itIT, koKR, zhTW, zhCN
-type Locale string
-
-func (locale Locale) String() string {
- return string(locale)
-}
-
-// Locale constants
-const (
- DeDE = Locale("de_DE")
- EnUS = Locale("en_US")
- EsES = Locale("es_ES")
- EsMX = Locale("es_MX")
- FrFR = Locale("fr_FR")
- ItIT = Locale("it_IT")
- JaJP = Locale("ja_JP")
- KoKR = Locale("ko_KR")
- PlPL = Locale("pl_PL")
- PtBR = Locale("pt_BR")
- RuRU = Locale("ru_RU")
- ThTH = Locale("th_TH")
- ZhCN = Locale("zh_CN")
- ZhTW = Locale("zh_TW")
-)
-
-// NewClient create new Blizzard structure. This structure will be used to acquire your access token and make API calls.
-func NewClient(clientID, clientSecret string, region Region, locale Locale) *Client {
- var c = Client{
- oauth: OAuth{
- ClientID: clientID,
- ClientSecret: clientSecret,
- },
- locale: locale,
- }
-
- c.cfg = clientcredentials.Config{
- ClientID: c.oauth.ClientID,
- ClientSecret: c.oauth.ClientSecret,
- }
-
- c.SetRegion(region)
-
- return &c
-}
-
-// GetLocale returns the Locale of the client
-func (c *Client) GetLocale() Locale {
- return c.locale
-}
-
-// SetLocale changes the Locale of the client
-func (c *Client) SetLocale(locale Locale) {
- c.locale = locale
-}
-
-// GetRegion returns the Region of the client
-func (c *Client) GetRegion() Region {
- return c.region
-}
-
-// SetRegion changes the Region of the client
-func (c *Client) SetRegion(region Region) {
- c.region = region
-
- switch region {
- case CN:
- c.oauthHost = "https://www.battlenet.com.cn"
- c.apiHost = "https://gateway.battlenet.com.cn"
- c.dynamicNamespace = "dynamic-zh"
- c.dynamicClassicNamespace = "dynamic-classic-zh"
- c.profileNamespace = "profile-zh"
- c.staticNamespace = "static-zh"
- c.staticClassicNamespace = "static-classic-zh"
- default:
- c.oauthHost = fmt.Sprintf("https://%s.battle.net", region)
- c.apiHost = fmt.Sprintf("https://%s.api.blizzard.com", region)
- c.dynamicNamespace = fmt.Sprintf("dynamic-%s", region)
- c.dynamicClassicNamespace = fmt.Sprintf("dynamic-classic-%s", region)
- c.profileNamespace = fmt.Sprintf("profile-%s", region)
- c.staticNamespace = fmt.Sprintf("static-%s", region)
- c.staticClassicNamespace = fmt.Sprintf("static-classic-%s", region)
- }
-
- c.cfg.TokenURL = c.oauthHost + "/oauth/token"
- c.httpClient = c.cfg.Client(context.Background())
-}
-
-// GetOAuthHost returns the OAuth host of the client
-func (c *Client) GetOAuthHost() string {
- return c.oauthHost
-}
-
-// GetAPIHost returns the API host of the client
-func (c *Client) GetAPIHost() string {
- return c.apiHost
-}
-
-// GetDynamicNamespace returns the dynamic namespace of the client
-func (c *Client) GetDynamicNamespace() string {
- return c.dynamicNamespace
-}
-
-// GetDynamicClassicNamespace returns the classic dynamic namespace of the client
-func (c *Client) GetDynamicClassicNamespace() string {
- return c.dynamicClassicNamespace
-}
-
-// GetProfileNamespace returns the profile namespace of the client
-func (c *Client) GetProfileNamespace() string {
- return c.profileNamespace
-}
-
-// GetStaticNamespace returns the static namespace of the client
-func (c *Client) GetStaticNamespace() string {
- return c.staticNamespace
-}
-
-// GetStaticClassicNamespace returns the classic static namespace of the client
-func (c *Client) GetStaticClassicNamespace() string {
- return c.staticClassicNamespace
-}
-
-// buildSearchParams builds params for searches
-func buildSearchParams(opts ...wowsearch.Opt) string {
- if len(opts) == 0 {
- return ""
- }
- var params []string
- for _, opt := range opts {
- opt.Apply(¶ms)
- }
- return "?" + strings.Join(params, "&")
-}
-
-// getStructData processes simple GET request based on pathAndQuery an returns the structured data.
-func (c *Client) getStructData(ctx context.Context, pathAndQuery, namespace string, dat interface{}) (interface{}, *Header, error) {
- req, err := http.NewRequestWithContext(ctx, "GET", c.apiHost+pathAndQuery, nil)
- if err != nil {
- return dat, nil, err
- }
-
- req.Header.Set("Accept", "application/json")
-
- q := req.URL.Query()
- q.Set("locale", c.locale.String())
- req.URL.RawQuery = q.Encode()
-
- if namespace != "" {
- req.Header.Set("Battlenet-Namespace", namespace)
- }
-
- res, err := c.httpClient.Do(req)
- if err != nil {
- return dat, nil, err
- }
- defer res.Body.Close()
-
- body, err := io.ReadAll(res.Body)
- if err != nil {
- return dat, nil, err
- }
-
- if res.StatusCode != http.StatusOK {
- return dat, nil, errors.New(res.Status)
- }
-
- header, err := getHeader(res.Header)
- if err != nil {
- return dat, nil, err
- }
-
- switch dat.(type) {
- case *wowp.CharacterProfileSummary:
- var activeTitle wowp.ActiveTitlePreRev24
- if err = json.Unmarshal(body, &activeTitle); err != nil || activeTitle.ActiveTitle == "" {
- err = json.Unmarshal(body, &dat)
- return dat, nil, err
- }
-
- var temp *wowp.CharacterProfileSummaryPreRev24
- if err = json.Unmarshal(body, &temp); err == nil {
- wowp.ConvertCharacterProfileSummaryPreRev24(activeTitle.ActiveTitle,
- temp, dat.(*wowp.CharacterProfileSummary))
- }
- return dat, nil, err
-
- default:
- err = json.Unmarshal(body, &dat)
- if err != nil {
- return dat, nil, err
- }
- }
-
- return dat, header, nil
-}
-
-// getStructDataNoNamespace processes simple GET request based on pathAndQuery an returns the structured data.
-// Does not use a namespace.
-func (c *Client) getStructDataNoNamespace(ctx context.Context, pathAndQuery string, dat interface{}) (interface{}, *Header, error) {
- req, err := http.NewRequestWithContext(ctx, "GET", c.apiHost+pathAndQuery, nil)
- if err != nil {
- return dat, nil, err
- }
-
- req.Header.Set("Accept", "application/json")
-
- q := req.URL.Query()
- q.Set("locale", c.locale.String())
- req.URL.RawQuery = q.Encode()
-
- res, err := c.httpClient.Do(req)
- if err != nil {
- return dat, nil, err
- }
- defer res.Body.Close()
-
- body, err := io.ReadAll(res.Body)
- if err != nil {
- return dat, nil, err
- }
-
- if res.StatusCode != http.StatusOK {
- return dat, nil, errors.New(res.Status)
- }
-
- header, err := getHeader(res.Header)
- if err != nil {
- return dat, nil, err
- }
-
- err = json.Unmarshal(body, &dat)
- if err != nil {
- return dat, nil, err
- }
-
- return dat, header, nil
-}
-
-// getStructDataNoNamespace processes simple GET request based on pathAndQuery an returns the structured data.
-// Does not use a namespace or Locale
-func (c *Client) getStructDataNoNamespaceNoLocale(ctx context.Context, pathAndQuery string, dat interface{}) (interface{}, *Header, error) {
- req, err := http.NewRequestWithContext(ctx, "GET", c.apiHost+pathAndQuery, nil)
- if err != nil {
- return dat, nil, err
- }
-
- req.Header.Set("Accept", "application/json")
-
- res, err := c.httpClient.Do(req)
- if err != nil {
- return dat, nil, err
- }
- defer res.Body.Close()
-
- body, err := io.ReadAll(res.Body)
- if err != nil {
- return dat, nil, err
- }
-
- if res.StatusCode != http.StatusOK {
- return dat, nil, errors.New(res.Status)
- }
-
- header, err := getHeader(res.Header)
- if err != nil {
- return dat, nil, err
- }
-
- err = json.Unmarshal(body, &dat)
- if err != nil {
- return dat, nil, err
- }
-
- return dat, header, nil
-}
-
-// getStructDataOAuth processes simple GET request based on pathAndQuery an returns the structured data.
-// Uses OAuth2.
-func (c *Client) getStructDataOAuth(ctx context.Context, pathAndQuery, namespace string,
- token *oauth2.Token, dat interface{}) (interface{}, *Header, error) {
- req, err := http.NewRequestWithContext(ctx, "GET", c.apiHost+pathAndQuery, nil)
- if err != nil {
- return dat, nil, err
- }
-
- req.Header.Set("Accept", "application/json")
-
- q := req.URL.Query()
- q.Set("locale", c.locale.String())
- req.URL.RawQuery = q.Encode()
-
- if namespace != "" {
- req.Header.Set("Battlenet-Namespace", namespace)
- }
-
- client := c.authorizedCfg.Client(context.Background(), token)
-
- res, err := client.Do(req)
- if err != nil {
- return dat, nil, err
- }
- defer res.Body.Close()
-
- body, err := io.ReadAll(res.Body)
- if err != nil {
- return dat, nil, err
- }
-
- if res.StatusCode != http.StatusOK {
- return dat, nil, errors.New(res.Status)
- }
-
- header, err := getHeader(res.Header)
- if err != nil {
- return dat, nil, err
- }
-
- err = json.Unmarshal(body, &dat)
- if err != nil {
- return dat, nil, err
- }
-
- return dat, header, nil
-}
-
-func formatAccount(account string) string {
- return strings.Replace(account, "#", "-", 1)
-}
diff --git a/v2/d3c.go b/v2/d3c.go
deleted file mode 100644
index c71264e..0000000
--- a/v2/d3c.go
+++ /dev/null
@@ -1,291 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
-
- "github.com/FuzzyStatic/blizzard/v2/d3c"
-)
-
-// D3ActIndex returns an index of acts
-func (c *Client) D3ActIndex(ctx context.Context) (*d3c.ActIndex, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/d3/data/act",
- &d3c.ActIndex{},
- )
- return dat.(*d3c.ActIndex), header, err
-}
-
-// D3Act returns information about act based on ID
-func (c *Client) D3Act(ctx context.Context, id int) (*d3c.Act, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/d3/data/act/%d", id),
- &d3c.Act{},
- )
- return dat.(*d3c.Act), header, err
-}
-
-// D3Blacksmith returns blacksmith data
-func (c *Client) D3Blacksmith(ctx context.Context) (*d3c.Artisan, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/d3/data/artisan/blacksmith",
- &d3c.Artisan{},
- )
- return dat.(*d3c.Artisan), header, err
-}
-
-// D3Jeweler returns jeweler data
-func (c *Client) D3Jeweler(ctx context.Context) (*d3c.Artisan, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/d3/data/artisan/jeweler",
- &d3c.Artisan{},
- )
- return dat.(*d3c.Artisan), header, err
-}
-
-// D3Mystic returns mystic data
-func (c *Client) D3Mystic(ctx context.Context) (*d3c.Artisan, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/d3/data/artisan/mystic",
- &d3c.Artisan{},
- )
- return dat.(*d3c.Artisan), header, err
-}
-
-// D3BlacksmithRecipe returns blacksmith recipe data
-func (c *Client) D3BlacksmithRecipe(ctx context.Context, recipeSlug string) (*d3c.Recipe, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/d3/data/artisan/blacksmith/recipe/%s", recipeSlug),
- &d3c.Recipe{},
- )
- return dat.(*d3c.Recipe), header, err
-}
-
-// D3JewelerRecipe returns jeweler recipe data
-func (c *Client) D3JewelerRecipe(ctx context.Context, recipeSlug string) (*d3c.Recipe, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/d3/data/artisan/jeweler/recipe/%s", recipeSlug),
- &d3c.Recipe{},
- )
- return dat.(*d3c.Recipe), header, err
-}
-
-// D3Enchantress returns enchantress data
-func (c *Client) D3Enchantress(ctx context.Context) (*d3c.Follower, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/d3/data/follower/enchantress",
- &d3c.Follower{},
- )
- return dat.(*d3c.Follower), header, err
-}
-
-// D3Scoundrel returns scoundrel data
-func (c *Client) D3Scoundrel(ctx context.Context) (*d3c.Follower, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/d3/data/follower/scoundrel",
- &d3c.Follower{},
- )
- return dat.(*d3c.Follower), header, err
-}
-
-// D3Templar returns templar data
-func (c *Client) D3Templar(ctx context.Context) (*d3c.Follower, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/d3/data/follower/templar",
- &d3c.Follower{},
- )
- return dat.(*d3c.Follower), header, err
-}
-
-// D3Barbarian returns barbarian data
-func (c *Client) D3Barbarian(ctx context.Context) (*d3c.Hero, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/d3/data/hero/barbarian",
- &d3c.Hero{},
- )
- return dat.(*d3c.Hero), header, err
-}
-
-// D3Crusader returns crusader data
-func (c *Client) D3Crusader(ctx context.Context) (*d3c.Hero, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/d3/data/hero/crusader",
- &d3c.Hero{},
- )
- return dat.(*d3c.Hero), header, err
-}
-
-// D3DemonHunter returns demon hunter data
-func (c *Client) D3DemonHunter(ctx context.Context) (*d3c.Hero, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/d3/data/hero/demon-hunter",
- &d3c.Hero{},
- )
- return dat.(*d3c.Hero), header, err
-}
-
-// D3Monk returns monk data
-func (c *Client) D3Monk(ctx context.Context) (*d3c.Hero, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/d3/data/hero/monk",
- &d3c.Hero{},
- )
- return dat.(*d3c.Hero), header, err
-}
-
-// D3Necromancer returns necromancer data
-func (c *Client) D3Necromancer(ctx context.Context) (*d3c.Hero, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/d3/data/hero/necromancer",
- &d3c.Hero{},
- )
- return dat.(*d3c.Hero), header, err
-}
-
-// D3Wizard returns wizard data
-func (c *Client) D3Wizard(ctx context.Context) (*d3c.Hero, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/d3/data/hero/wizard",
- &d3c.Hero{},
- )
- return dat.(*d3c.Hero), header, err
-}
-
-// D3WitchDoctor returns witch doctor data
-func (c *Client) D3WitchDoctor(ctx context.Context) (*d3c.Hero, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/d3/data/hero/witch-doctor",
- &d3c.Hero{},
- )
- return dat.(*d3c.Hero), header, err
-}
-
-// D3BarbarianSkill returns barbarian skill data
-func (c *Client) D3BarbarianSkill(ctx context.Context, skillSlug string) (*d3c.Skill, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/d3/data/hero/barbarian/skill/%s", skillSlug),
- &d3c.Skill{},
- )
- return dat.(*d3c.Skill), header, err
-}
-
-// D3CrusaderSkill returns crusader skill data
-func (c *Client) D3CrusaderSkill(ctx context.Context, skillSlug string) (*d3c.Skill, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/d3/data/hero/crusader/skill/%s", skillSlug),
- &d3c.Skill{},
- )
- return dat.(*d3c.Skill), header, err
-}
-
-// D3DemonHunterSkill returns demon hunter skill data
-func (c *Client) D3DemonHunterSkill(ctx context.Context, skillSlug string) (*d3c.Skill, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/d3/data/hero/demon-hunter/skill/%s", skillSlug),
- &d3c.Skill{},
- )
- return dat.(*d3c.Skill), header, err
-}
-
-// D3MonkSkill returns monk skill data
-func (c *Client) D3MonkSkill(ctx context.Context, skillSlug string) (*d3c.Skill, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/d3/data/hero/monk/skill/%s", skillSlug),
- &d3c.Skill{},
- )
- return dat.(*d3c.Skill), header, err
-}
-
-// D3NecromancerSkill returns necromancer skill data
-func (c *Client) D3NecromancerSkill(ctx context.Context, skillSlug string) (*d3c.Skill, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/d3/data/hero/necromancer/skill/%s", skillSlug),
- &d3c.Skill{},
- )
- return dat.(*d3c.Skill), header, err
-}
-
-// D3WizardSkill returns wizard skill data
-func (c *Client) D3WizardSkill(ctx context.Context, skillSlug string) (*d3c.Skill, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/d3/data/hero/wizard/skill/%s", skillSlug),
- &d3c.Skill{},
- )
- return dat.(*d3c.Skill), header, err
-}
-
-// D3WitchDoctorSkill returns witch doctor skill data
-func (c *Client) D3WitchDoctorSkill(ctx context.Context, skillSlug string) (*d3c.Skill, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/d3/data/hero/witch-doctor/skill/%s", skillSlug),
- &d3c.Skill{},
- )
- return dat.(*d3c.Skill), header, err
-}
-
-// D3ItemTypeIndex returns an index of item types
-func (c *Client) D3ItemTypeIndex(ctx context.Context) (*d3c.ItemTypeIndex, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/d3/data/item-type",
- &d3c.ItemTypeIndex{},
- )
- return dat.(*d3c.ItemTypeIndex), header, err
-}
-
-// D3ItemType returns item type data
-func (c *Client) D3ItemType(ctx context.Context, itemTypeSlug string) (*d3c.ItemType, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/d3/data/item-type/%s", itemTypeSlug),
- &d3c.ItemType{},
- )
- return dat.(*d3c.ItemType), header, err
-}
-
-// D3Item returns item data
-func (c *Client) D3Item(ctx context.Context, itemSlug, itemID string) (*d3c.Item, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/d3/data/item/%s-%s", itemSlug, itemID),
- &d3c.Item{},
- )
- return dat.(*d3c.Item), header, err
-}
-
-// D3Profile returns profile data
-// Formats accepted: Player-1234 or Player#1234
-func (c *Client) D3Profile(ctx context.Context, account string) (*d3c.Profile, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/d3/profile/%s/", formatAccount(account)),
- &d3c.Profile{},
- )
- return dat.(*d3c.Profile), header, err
-}
-
-// D3ProfileHero returns profile's hero data
-// Formats accepted: Player-1234 or Player#1234
-func (c *Client) D3ProfileHero(ctx context.Context, account string, heroID int) (*d3c.ProfileHero, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/d3/profile/%s/hero/%d", formatAccount(account), heroID),
- &d3c.ProfileHero{},
- )
- return dat.(*d3c.ProfileHero), header, err
-}
-
-// D3ProfileHeroItems returns profile's hero's item data
-// Formats accepted: Player-1234 or Player#1234
-func (c *Client) D3ProfileHeroItems(ctx context.Context, account string, heroID int) (*d3c.ProfileHeroItems, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/d3/profile/%s/hero/%d/items", formatAccount(account), heroID),
- &d3c.ProfileHeroItems{},
- )
- return dat.(*d3c.ProfileHeroItems), header, err
-}
-
-// D3ProfileHeroFollowerItems returns profile's hero's follower item data
-// Formats accepted: Player-1234 or Player#1234
-func (c *Client) D3ProfileHeroFollowerItems(ctx context.Context, account string, heroID int) (*d3c.ProfileHeroFollowerItems, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/d3/profile/%s/hero/%d/follower-items", formatAccount(account), heroID),
- &d3c.ProfileHeroFollowerItems{},
- )
- return dat.(*d3c.ProfileHeroFollowerItems), header, err
-}
diff --git a/v2/d3c/act.go b/v2/d3c/act.go
deleted file mode 100644
index 75e0bed..0000000
--- a/v2/d3c/act.go
+++ /dev/null
@@ -1,18 +0,0 @@
-package d3c
-
-// ActIndex contains slice of Acts
-type ActIndex struct {
- Acts []Act `json:"acts"`
-}
-
-// Act contains act data
-type Act struct {
- Slug string `json:"slug"`
- Number int `json:"number"`
- Name string `json:"name"`
- Quests []struct {
- ID int `json:"id"`
- Name string `json:"name"`
- Slug string `json:"slug"`
- } `json:"quests"`
-}
diff --git a/v2/d3c/artisanRecipe.go b/v2/d3c/artisanRecipe.go
deleted file mode 100644
index ce4da88..0000000
--- a/v2/d3c/artisanRecipe.go
+++ /dev/null
@@ -1,84 +0,0 @@
-package d3c
-
-// Artisan structure
-type Artisan struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- Portrait string `json:"portrait"`
- Training struct {
- Tiers []struct {
- Tier int `json:"tier"`
- TrainedRecipes []struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Cost int `json:"cost"`
- Reagents []struct {
- Quantity int `json:"quantity"`
- Item struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Path string `json:"path"`
- } `json:"item"`
- } `json:"reagents"`
- ItemProduced struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Path string `json:"path"`
- } `json:"itemProduced"`
- } `json:"trainedRecipes"`
- TaughtRecipes []struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Cost int `json:"cost"`
- Reagents []struct {
- Quantity int `json:"quantity"`
- Item struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Path string `json:"path"`
- } `json:"item"`
- } `json:"reagents"`
- ItemProduced struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Path string `json:"path"`
- } `json:"itemProduced"`
- } `json:"taughtRecipes"`
- } `json:"tiers"`
- } `json:"training"`
-}
-
-// Recipe artisan recipe structure
-type Recipe struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Cost int `json:"cost"`
- Reagents []struct {
- Quantity int `json:"quantity"`
- Item struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Path string `json:"path"`
- } `json:"item"`
- } `json:"reagents"`
- ItemProduced struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Path string `json:"path"`
- } `json:"itemProduced"`
-}
diff --git a/v2/d3c/characterClassAndSkill.go b/v2/d3c/characterClassAndSkill.go
deleted file mode 100644
index fd51b3c..0000000
--- a/v2/d3c/characterClassAndSkill.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package d3c
-
-// Hero structure
-type Hero struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- MaleName string `json:"maleName"`
- FemaleName string `json:"femaleName"`
- Icon string `json:"icon"`
- SkillCategories []struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- } `json:"skillCategories"`
- Skills struct {
- Active []struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Level int `json:"level"`
- TooltipURL string `json:"tooltipUrl"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"active"`
- Passive []struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Level int `json:"level"`
- TooltipURL string `json:"tooltipUrl"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- FlavorText string `json:"flavorText"`
- } `json:"passive"`
- } `json:"skills"`
-}
-
-// Skill structure
-type Skill struct {
- Skill struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Level int `json:"level"`
- TooltipURL string `json:"tooltipUrl"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"skill"`
- Runes []struct {
- Slug string `json:"slug"`
- Type string `json:"type"`
- Name string `json:"name"`
- Level int `json:"level"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"runes"`
-}
diff --git a/v2/d3c/d3c.go b/v2/d3c/d3c.go
deleted file mode 100644
index e0a0cbb..0000000
--- a/v2/d3c/d3c.go
+++ /dev/null
@@ -1,2 +0,0 @@
-// Package d3c contains types for the Diablo 3 Community APIs
-package d3c
diff --git a/v2/d3c/follower.go b/v2/d3c/follower.go
deleted file mode 100644
index a7f6554..0000000
--- a/v2/d3c/follower.go
+++ /dev/null
@@ -1,18 +0,0 @@
-package d3c
-
-// Follower structure
-type Follower struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- RealName string `json:"realName"`
- Portrait string `json:"portrait"`
- Skills []struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Level int `json:"level"`
- TooltipURL string `json:"tooltipUrl"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"skills"`
-}
diff --git a/v2/d3c/item.go b/v2/d3c/item.go
deleted file mode 100644
index b3fc5b5..0000000
--- a/v2/d3c/item.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package d3c
-
-// Item structure
-type Item struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- FlavorTextHTML string `json:"flavorTextHtml"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Damage string `json:"damage"`
- Dps string `json:"dps"`
- DamageHTML string `json:"damageHtml"`
- Color string `json:"color"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- Slots []string `json:"slots"`
- Attributes struct {
- Primary []struct {
- TextHTML string `json:"textHtml"`
- Text string `json:"text"`
- } `json:"primary"`
- Secondary []struct {
- TextHTML string `json:"textHtml"`
- Text string `json:"text"`
- } `json:"secondary"`
- Other []interface{} `json:"other"`
- } `json:"attributes"`
- RandomAffixes []struct {
- OneOf []struct {
- TextHTML string `json:"textHtml"`
- Text string `json:"text"`
- } `json:"oneOf"`
- } `json:"randomAffixes"`
- SetItems []string `json:"setItems"`
-}
diff --git a/v2/d3c/itemType.go b/v2/d3c/itemType.go
deleted file mode 100644
index f1346e6..0000000
--- a/v2/d3c/itemType.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package d3c
-
-// ItemTypeIndex structure
-type ItemTypeIndex []struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Path string `json:"path"`
-}
-
-// ItemType structure
-type ItemType []struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Path string `json:"path"`
-}
diff --git a/v2/d3c/profile.go b/v2/d3c/profile.go
deleted file mode 100644
index 04dbfa7..0000000
--- a/v2/d3c/profile.go
+++ /dev/null
@@ -1,1370 +0,0 @@
-package d3c
-
-// Profile structure
-type Profile struct {
- BattleTag string `json:"battleTag"`
- ParagonLevel int `json:"paragonLevel"`
- ParagonLevelHardcore int `json:"paragonLevelHardcore"`
- ParagonLevelSeason int `json:"paragonLevelSeason"`
- ParagonLevelSeasonHardcore int `json:"paragonLevelSeasonHardcore"`
- GuildName string `json:"guildName"`
- Heroes []struct {
- ID int `json:"id"`
- Name string `json:"name"`
- Class string `json:"class"`
- ClassSlug string `json:"classSlug"`
- Gender int `json:"gender"`
- Level int `json:"level"`
- Kills struct {
- Elites int `json:"elites"`
- } `json:"kills"`
- ParagonLevel int `json:"paragonLevel"`
- Hardcore bool `json:"hardcore"`
- Seasonal bool `json:"seasonal"`
- Dead bool `json:"dead"`
- LastUpdated int `json:"last-updated"`
- } `json:"heroes"`
- LastHeroPlayed int `json:"lastHeroPlayed"`
- LastUpdated int `json:"lastUpdated"`
- Kills struct {
- Monsters int `json:"monsters"`
- Elites int `json:"elites"`
- HardcoreMonsters int `json:"hardcoreMonsters"`
- } `json:"kills"`
- HighestHardcoreLevel int `json:"highestHardcoreLevel"`
- TimePlayed struct {
- DemonHunter float64 `json:"demon-hunter"`
- Barbarian float64 `json:"barbarian"`
- WitchDoctor float64 `json:"witch-doctor"`
- Wizard float64 `json:"wizard"`
- Monk float64 `json:"monk"`
- Crusader float64 `json:"crusader"`
- } `json:"timePlayed"`
- Progression struct {
- Act1 bool `json:"act1"`
- Act3 bool `json:"act3"`
- Act2 bool `json:"act2"`
- Act5 bool `json:"act5"`
- Act4 bool `json:"act4"`
- } `json:"progression"`
- SeasonalProfiles struct {
- Season13 struct {
- SeasonID int `json:"seasonId"`
- ParagonLevel int `json:"paragonLevel"`
- ParagonLevelHardcore int `json:"paragonLevelHardcore"`
- Kills struct {
- Monsters int `json:"monsters"`
- Elites int `json:"elites"`
- HardcoreMonsters int `json:"hardcoreMonsters"`
- } `json:"kills"`
- TimePlayed struct {
- DemonHunter float64 `json:"demon-hunter"`
- Barbarian float64 `json:"barbarian"`
- WitchDoctor float64 `json:"witch-doctor"`
- Necromancer float64 `json:"necromancer"`
- Wizard float64 `json:"wizard"`
- Monk float64 `json:"monk"`
- Crusader float64 `json:"crusader"`
- } `json:"timePlayed"`
- HighestHardcoreLevel int `json:"highestHardcoreLevel"`
- } `json:"season13"`
- Season0 struct {
- SeasonID int `json:"seasonId"`
- ParagonLevel int `json:"paragonLevel"`
- ParagonLevelHardcore int `json:"paragonLevelHardcore"`
- Kills struct {
- Monsters int `json:"monsters"`
- Elites int `json:"elites"`
- HardcoreMonsters int `json:"hardcoreMonsters"`
- } `json:"kills"`
- TimePlayed struct {
- DemonHunter float64 `json:"demon-hunter"`
- Barbarian float64 `json:"barbarian"`
- WitchDoctor float64 `json:"witch-doctor"`
- Necromancer float64 `json:"necromancer"`
- Wizard float64 `json:"wizard"`
- Monk float64 `json:"monk"`
- Crusader float64 `json:"crusader"`
- } `json:"timePlayed"`
- HighestHardcoreLevel int `json:"highestHardcoreLevel"`
- } `json:"season0"`
- } `json:"seasonalProfiles"`
- JewelerSeasonHardcore struct {
- Slug string `json:"slug"`
- Level int `json:"level"`
- } `json:"jewelerSeasonHardcore"`
- MysticSeasonHardcore struct {
- Slug string `json:"slug"`
- Level int `json:"level"`
- } `json:"mysticSeasonHardcore"`
- BlacksmithSeason struct {
- Slug string `json:"slug"`
- Level int `json:"level"`
- } `json:"blacksmithSeason"`
- JewelerSeason struct {
- Slug string `json:"slug"`
- Level int `json:"level"`
- } `json:"jewelerSeason"`
- BlacksmithHardcore struct {
- Slug string `json:"slug"`
- Level int `json:"level"`
- } `json:"blacksmithHardcore"`
- JewelerHardcore struct {
- Slug string `json:"slug"`
- Level int `json:"level"`
- } `json:"jewelerHardcore"`
- MysticHardcore struct {
- Slug string `json:"slug"`
- Level int `json:"level"`
- } `json:"mysticHardcore"`
- BlacksmithSeasonHardcore struct {
- Slug string `json:"slug"`
- Level int `json:"level"`
- } `json:"blacksmithSeasonHardcore"`
- MysticSeason struct {
- Slug string `json:"slug"`
- Level int `json:"level"`
- } `json:"mysticSeason"`
- Blacksmith struct {
- Slug string `json:"slug"`
- Level int `json:"level"`
- } `json:"blacksmith"`
- Jeweler struct {
- Slug string `json:"slug"`
- Level int `json:"level"`
- } `json:"jeweler"`
- Mystic struct {
- Slug string `json:"slug"`
- Level int `json:"level"`
- } `json:"mystic"`
-}
-
-// ProfileHero structure
-type ProfileHero struct {
- ID int `json:"id"`
- Name string `json:"name"`
- Class string `json:"class"`
- Gender int `json:"gender"`
- Level int `json:"level"`
- ParagonLevel int `json:"paragonLevel"`
- Kills struct {
- Elites int `json:"elites"`
- } `json:"kills"`
- Hardcore bool `json:"hardcore"`
- Seasonal bool `json:"seasonal"`
- SeasonCreated int `json:"seasonCreated"`
- Skills struct {
- Active []struct {
- Skill struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Level int `json:"level"`
- TooltipURL string `json:"tooltipUrl"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"skill"`
- Rune struct {
- Slug string `json:"slug"`
- Type string `json:"type"`
- Name string `json:"name"`
- Level int `json:"level"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"rune"`
- } `json:"active"`
- Passive []struct {
- Skill struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Level int `json:"level"`
- TooltipURL string `json:"tooltipUrl"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- FlavorText string `json:"flavorText"`
- } `json:"skill"`
- } `json:"passive"`
- } `json:"skills"`
- Items struct {
- Head struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- TransmogItem struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"transmogItem"`
- } `json:"head"`
- Neck struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"neck"`
- Torso struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- TransmogItem struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"transmogItem"`
- } `json:"torso"`
- Shoulders struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- TransmogItem struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"transmogItem"`
- } `json:"shoulders"`
- Legs struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- TransmogItem struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"transmogItem"`
- } `json:"legs"`
- Waist struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"waist"`
- Hands struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- TransmogItem struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"transmogItem"`
- } `json:"hands"`
- Bracers struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"bracers"`
- Feet struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- TransmogItem struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"transmogItem"`
- } `json:"feet"`
- LeftFinger struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"leftFinger"`
- RightFinger struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"rightFinger"`
- MainHand struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"mainHand"`
- OffHand struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- TransmogItem struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"transmogItem"`
- } `json:"offHand"`
- } `json:"items"`
- Followers struct {
- Templar struct {
- Slug string `json:"slug"`
- Level int `json:"level"`
- Items struct {
- Neck struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"neck"`
- LeftFinger struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"leftFinger"`
- RightFinger struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"rightFinger"`
- MainHand struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"mainHand"`
- OffHand struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"offHand"`
- } `json:"items"`
- Stats struct {
- GoldFind float64 `json:"goldFind"`
- MagicFind float64 `json:"magicFind"`
- ExperienceBonus float64 `json:"experienceBonus"`
- } `json:"stats"`
- Skills []struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Level int `json:"level"`
- TooltipURL string `json:"tooltipUrl"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"skills"`
- } `json:"templar"`
- Scoundrel struct {
- Slug string `json:"slug"`
- Level int `json:"level"`
- Items struct {
- MainHand struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"mainHand"`
- } `json:"items"`
- Stats struct {
- GoldFind float64 `json:"goldFind"`
- MagicFind float64 `json:"magicFind"`
- ExperienceBonus float64 `json:"experienceBonus"`
- } `json:"stats"`
- Skills []struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Level int `json:"level"`
- TooltipURL string `json:"tooltipUrl"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"skills"`
- } `json:"scoundrel"`
- Enchantress struct {
- Slug string `json:"slug"`
- Level int `json:"level"`
- Items struct {
- MainHand struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"mainHand"`
- } `json:"items"`
- Stats struct {
- GoldFind float64 `json:"goldFind"`
- MagicFind float64 `json:"magicFind"`
- ExperienceBonus float64 `json:"experienceBonus"`
- } `json:"stats"`
- Skills []struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Level int `json:"level"`
- TooltipURL string `json:"tooltipUrl"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"skills"`
- } `json:"enchantress"`
- } `json:"followers"`
- LegendaryPowers []struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"legendaryPowers"`
- Progression struct {
- Act1 struct {
- Completed bool `json:"completed"`
- CompletedQuests []struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- } `json:"completedQuests"`
- } `json:"act1"`
- Act2 struct {
- Completed bool `json:"completed"`
- CompletedQuests []struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- } `json:"completedQuests"`
- } `json:"act2"`
- Act3 struct {
- Completed bool `json:"completed"`
- CompletedQuests []struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- } `json:"completedQuests"`
- } `json:"act3"`
- Act4 struct {
- Completed bool `json:"completed"`
- CompletedQuests []struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- } `json:"completedQuests"`
- } `json:"act4"`
- Act5 struct {
- Completed bool `json:"completed"`
- CompletedQuests []struct {
- Slug string `json:"slug"`
- Name string `json:"name"`
- } `json:"completedQuests"`
- } `json:"act5"`
- } `json:"progression"`
- Alive bool `json:"alive"`
- LastUpdated int `json:"lastUpdated"`
- HighestSoloRiftCompleted int `json:"highestSoloRiftCompleted"`
- Stats struct {
- Life float64 `json:"life"`
- Damage float64 `json:"damage"`
- Toughness float64 `json:"toughness"`
- Healing float64 `json:"healing"`
- AttackSpeed float64 `json:"attackSpeed"`
- Armor float64 `json:"armor"`
- Strength float64 `json:"strength"`
- Dexterity float64 `json:"dexterity"`
- Vitality float64 `json:"vitality"`
- Intelligence float64 `json:"intelligence"`
- PhysicalResist float64 `json:"physicalResist"`
- FireResist float64 `json:"fireResist"`
- ColdResist float64 `json:"coldResist"`
- LightningResist float64 `json:"lightningResist"`
- PoisonResist float64 `json:"poisonResist"`
- ArcaneResist float64 `json:"arcaneResist"`
- BlockChance float64 `json:"blockChance"`
- BlockAmountMin float64 `json:"blockAmountMin"`
- BlockAmountMax float64 `json:"blockAmountMax"`
- GoldFind float64 `json:"goldFind"`
- CritChance float64 `json:"critChance"`
- Thorns float64 `json:"thorns"`
- LifeSteal float64 `json:"lifeSteal"`
- LifePerKill float64 `json:"lifePerKill"`
- LifeOnHit float64 `json:"lifeOnHit"`
- PrimaryResource float64 `json:"primaryResource"`
- SecondaryResource float64 `json:"secondaryResource"`
- } `json:"stats"`
-}
-
-// ProfileHeroItems structure
-type ProfileHeroItems struct {
- Head struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- Augmentation string `json:"augmentation"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- Gems []struct {
- Item struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Path string `json:"path"`
- } `json:"item"`
- Attributes []string `json:"attributes"`
- IsGem bool `json:"isGem"`
- IsJewel bool `json:"isJewel"`
- } `json:"gems"`
- Set struct {
- Name string `json:"name"`
- Slug string `json:"slug"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"set"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"head"`
- Neck struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- Augmentation string `json:"augmentation"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- Gems []struct {
- Item struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Path string `json:"path"`
- } `json:"item"`
- JewelRank int `json:"jewelRank"`
- JewelSecondaryUnlockRank int `json:"jewelSecondaryUnlockRank"`
- Attributes []string `json:"attributes"`
- IsGem bool `json:"isGem"`
- IsJewel bool `json:"isJewel"`
- } `json:"gems"`
- Set struct {
- Name string `json:"name"`
- Slug string `json:"slug"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"set"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"neck"`
- Torso struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- Gems []struct {
- Item struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Path string `json:"path"`
- } `json:"item"`
- Attributes []string `json:"attributes"`
- IsGem bool `json:"isGem"`
- IsJewel bool `json:"isJewel"`
- } `json:"gems"`
- Set struct {
- Name string `json:"name"`
- Slug string `json:"slug"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"set"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- Transmog struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- } `json:"transmog"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"torso"`
- Shoulders struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- Augmentation string `json:"augmentation"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- Set struct {
- Name string `json:"name"`
- Slug string `json:"slug"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"set"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"shoulders"`
- Legs struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- Augmentation string `json:"augmentation"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- Gems []struct {
- Item struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Path string `json:"path"`
- } `json:"item"`
- Attributes []string `json:"attributes"`
- IsGem bool `json:"isGem"`
- IsJewel bool `json:"isJewel"`
- } `json:"gems"`
- Set struct {
- Name string `json:"name"`
- Slug string `json:"slug"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"set"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"legs"`
- Waist struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"waist"`
- Hands struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- Augmentation string `json:"augmentation"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- Set struct {
- Name string `json:"name"`
- Slug string `json:"slug"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"set"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"hands"`
- Bracers struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- ElementalType string `json:"elementalType"`
- Slots string `json:"slots"`
- Augmentation string `json:"augmentation"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"bracers"`
- Feet struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- Set struct {
- Name string `json:"name"`
- Slug string `json:"slug"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"set"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"feet"`
- LeftFinger struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- Gems []struct {
- Item struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Path string `json:"path"`
- } `json:"item"`
- JewelRank int `json:"jewelRank"`
- JewelSecondaryUnlockRank int `json:"jewelSecondaryUnlockRank"`
- Attributes []string `json:"attributes"`
- IsGem bool `json:"isGem"`
- IsJewel bool `json:"isJewel"`
- } `json:"gems"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"leftFinger"`
- RightFinger struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- Augmentation string `json:"augmentation"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- Gems []struct {
- Item struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Path string `json:"path"`
- } `json:"item"`
- JewelRank int `json:"jewelRank"`
- JewelSecondaryUnlockRank int `json:"jewelSecondaryUnlockRank"`
- Attributes []string `json:"attributes"`
- IsGem bool `json:"isGem"`
- IsJewel bool `json:"isJewel"`
- } `json:"gems"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"rightFinger"`
- MainHand struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- Damage string `json:"damage"`
- Dps string `json:"dps"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- ElementalType string `json:"elementalType"`
- Slots string `json:"slots"`
- Augmentation string `json:"augmentation"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- Gems []struct {
- Item struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- Path string `json:"path"`
- } `json:"item"`
- Attributes []string `json:"attributes"`
- IsGem bool `json:"isGem"`
- IsJewel bool `json:"isJewel"`
- } `json:"gems"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"mainHand"`
- OffHand struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- Augmentation string `json:"augmentation"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- Set struct {
- Name string `json:"name"`
- Slug string `json:"slug"`
- Description string `json:"description"`
- DescriptionHTML string `json:"descriptionHtml"`
- } `json:"set"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"offHand"`
-}
-
-// ProfileHeroFollowerItems structure
-type ProfileHeroFollowerItems struct {
- Templar struct {
- MainHand struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- Damage string `json:"damage"`
- Dps string `json:"dps"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- OpenSockets int `json:"openSockets"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"mainHand"`
- OffHand struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- OpenSockets int `json:"openSockets"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- BlockChance string `json:"blockChance"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"offHand"`
- } `json:"templar"`
- Scoundrel struct {
- MainHand struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- Damage string `json:"damage"`
- Dps string `json:"dps"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- Attributes struct {
- Primary []string `json:"primary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"mainHand"`
- } `json:"scoundrel"`
- Enchantress struct {
- Neck struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"neck"`
- LeftFinger struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"leftFinger"`
- RightFinger struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"rightFinger"`
- MainHand struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- Damage string `json:"damage"`
- Dps string `json:"dps"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- ElementalType string `json:"elementalType"`
- Slots string `json:"slots"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"mainHand"`
- Special struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Icon string `json:"icon"`
- DisplayColor string `json:"displayColor"`
- TooltipParams string `json:"tooltipParams"`
- RequiredLevel int `json:"requiredLevel"`
- ItemLevel int `json:"itemLevel"`
- StackSizeMax int `json:"stackSizeMax"`
- AccountBound bool `json:"accountBound"`
- FlavorText string `json:"flavorText"`
- TypeName string `json:"typeName"`
- Type struct {
- TwoHanded bool `json:"twoHanded"`
- ID string `json:"id"`
- } `json:"type"`
- Armor float64 `json:"armor"`
- AttacksPerSecond float64 `json:"attacksPerSecond"`
- MinDamage float64 `json:"minDamage"`
- MaxDamage float64 `json:"maxDamage"`
- Slots string `json:"slots"`
- Attributes struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributes"`
- AttributesHTML struct {
- Primary []string `json:"primary"`
- Secondary []string `json:"secondary"`
- } `json:"attributesHtml"`
- OpenSockets int `json:"openSockets"`
- SeasonRequiredToDrop int `json:"seasonRequiredToDrop"`
- IsSeasonRequiredToDrop bool `json:"isSeasonRequiredToDrop"`
- } `json:"special"`
- } `json:"enchantress"`
-}
diff --git a/v2/d3c_test.go b/v2/d3c_test.go
deleted file mode 100644
index 94cfa57..0000000
--- a/v2/d3c_test.go
+++ /dev/null
@@ -1,379 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
- "testing"
-)
-
-func TestD3ActIndex(t *testing.T) {
- dat, _, err := c.D3ActIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3Act(t *testing.T) {
- dat, _, err := c.D3Act(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3Blacksmith(t *testing.T) {
- dat, _, err := c.D3Blacksmith(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3Jeweler(t *testing.T) {
- dat, _, err := c.D3Jeweler(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3Mystic(t *testing.T) {
- dat, _, err := c.D3Mystic(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3BlacksmithRecipe(t *testing.T) {
- dat, _, err := c.D3BlacksmithRecipe(context.Background(), "apprentice-flamberge")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3JewelerRecipe(t *testing.T) {
- dat, _, err := c.D3JewelerRecipe(context.Background(), "flawless-amethyst")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3Enchantress(t *testing.T) {
- dat, _, err := c.D3Enchantress(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3Scoundrel(t *testing.T) {
- dat, _, err := c.D3Scoundrel(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3Templar(t *testing.T) {
- dat, _, err := c.D3Templar(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3Barbarian(t *testing.T) {
- dat, _, err := c.D3Barbarian(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3Crusader(t *testing.T) {
- dat, _, err := c.D3Crusader(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3DemonHunter(t *testing.T) {
- dat, _, err := c.D3DemonHunter(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3Monk(t *testing.T) {
- dat, _, err := c.D3Monk(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3Necromancer(t *testing.T) {
- dat, _, err := c.D3Necromancer(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3Wizard(t *testing.T) {
- dat, _, err := c.D3Wizard(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3WitchDoctor(t *testing.T) {
- dat, _, err := c.D3WitchDoctor(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3BarbarianSkill(t *testing.T) {
- dat, _, err := c.D3BarbarianSkill(context.Background(), "bash")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3CrusaderSkill(t *testing.T) {
- dat, _, err := c.D3CrusaderSkill(context.Background(), "condemn")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3DemonHunterSkill(t *testing.T) {
- dat, _, err := c.D3DemonHunterSkill(context.Background(), "smoke-screen")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3MonkSkill(t *testing.T) {
- dat, _, err := c.D3MonkSkill(context.Background(), "dashing-strike")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3NecromancerSkill(t *testing.T) {
- dat, _, err := c.D3NecromancerSkill(context.Background(), "grim-scythe")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3WizardSkill(t *testing.T) {
- dat, _, err := c.D3WizardSkill(context.Background(), "energy-twister")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3WitchDoctorSkill(t *testing.T) {
- dat, _, err := c.D3WitchDoctorSkill(context.Background(), "gargantuan")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3ItemTypeIndex(t *testing.T) {
- dat, _, err := c.D3ItemTypeIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3ItemType(t *testing.T) {
- dat, _, err := c.D3ItemType(context.Background(), "chestarmorwizard")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3Item(t *testing.T) {
- dat, _, err := c.D3Item(context.Background(), "firebirds-breast", "Unique_Chest_Set_06_x1")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3Profile(t *testing.T) {
- dat, _, err := c.D3Profile(context.Background(), "FuzzyStatic#1384")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3ProfileHero(t *testing.T) {
- dat, _, err := c.D3ProfileHero(context.Background(), "FuzzyStatic#1384", 98663224)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3ProfileHeroItems(t *testing.T) {
- dat, _, err := c.D3ProfileHeroItems(context.Background(), "FuzzyStatic#1384", 98663224)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3ProfileHeroFollowerItems(t *testing.T) {
- dat, _, err := c.D3ProfileHeroFollowerItems(context.Background(), "FuzzyStatic#1384", 98663224)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
diff --git a/v2/d3gd.go b/v2/d3gd.go
deleted file mode 100644
index d0a2d44..0000000
--- a/v2/d3gd.go
+++ /dev/null
@@ -1,422 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
-
- "github.com/FuzzyStatic/blizzard/v2/d3gd"
-)
-
-// D3SeasonIndex returns an index of seasons
-func (c *Client) D3SeasonIndex(ctx context.Context) (*d3gd.SeasonIndex, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/data/d3/season/",
- &d3gd.SeasonIndex{},
- )
- return dat.(*d3gd.SeasonIndex), header, err
-}
-
-// D3Season returns season data
-func (c *Client) D3Season(ctx context.Context, seasonID int) (*d3gd.Season, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d", seasonID),
- &d3gd.Season{},
- )
- return dat.(*d3gd.Season), header, err
-}
-
-// D3SeasonLeaderboard returns leaderboard data for season and leaderboard
-func (c *Client) D3SeasonLeaderboard(ctx context.Context, seasonID int, leaderboard string) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/%s", seasonID, leaderboard),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardAchievementPoints returns achievement points leaderboard data for season
-func (c *Client) D3SeasonLeaderboardAchievementPoints(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/achievement-points", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardHardcoreBarbarian returns hardcore barbarian leaderboard data for season
-func (c *Client) D3SeasonLeaderboardHardcoreBarbarian(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-hardcore-barbarian", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardBarbarian returns barbarian leaderboard data for season
-func (c *Client) D3SeasonLeaderboardBarbarian(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-barbarian", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardHardcoreCrusader returns hardcore crusader leaderboard data for season
-func (c *Client) D3SeasonLeaderboardHardcoreCrusader(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-hardcore-crusader", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardCrusader returns crusader leaderboard data for season
-func (c *Client) D3SeasonLeaderboardCrusader(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-crusader", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardHardcoreDemonHunter returns hardcore demon hunter leaderboard data for season
-func (c *Client) D3SeasonLeaderboardHardcoreDemonHunter(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-hardcore-dh", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardDemonHunter returns barbarian leaderboard data for season
-func (c *Client) D3SeasonLeaderboardDemonHunter(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-dh", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardHardcoreMonk returns hardcore monk leaderboard data for season
-func (c *Client) D3SeasonLeaderboardHardcoreMonk(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-hardcore-monk", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardMonk returns monk leaderboard data for season
-func (c *Client) D3SeasonLeaderboardMonk(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-monk", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardHardcoreNecromancer returns hardcore necromancer leaderboard data for season
-func (c *Client) D3SeasonLeaderboardHardcoreNecromancer(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-hardcore-necromancer", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardNecromancer returns necromancer leaderboard data for season
-func (c *Client) D3SeasonLeaderboardNecromancer(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-necromancer", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardHardcoreWizard returns hardcore wizard leaderboard data for season
-func (c *Client) D3SeasonLeaderboardHardcoreWizard(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-hardcore-wizard", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardWizard returns wizard leaderboard data for season
-func (c *Client) D3SeasonLeaderboardWizard(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-wizard", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardHardcoreWitchDoctor returns hardcore witch doctor leaderboard data for season
-func (c *Client) D3SeasonLeaderboardHardcoreWitchDoctor(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-hardcore-wd", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardWitchDoctor returns witch doctor leaderboard data for season
-func (c *Client) D3SeasonLeaderboardWitchDoctor(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-wd", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardHardcoreTeam2 returns hardcore 2 team leaderboard data for season
-func (c *Client) D3SeasonLeaderboardHardcoreTeam2(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-hardcore-team-2", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardTeam2 returns 2 team leaderboard data for season
-func (c *Client) D3SeasonLeaderboardTeam2(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-team-2", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardHardcoreTeam3 returns hardcore 2 team leaderboard data for season
-func (c *Client) D3SeasonLeaderboardHardcoreTeam3(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-hardcore-team-3", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardTeam3 returns 3 team leaderboard data for season
-func (c *Client) D3SeasonLeaderboardTeam3(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-team-3", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardHardcoreTeam4 returns hardcore 4 team leaderboard data for season
-func (c *Client) D3SeasonLeaderboardHardcoreTeam4(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-hardcore-team-4", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3SeasonLeaderboardTeam4 returns 4 team leaderboard data for season
-func (c *Client) D3SeasonLeaderboardTeam4(ctx context.Context, seasonID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/season/%d/leaderboard/rift-team-4", seasonID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraIndex returns an index of seasons
-func (c *Client) D3EraIndex(ctx context.Context) (*d3gd.EraIndex, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/data/d3/era/",
- &d3gd.EraIndex{},
- )
- return dat.(*d3gd.EraIndex), header, err
-}
-
-// D3Era returns season data
-func (c *Client) D3Era(ctx context.Context, eraID int) (*d3gd.Era, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d", eraID),
- &d3gd.Era{},
- )
- return dat.(*d3gd.Era), header, err
-}
-
-// D3EraLeaderboardHardcoreBarbarian returns hardcore barbarian leaderboard data for season
-func (c *Client) D3EraLeaderboardHardcoreBarbarian(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-hardcore-barbarian", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardBarbarian returns barbarian leaderboard data for season
-func (c *Client) D3EraLeaderboardBarbarian(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-barbarian", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardHardcoreCrusader returns hardcore crusader leaderboard data for season
-func (c *Client) D3EraLeaderboardHardcoreCrusader(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-hardcore-crusader", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardCrusader returns crusader leaderboard data for season
-func (c *Client) D3EraLeaderboardCrusader(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-crusader", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardHardcoreDemonHunter returns hardcore demon hunter leaderboard data for season
-func (c *Client) D3EraLeaderboardHardcoreDemonHunter(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-hardcore-dh", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardDemonHunter returns barbarian leaderboard data for season
-func (c *Client) D3EraLeaderboardDemonHunter(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-dh", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardHardcoreMonk returns hardcore monk leaderboard data for season
-func (c *Client) D3EraLeaderboardHardcoreMonk(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-hardcore-monk", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardMonk returns monk leaderboard data for season
-func (c *Client) D3EraLeaderboardMonk(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-monk", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardHardcoreNecromancer returns hardcore necromancer leaderboard data for season
-func (c *Client) D3EraLeaderboardHardcoreNecromancer(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-hardcore-necromancer", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardNecromancer returns necromancer leaderboard data for season
-func (c *Client) D3EraLeaderboardNecromancer(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-necromancer", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardHardcoreWizard returns hardcore wizard leaderboard data for season
-func (c *Client) D3EraLeaderboardHardcoreWizard(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-hardcore-wizard", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardWizard returns wizard leaderboard data for season
-func (c *Client) D3EraLeaderboardWizard(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-wizard", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardHardcoreWitchDoctor returns hardcore witch doctor leaderboard data for season
-func (c *Client) D3EraLeaderboardHardcoreWitchDoctor(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-hardcore-wd", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardWitchDoctor returns witch doctor leaderboard data for season
-func (c *Client) D3EraLeaderboardWitchDoctor(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-wd", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardHardcoreTeam2 returns hardcore 2 team leaderboard data for season
-func (c *Client) D3EraLeaderboardHardcoreTeam2(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-hardcore-team-2", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardTeam2 returns 2 team leaderboard data for season
-func (c *Client) D3EraLeaderboardTeam2(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-team-2", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardHardcoreTeam3 returns hardcore 2 team leaderboard data for season
-func (c *Client) D3EraLeaderboardHardcoreTeam3(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-hardcore-team-3", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardTeam3 returns 3 team leaderboard data for season
-func (c *Client) D3EraLeaderboardTeam3(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-team-3", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardHardcoreTeam4 returns hardcore 4 team leaderboard data for season
-func (c *Client) D3EraLeaderboardHardcoreTeam4(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-hardcore-team-4", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
-
-// D3EraLeaderboardTeam4 returns 4 team leaderboard data for season
-func (c *Client) D3EraLeaderboardTeam4(ctx context.Context, eraID int) (*d3gd.Leaderboard, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/d3/era/%d/leaderboard/rift-team-4", eraID),
- &d3gd.Leaderboard{},
- )
- return dat.(*d3gd.Leaderboard), header, err
-}
diff --git a/v2/d3gd/d3.go b/v2/d3gd/d3.go
deleted file mode 100644
index 75eb2d7..0000000
--- a/v2/d3gd/d3.go
+++ /dev/null
@@ -1,150 +0,0 @@
-package d3gd
-
-// SeasonIndex structure
-type SeasonIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Season []struct {
- Href string `json:"href"`
- } `json:"season"`
- CurrentSeason int `json:"current_season"`
- ServiceCurrentSeason int `json:"service_current_season"`
- ServiceSeasonState string `json:"service_season_state"`
- LastUpdateTime string `json:"last_update_time"`
- GeneratedBy string `json:"generated_by"`
-}
-
-// Season structure
-type Season struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Leaderboard []struct {
- Ladder struct {
- Href string `json:"href"`
- } `json:"ladder"`
- TeamSize int `json:"team_size,omitempty"`
- Hardcore bool `json:"hardcore,omitempty"`
- HeroClassString string `json:"hero_class_string,omitempty"`
- } `json:"leaderboard"`
- SeasonID int `json:"season_id"`
- LastUpdateTime string `json:"last_update_time"`
- GeneratedBy string `json:"generated_by"`
-}
-
-// Leaderboard structure
-type Leaderboard struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Row []struct {
- Player []struct {
- Key string `json:"key"`
- AccountID int `json:"accountId"`
- Data []struct {
- ID string `json:"id"`
- String string `json:"string,omitempty"`
- Number int `json:"number,omitempty"`
- } `json:"data"`
- } `json:"player"`
- Order int `json:"order"`
- Data []struct {
- ID string `json:"id"`
- Number int `json:"number,omitempty"`
- Timestamp int64 `json:"timestamp,omitempty"`
- String string `json:"string,omitempty"`
- } `json:"data"`
- } `json:"row"`
- Key string `json:"key"`
- Title string `json:"title"`
- Column []struct {
- ID string `json:"id"`
- Hidden bool `json:"hidden"`
- Order int `json:"order,omitempty"`
- Label string `json:"label"`
- Type string `json:"type"`
- } `json:"column"`
- LastUpdateTime string `json:"last_update_time"`
- GeneratedBy string `json:"generated_by"`
- AchievementPoints bool `json:"achievement_points"`
- Season int `json:"season"`
-}
-
-// Title structure
-type Title struct {
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- DeDE string `json:"de_DE"`
- EnGB string `json:"en_GB"`
- EsES string `json:"es_ES"`
- FrFR string `json:"fr_FR"`
- ItIT string `json:"it_IT"`
- PlPL string `json:"pl_PL"`
- PtPT string `json:"pt_PT"`
- RuRU string `json:"ru_RU"`
- KoKR string `json:"ko_KR"`
- ZhTW string `json:"zh_TW"`
- ZhCN string `json:"zh_CN"`
-}
-
-// Label structure
-type Label struct {
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- DeDE string `json:"de_DE"`
- EnGB string `json:"en_GB"`
- EsES string `json:"es_ES"`
- FrFR string `json:"fr_FR"`
- ItIT string `json:"it_IT"`
- PlPL string `json:"pl_PL"`
- PtPT string `json:"pt_PT"`
- RuRU string `json:"ru_RU"`
- KoKR string `json:"ko_KR"`
- ZhTW string `json:"zh_TW"`
- ZhCN string `json:"zh_CN"`
-}
-
-// EraIndex structure
-type EraIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Era []struct {
- Href string `json:"href"`
- } `json:"era"`
- CurrentEra int `json:"current_era"`
- LastUpdateTime string `json:"last_update_time"`
- GeneratedBy string `json:"generated_by"`
-}
-
-// Era structure
-type Era struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Leaderboard []struct {
- TeamSize int `json:"team_size"`
- Ladder struct {
- Href string `json:"href"`
- } `json:"ladder"`
- Hardcore bool `json:"hardcore,omitempty"`
- HeroClassString string `json:"hero_class_string,omitempty"`
- } `json:"leaderboard"`
- EraID int `json:"era_id"`
- EraStartDate int `json:"era_start_date"`
- LastUpdateTime string `json:"last_update_time"`
- GeneratedBy string `json:"generated_by"`
-}
diff --git a/v2/d3gd/d3gd.go b/v2/d3gd/d3gd.go
deleted file mode 100644
index c431c9e..0000000
--- a/v2/d3gd/d3gd.go
+++ /dev/null
@@ -1,2 +0,0 @@
-// Package d3gd contains types for the Diablo 3 Game Data APIs
-package d3gd
diff --git a/v2/d3gd_test.go b/v2/d3gd_test.go
deleted file mode 100644
index 5b17573..0000000
--- a/v2/d3gd_test.go
+++ /dev/null
@@ -1,553 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
- "testing"
-)
-
-func TestD3SeasonIndex(t *testing.T) {
- dat, _, err := c.D3SeasonIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3Season(t *testing.T) {
- dat, _, err := c.D3Season(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboard(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboard(context.Background(), 15, "74987248527082")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardAchievementPoints(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardAchievementPoints(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardHardcoreBarbarian(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardHardcoreBarbarian(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardBarbarian(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardBarbarian(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardHardcoreCrusader(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardHardcoreCrusader(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardCrusader(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardCrusader(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardHardcoreDemonHunter(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardHardcoreDemonHunter(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardDemonHunter(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardDemonHunter(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardHardcoreMonk(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardHardcoreMonk(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardMonk(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardMonk(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardHardcoreNecromancer(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardHardcoreNecromancer(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardNecromancer(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardNecromancer(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardHardcoreWizard(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardHardcoreWizard(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardWizard(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardWizard(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-func TestD3SeasonLeaderboardHardcoreWitchDoctor(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardHardcoreWitchDoctor(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardWitchDoctor(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardWitchDoctor(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardHardcoreTeam2(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardHardcoreTeam2(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardTeam2(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardTeam2(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-func TestD3SeasonLeaderboardHardcoreTeam3(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardHardcoreTeam3(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardTeam3(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardTeam3(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-func TestD3SeasonLeaderboardHardcoreTeam4(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardHardcoreTeam4(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3SeasonLeaderboardTeam4(t *testing.T) {
- dat, _, err := c.D3SeasonLeaderboardTeam4(context.Background(), 15)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraIndex(t *testing.T) {
- dat, _, err := c.D3EraIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3Era(t *testing.T) {
- dat, _, err := c.D3Era(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardHardcoreBarbarian(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardHardcoreBarbarian(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardBarbarian(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardBarbarian(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardHardcoreCrusader(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardHardcoreCrusader(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardCrusader(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardCrusader(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardHardcoreDemonHunter(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardHardcoreDemonHunter(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardDemonHunter(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardDemonHunter(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardHardcoreMonk(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardHardcoreMonk(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardMonk(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardMonk(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardHardcoreNecromancer(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardHardcoreNecromancer(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardNecromancer(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardNecromancer(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardHardcoreWizard(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardHardcoreWizard(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardWizard(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardWizard(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-func TestD3EraLeaderboardHardcoreWitchDoctor(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardHardcoreWitchDoctor(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardWitchDoctor(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardWitchDoctor(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardHardcoreTeam2(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardHardcoreTeam2(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardTeam2(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardTeam2(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-func TestD3EraLeaderboardHardcoreTeam3(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardHardcoreTeam3(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardTeam3(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardTeam3(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-func TestD3EraLeaderboardHardcoreTeam4(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardHardcoreTeam4(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestD3EraLeaderboardTeam4(t *testing.T) {
- dat, _, err := c.D3EraLeaderboardTeam4(context.Background(), 10)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
diff --git a/v2/examples/authCodeFlow/main.go b/v2/examples/authCodeFlow/main.go
deleted file mode 100644
index d17746d..0000000
--- a/v2/examples/authCodeFlow/main.go
+++ /dev/null
@@ -1,110 +0,0 @@
-package main
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "log"
- "net/http"
- "os"
-
- "github.com/FuzzyStatic/blizzard/v2"
- "github.com/FuzzyStatic/blizzard/v2/oauth"
- "golang.org/x/oauth2"
-)
-
-var (
- clientID string
- clientSecret string
- myDomain string
- cfg oauth2.Config
- blizz *blizzard.Client
-)
-
-func homepage(w http.ResponseWriter, r *http.Request) {
- fmt.Println("Homepage Hit!")
- http.Redirect(w, r, cfg.AuthCodeURL("my_random_state"), http.StatusFound)
-}
-
-func authorize(w http.ResponseWriter, r *http.Request) {
- err := r.ParseForm()
- if err != nil {
- http.Error(w, err.Error(), http.StatusInternalServerError)
- return
- }
-
- state := r.Form.Get("state")
- if state != "my_random_state" {
- http.Error(w, "State invalid", http.StatusBadRequest)
- return
- }
-
- code := r.Form.Get("code")
- if code == "" {
- http.Error(w, "Code not found", http.StatusBadRequest)
- return
- }
-
- token, err := cfg.Exchange(context.Background(), code)
- if err != nil {
- http.Error(w, err.Error(), http.StatusInternalServerError)
- return
- }
-
- e := json.NewEncoder(w)
- e.SetIndent("", " ")
- err = e.Encode(*token)
- if err != nil {
- http.Error(w, err.Error(), http.StatusInternalServerError)
- return
- }
-
- validation, _, err := blizz.TokenValidation(context.Background(), token)
- if err != nil {
- http.Error(w, err.Error(), http.StatusInternalServerError)
- }
-
- fmt.Printf("%+v\n", validation)
-
- userInfo, _, err := blizz.UserInfoHeader(token)
- if err != nil {
- http.Error(w, err.Error(), http.StatusInternalServerError)
- }
-
- fmt.Printf("%+v\n", userInfo)
-}
-
-func init() {
- clientID = os.Getenv("CLIENT_ID")
- if clientID == "" {
- log.Fatal("Set the environment variable CLIENT_ID before retrying.")
- }
-
- clientSecret = os.Getenv("CLIENT_SECRET")
- if clientSecret == "" {
- log.Fatal("Set the environment variable CLIENT_SECRET before retrying.")
- }
-
- myDomain = os.Getenv("MY_DOMAIN")
- if myDomain == "" {
- log.Fatal("Set the environment variable MY_DOMAIN before retrying.")
- }
-}
-
-func main() {
- blizz = blizzard.NewClient(
- clientID,
- clientSecret,
- blizzard.US,
- blizzard.EnUS,
- )
-
- cfg = blizz.AuthorizeConfig(fmt.Sprintf("http://%s:9094/oauth2", myDomain), oauth.ProfileD3, oauth.ProfileSC2, oauth.ProfileWoW)
-
- http.HandleFunc("/", homepage)
- http.HandleFunc("/oauth2", authorize)
-
- // We start up our Client on port 9094
- log.Println("Client is running at 9094 port.")
- log.Fatal(http.ListenAndServe(":9094", nil))
-}
diff --git a/v2/examples/search/main.go b/v2/examples/search/main.go
deleted file mode 100644
index 056f504..0000000
--- a/v2/examples/search/main.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package main
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "log"
- "os"
-
- "github.com/FuzzyStatic/blizzard/v2"
- "github.com/FuzzyStatic/blizzard/v2/wowsearch"
-)
-
-var (
- bnetID string
- bnetSECRET string
-)
-
-func init() {
- log.SetFlags(log.LstdFlags | log.Lshortfile)
- bnetID = os.Getenv("BNET_ID")
- bnetSECRET = os.Getenv("BNET_SECRET")
- if bnetID == "" || bnetSECRET == "" {
- log.Fatal("missing BNET_ID or BNET_SECRET")
- }
-}
-func main() {
- blizz := blizzard.NewClient(bnetID, bnetSECRET, blizzard.EU, blizzard.EnUS)
-
- realmSearch, _, err := blizz.ClassicRealmSearch(
- context.TODO(),
- wowsearch.Page(1),
- wowsearch.PageSize(5),
- wowsearch.OrderBy("name.EN_US:asc"),
- wowsearch.Field().
- AND("timezone", "Europe/Paris").
- AND("data.locale", "enGB").
- NOT("type.type", "PVP").
- NOT("id", "4756||4757").
- OR("type.type", "NORMAL", "RP"),
- )
- if err != nil {
- panic(err)
- }
-
- out, err := json.MarshalIndent(realmSearch, "", " ")
- if err != nil {
- panic(err)
- }
-
- fmt.Println(string(out[:]))
-}
diff --git a/v2/examples/simpleClient/main.go b/v2/examples/simpleClient/main.go
deleted file mode 100644
index a0d0bc3..0000000
--- a/v2/examples/simpleClient/main.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package main
-
-import (
- "context"
- "fmt"
- "log"
- "os"
-
- "github.com/FuzzyStatic/blizzard/v2"
-)
-
-var (
- clientID string
- clientSecret string
- blizz *blizzard.Client
-)
-
-func init() {
- clientID = os.Getenv("CLIENT_ID")
- if clientID == "" {
- log.Fatal("Set the environment variable CLIENT_ID before retrying.")
- }
-
- clientSecret = os.Getenv("CLIENT_SECRET")
- if clientSecret == "" {
- log.Fatal("Set the environment variable CLIENT_SECRET before retrying.")
- }
-}
-
-func main() {
- blizz = blizzard.NewClient(
- clientID,
- clientSecret,
- blizzard.US,
- blizzard.EnUS,
- )
-
- err := blizz.AccessTokenRequest(context.Background())
- if err != nil {
- fmt.Println(err)
- }
-}
diff --git a/v2/header.go b/v2/header.go
deleted file mode 100644
index d69d9a8..0000000
--- a/v2/header.go
+++ /dev/null
@@ -1,80 +0,0 @@
-package blizzard
-
-import (
- "net/http"
- "time"
-)
-
-const (
- headerTimeFormat = "Mon, _2 Jan 2006 15:04:05 MST"
-)
-
-// Header Keys
-const (
- HeaderKeyBattlenetNamespace = "Battlenet-Namespace"
- HeaderKeyBattlenetSchema = "Battlenet-Schema"
- HeaderKeyBattleSchemaRevision = "Battlenet-Schema-Revision"
- HeaderKeyCacheControl = "Cache-Control"
- HeaderKeyConnection = "Connection"
- HeaderKeyContentType = "Content-Type"
- HeaderKeyDate = "Date"
- HeaderKeyLastModified = "Last-Modified"
- HeaderKeyServer = "Server"
- HeaderKeyVary = "Vary"
- HeaderKeyXContentTypeOptions = "X-Content-Type-Options"
- HeaderKeyXFrameOptions = "X-Frame-Options"
- HeaderKeyXTraceParentSpanID = "X-Trace-Parentspanid"
- HeaderKeyXTraceSpanID = "X-Trace-Spanid"
- HeaderKeyXTraceTraceID = "X-Trace-Traceid"
-)
-
-// Header structure
-type Header struct {
- BattlenetNamespace string `json:"Battlenet-Namespace"`
- BattlenetSchema string `json:"Battlenet-Schema"`
- BattlenetSchemaRevision string `json:"Battlenet-Schema-Revision"`
- CacheControl string `json:"Cache-Control"`
- Connection string `json:"Connection"`
- ContentType string `json:"Content-Type"`
- Date time.Time `json:"Date"`
- LastModified time.Time `json:"Last-Modified"`
- Server string `json:"Server"`
- Vary string `json:"Vary"`
- XContentTypeOptions string `json:"X-Content-Type-Options"`
- XFrameOptions string `json:"X-Frame-Options"`
- XTraceSpanID string `json:"X-Trace-Spanid"`
- XTraceParentSpanID string `json:"X-Trace-Parentspanid"`
- XTraceTraceID string `json:"X-Trace-Traceid"`
-}
-
-func getHeader(httpHeader http.Header) (*Header, error) {
- var err error
- header := Header{
- BattlenetNamespace: httpHeader.Get(HeaderKeyBattlenetNamespace),
- BattlenetSchema: httpHeader.Get(HeaderKeyBattlenetSchema),
- BattlenetSchemaRevision: httpHeader.Get(HeaderKeyBattleSchemaRevision),
- CacheControl: httpHeader.Get(HeaderKeyCacheControl),
- Connection: httpHeader.Get(HeaderKeyConnection),
- ContentType: httpHeader.Get(HeaderKeyContentType),
- Server: httpHeader.Get(HeaderKeyServer),
- Vary: httpHeader.Get(HeaderKeyVary),
- XContentTypeOptions: httpHeader.Get(HeaderKeyXContentTypeOptions),
- XFrameOptions: httpHeader.Get(HeaderKeyXFrameOptions),
- XTraceSpanID: httpHeader.Get(HeaderKeyXTraceParentSpanID),
- XTraceParentSpanID: httpHeader.Get(HeaderKeyXTraceSpanID),
- XTraceTraceID: httpHeader.Get(HeaderKeyXTraceTraceID),
- }
- if httpHeader.Get(HeaderKeyDate) != "" {
- header.Date, err = time.Parse(headerTimeFormat, httpHeader.Get(HeaderKeyDate))
- if err != nil {
- header.Date = time.Time{}
- }
- }
- if httpHeader.Get(HeaderKeyLastModified) != "" {
- header.LastModified, err = time.Parse(headerTimeFormat, httpHeader.Get(HeaderKeyLastModified))
- if err != nil {
- header.LastModified = time.Time{}
- }
- }
- return &header, nil
-}
diff --git a/v2/hsgd.go b/v2/hsgd.go
deleted file mode 100644
index 1df9f14..0000000
--- a/v2/hsgd.go
+++ /dev/null
@@ -1,278 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
- "strings"
-
- "github.com/FuzzyStatic/blizzard/v2/hsgd"
-)
-
-// HSCardsSearch returns an up-to-date list of all cards matching the search criteria.
-// For more information about the search parameters, see the Card Search Guide (https://develop.battle.net/documentation/hearthstone/guides/card-search).
-func (c *Client) HSCardsSearch(ctx context.Context) (*hsgd.CardSearch, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/hearthstone/cards",
- &hsgd.CardSearch{},
- )
- return dat.(*hsgd.CardSearch), header, err
-}
-
-// HSDetailedCardsSearch returns an up-to-date list of all cards matching the search criteria.
-// Input values left blank, 0, or nil will return all values for the type.
-// For more information about the search parameters, see the Card Search Guide (https://develop.battle.net/documentation/hearthstone/guides/card-search).
-func (c *Client) HSDetailedCardsSearch(ctx context.Context, setSlug, classSlug, raritySlug, typeSlug, minionTypeSlug, keywordSlug, textFilter string,
- manaCost, attack, health []int, page, pageSize int,
- collectiblility hsgd.Collectibility, sort hsgd.Sort, order hsgd.Order) (*hsgd.CardSearch, *Header, error) {
- pathAndQuery := "/hearthstone/cards" +
- fmt.Sprintf("?collectible=%s", collectiblility) +
- fmt.Sprintf("&sort=%s", sort) +
- fmt.Sprintf("&order=%s", order)
- if setSlug != "" {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&set=%s", setSlug)
- }
- if classSlug != "" {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&class=%s", classSlug)
- }
- if raritySlug != "" {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&rarity=%s", raritySlug)
- }
- if typeSlug != "" {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&type=%s", typeSlug)
- }
- if minionTypeSlug != "" {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&minionType=%s", minionTypeSlug)
- }
- if keywordSlug != "" {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&keyword=%s", keywordSlug)
- }
- if textFilter != "" {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&textFilter=%s", textFilter)
- }
- if manaCost != nil {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&manaCost=%s", strings.Trim(strings.Join(strings.Fields(fmt.Sprint(manaCost)), ","), "[]"))
- }
- if attack != nil {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&attack=%s", strings.Trim(strings.Join(strings.Fields(fmt.Sprint(attack)), ","), "[]"))
- }
- if health != nil {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&health=%s", strings.Trim(strings.Join(strings.Fields(fmt.Sprint(health)), ","), "[]"))
- }
- if page != 0 {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&page=%d", page)
- }
- if pageSize != 0 {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&pageSize=%d", pageSize)
- }
-
- dat, header, err := c.getStructDataNoNamespace(ctx,
- pathAndQuery,
- &hsgd.CardSearch{},
- )
- return dat.(*hsgd.CardSearch), header, err
-}
-
-// HSBattlegroundsCardsSearch returns an up-to-date list of all cards matching the search criteria for the specified game mode.
-// Input values left blank, 0, or nil will return all values for the type.
-// For more information about the search parameters, see the Card Search Guide (https://develop.battle.net/documentation/hearthstone/guides/card-search).
-func (c *Client) HSBattlegroundsCardsSearch(ctx context.Context, raritySlug, typeSlug, minionTypeSlug, keywordSlug, textFilter string,
- manaCost, attack, health []int, page, pageSize int,
- tier []hsgd.Tier, collectiblility hsgd.Collectibility, sort hsgd.Sort, order hsgd.Order) (*hsgd.CardSearch, *Header, error) {
- pathAndQuery := fmt.Sprintf("/hearthstone/cards?gameMode=%s", hsgd.GameModeBattlegrounds) +
- fmt.Sprintf("&collectible=%s", collectiblility) +
- fmt.Sprintf("&sort=%s", sort) +
- fmt.Sprintf("&order=%s", order)
- if raritySlug != "" {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&rarity=%s", raritySlug)
- }
- if typeSlug != "" {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&type=%s", typeSlug)
- }
- if minionTypeSlug != "" {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&minionType=%s", minionTypeSlug)
- }
- if keywordSlug != "" {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&keyword=%s", keywordSlug)
- }
- if textFilter != "" {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&textFilter=%s", textFilter)
- }
- if manaCost != nil {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&manaCost=%s", strings.Trim(strings.Join(strings.Fields(fmt.Sprint(manaCost)), ","), "[]"))
- }
- if attack != nil {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&attack=%s", strings.Trim(strings.Join(strings.Fields(fmt.Sprint(attack)), ","), "[]"))
- }
- if health != nil {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&health=%s", strings.Trim(strings.Join(strings.Fields(fmt.Sprint(health)), ","), "[]"))
- }
- if page != 0 {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&page=%d", page)
- }
- if pageSize != 0 {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&pageSize=%d", pageSize)
- }
- if health != nil {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&tier=%s", strings.Trim(strings.Join(strings.Fields(fmt.Sprint(tier)), ","), "[]"))
- }
-
- dat, header, err := c.getStructDataNoNamespace(ctx,
- pathAndQuery,
- &hsgd.CardSearch{},
- )
- return dat.(*hsgd.CardSearch), header, err
-}
-
-// HSCardByIDOrSlug returns card by ID or slug.
-// For more information about the search parameters, see the Card Search Guide (https://develop.battle.net/documentation/hearthstone/guides/card-search).
-func (c *Client) HSCardByIDOrSlug(ctx context.Context, idOrSlug string, gameMode hsgd.GameMode) (*hsgd.Card, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/hearthstone/cards/%s?gameMode=%s", idOrSlug, gameMode),
- &hsgd.Card{},
- )
- return dat.(*hsgd.Card), header, err
-}
-
-// HSCardBackSearchAllLocales returns an up-to-date list of all card backs matching the search criteria for all locales.
-// Input values left blank, 0, or nil will return all values for the type.
-// For more information about the search parameters, see the Card Search Guide (https://develop.battle.net/documentation/hearthstone/guides/card-search).
-func (c *Client) HSCardBackSearchAllLocales(ctx context.Context, cardBackCategory hsgd.CardBackCategory, textFilter string,
- sort hsgd.Sort, order hsgd.Order) (*hsgd.CardBackSearchAllLocales, *Header, error) {
- pathAndQuery := "/hearthstone/cardbacks" +
- fmt.Sprintf("?sort=%s", sort) +
- fmt.Sprintf("&order=%s", order)
- if cardBackCategory != "" {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&cardBackCategory=%s", cardBackCategory)
- }
- if textFilter != "" {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&type=%s", textFilter)
- }
-
- dat, header, err := c.getStructDataNoNamespaceNoLocale(ctx,
- pathAndQuery,
- &hsgd.CardBackSearchAllLocales{},
- )
- return dat.(*hsgd.CardBackSearchAllLocales), header, err
-}
-
-// HSCardBackSearch returns an up-to-date list of all card backs matching the search criteria.
-// Input values left blank, 0, or nil will return all values for the type.
-// For more information about the search parameters, see the Card Search Guide (https://develop.battle.net/documentation/hearthstone/guides/card-search).
-func (c *Client) HSCardBackSearch(ctx context.Context, cardBackCategory hsgd.CardBackCategory, textFilter string,
- sort hsgd.Sort, order hsgd.Order) (*hsgd.CardBackSearch, *Header, error) {
- pathAndQuery := "/hearthstone/cardbacks" +
- fmt.Sprintf("?sort=%s", sort) +
- fmt.Sprintf("&order=%s", order)
- if cardBackCategory != "" {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&cardBackCategory=%s", cardBackCategory)
- }
- if textFilter != "" {
- pathAndQuery = pathAndQuery + fmt.Sprintf("&type=%s", textFilter)
- }
-
- dat, header, err := c.getStructDataNoNamespace(ctx,
- pathAndQuery,
- &hsgd.CardBackSearch{},
- )
- return dat.(*hsgd.CardBackSearch), header, err
-}
-
-// HSCardBackByIDOrSlug returns a specific card back by using card back ID or slug.
-func (c *Client) HSCardBackByIDOrSlug(ctx context.Context, idOrSlug string) (*hsgd.CardBack, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/hearthstone/cardbacks/%s", idOrSlug),
- &hsgd.CardBack{},
- )
- return dat.(*hsgd.CardBack), header, err
-}
-
-// HSDeck Finds a deck by its deck code.
-// For more information, see the Hearthstone Guide.
-func (c *Client) HSDeck(ctx context.Context, deckCode string) (*hsgd.Deck, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/hearthstone/deck/%s", deckCode),
- &hsgd.Deck{},
- )
- return dat.(*hsgd.Deck), header, err
-}
-
-// HSMetadata returns information about the categorization of cards.
-// Metadata includes the card set, set group (for example, Standard or Year of the Dragon), rarity, class, card type, minion type, and keywords.
-// For more information, see the Hearthstone Guide.
-func (c *Client) HSMetadata(ctx context.Context) (*hsgd.Metadata, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- "/hearthstone/metadata",
- &hsgd.Metadata{},
- )
- return dat.(*hsgd.Metadata), header, err
-}
-
-// HSMetadataSets returns information about set metadata.
-// For more information, see the Hearthstone Guide.
-func (c *Client) HSMetadataSets(ctx context.Context) (*[]hsgd.Set, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/hearthstone/metadata/%s", hsgd.MetadataTypeSets),
- &[]hsgd.Set{},
- )
- return dat.(*[]hsgd.Set), header, err
-}
-
-// HSMetadataSetGroups returns information about set group metadata.
-// For more information, see the Hearthstone Guide.
-func (c *Client) HSMetadataSetGroups(ctx context.Context) (*[]hsgd.SetGroup, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/hearthstone/metadata/%s", hsgd.MetadataTypeSetGroups),
- &[]hsgd.SetGroup{},
- )
- return dat.(*[]hsgd.SetGroup), header, err
-}
-
-// HSMetadataTypes returns information about type metadata.
-// For more information, see the Hearthstone Guide.
-func (c *Client) HSMetadataTypes(ctx context.Context) (*[]hsgd.Type, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/hearthstone/metadata/%s", hsgd.MetadataTypeTypes),
- &[]hsgd.Type{},
- )
- return dat.(*[]hsgd.Type), header, err
-}
-
-// HSMetadataRarities returns information about rarity metadata.
-// For more information, see the Hearthstone Guide.
-func (c *Client) HSMetadataRarities(ctx context.Context) (*[]hsgd.Rarity, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/hearthstone/metadata/%s", hsgd.MetadataTypeRarities),
- &[]hsgd.Rarity{},
- )
- return dat.(*[]hsgd.Rarity), header, err
-}
-
-// HSMetadataClasses returns information about class metadata.
-// For more information, see the Hearthstone Guide.
-func (c *Client) HSMetadataClasses(ctx context.Context) (*[]hsgd.Class, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/hearthstone/metadata/%s", hsgd.MetadataTypeClasses),
- &[]hsgd.Class{},
- )
- return dat.(*[]hsgd.Class), header, err
-}
-
-// HSMetadataMinionTypes returns information about minion type metadata.
-// For more information, see the Hearthstone Guide.
-func (c *Client) HSMetadataMinionTypes(ctx context.Context) (*[]hsgd.MinionType, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/hearthstone/metadata/%s", hsgd.MetadataTypeMinionTypes),
- &[]hsgd.MinionType{},
- )
- return dat.(*[]hsgd.MinionType), header, err
-}
-
-// HSMetadataKeywords returns information about keyword metadata.
-// For more information, see the Hearthstone Guide.
-func (c *Client) HSMetadataKeywords(ctx context.Context) (*[]hsgd.Keyword, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/hearthstone/metadata/%s", hsgd.MetadataTypeKeywords),
- &[]hsgd.Keyword{},
- )
- return dat.(*[]hsgd.Keyword), header, err
-}
diff --git a/v2/hsgd/cardBacks.go b/v2/hsgd/cardBacks.go
deleted file mode 100644
index 021ff90..0000000
--- a/v2/hsgd/cardBacks.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package hsgd
-
-// CardBackSearchAllLocales structure
-type CardBackSearchAllLocales struct {
- CardBacks []struct {
- ID int `json:"id"`
- SortCategory int `json:"sortCategory"`
- Text struct {
- DeDE string `json:"de_DE"`
- EnUS string `json:"en_US"`
- EsES string `json:"es_ES"`
- EsMX string `json:"es_MX"`
- FrFR string `json:"fr_FR"`
- ItIT string `json:"it_IT"`
- JaJP string `json:"ja_JP"`
- KoKR string `json:"ko_KR"`
- PlPL string `json:"pl_PL"`
- PtBR string `json:"pt_BR"`
- RuRU string `json:"ru_RU"`
- ThTH string `json:"th_TH"`
- ZhCN string `json:"zh_CN"`
- ZhTW string `json:"zh_TW"`
- } `json:"text"`
- Name struct {
- DeDE string `json:"de_DE"`
- EnUS string `json:"en_US"`
- EsES string `json:"es_ES"`
- EsMX string `json:"es_MX"`
- FrFR string `json:"fr_FR"`
- ItIT string `json:"it_IT"`
- JaJP string `json:"ja_JP"`
- KoKR string `json:"ko_KR"`
- PlPL string `json:"pl_PL"`
- PtBR string `json:"pt_BR"`
- RuRU string `json:"ru_RU"`
- ThTH string `json:"th_TH"`
- ZhCN string `json:"zh_CN"`
- ZhTW string `json:"zh_TW"`
- } `json:"name"`
- Image string `json:"image"`
- Slug string `json:"slug"`
- } `json:"cardBacks"`
- CardCount int `json:"cardCount"`
- PageCount int `json:"pageCount"`
- Page int `json:"page"`
-}
-
-// CardBackSearch structure
-type CardBackSearch struct {
- CardBacks []CardBack `json:"cardBacks"`
- CardCount int `json:"cardCount"`
- PageCount int `json:"pageCount"`
- Page int `json:"page"`
-}
-
-// CardBack structure
-type CardBack struct {
- ID int `json:"id"`
- SortCategory int `json:"sortCategory"`
- Text string `json:"text"`
- Name string `json:"name"`
- Image string `json:"image"`
- Slug string `json:"slug"`
-}
diff --git a/v2/hsgd/cardSearch.go b/v2/hsgd/cardSearch.go
deleted file mode 100644
index 49d6f9c..0000000
--- a/v2/hsgd/cardSearch.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package hsgd
-
-// Card structure
-type Card struct {
- ID int `json:"id"`
- Collectible int `json:"collectible"`
- Slug string `json:"slug"`
- ClassID int `json:"classId"`
- MultiClassIds []int `json:"multiClassIds"`
- CardTypeID int `json:"cardTypeId"`
- CardSetID int `json:"cardSetId"`
- RarityID int `json:"rarityId"`
- ArtistName string `json:"artistName"`
- Health int `json:"health"`
- Attack int `json:"attack"`
- ManaCost int `json:"manaCost"`
- Name string `json:"name"`
- Text string `json:"text"`
- Image string `json:"image"`
- ImageGold string `json:"imageGold"`
- FlavorText string `json:"flavorText"`
- CropImage string `json:"cropImage"`
- ChildIds []int `json:"childIds"`
- KeywordIds []int `json:"keywordIds"`
- Battlegrounds struct {
- Tier int `json:"tier"`
- Hero bool `json:"hero"`
- UpgradeID int `json:"upgradeId"`
- Image string `json:"image"`
- ImageGold string `json:"imageGold"`
- } `json:"battlegrounds,omitempty"`
-}
-
-// CardSearch structure
-type CardSearch struct {
- Cards []Card `json:"cards"`
- CardCount int `json:"cardCount"`
- PageCount int `json:"pageCount"`
- Page int `json:"page"`
-}
diff --git a/v2/hsgd/decks.go b/v2/hsgd/decks.go
deleted file mode 100644
index c4fd3d5..0000000
--- a/v2/hsgd/decks.go
+++ /dev/null
@@ -1,76 +0,0 @@
-package hsgd
-
-// Deck structure
-type Deck struct {
- Version int `json:"version"`
- Format string `json:"format"`
- Hero struct {
- ID int `json:"id"`
- Collectible int `json:"collectible"`
- Slug string `json:"slug"`
- ClassID int `json:"classId"`
- MultiClassIds []int `json:"multiClassIds"`
- CardTypeID int `json:"cardTypeId"`
- CardSetID int `json:"cardSetId"`
- RarityID int `json:"rarityId"`
- ArtistName string `json:"artistName"`
- Health int `json:"health"`
- ManaCost int `json:"manaCost"`
- Name string `json:"name"`
- Text string `json:"text"`
- Image string `json:"image"`
- ImageGold string `json:"imageGold"`
- FlavorText string `json:"flavorText"`
- CropImage string `json:"cropImage"`
- ChildIds []int `json:"childIds"`
- } `json:"hero"`
- HeroPower struct {
- ID int `json:"id"`
- Collectible int `json:"collectible"`
- Slug string `json:"slug"`
- ClassID int `json:"classId"`
- MultiClassIds []int `json:"multiClassIds"`
- CardTypeID int `json:"cardTypeId"`
- CardSetID int `json:"cardSetId"`
- RarityID int `json:"rarityId"`
- ArtistName string `json:"artistName"`
- ManaCost int `json:"manaCost"`
- Name string `json:"name"`
- Text string `json:"text"`
- Image string `json:"image"`
- ImageGold string `json:"imageGold"`
- FlavorText string `json:"flavorText"`
- CropImage string `json:"cropImage"`
- } `json:"heroPower"`
- Class struct {
- ID int `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- } `json:"class"`
- Cards []struct {
- ID int `json:"id"`
- Collectible int `json:"collectible"`
- Slug string `json:"slug"`
- ClassID int `json:"classId"`
- MultiClassIds []int `json:"multiClassIds"`
- CardTypeID int `json:"cardTypeId"`
- CardSetID int `json:"cardSetId"`
- RarityID int `json:"rarityId"`
- ArtistName string `json:"artistName"`
- Health int `json:"health,omitempty"`
- Attack int `json:"attack,omitempty"`
- ManaCost int `json:"manaCost"`
- Name string `json:"name"`
- Text string `json:"text"`
- Image string `json:"image"`
- ImageGold string `json:"imageGold"`
- FlavorText string `json:"flavorText"`
- CropImage string `json:"cropImage"`
- KeywordIds []int `json:"keywordIds,omitempty"`
- Armor int `json:"armor,omitempty"`
- ChildIds []int `json:"childIds,omitempty"`
- MinionTypeID int `json:"minionTypeId,omitempty"`
- Durability int `json:"durability,omitempty"`
- } `json:"cards"`
- CardCount int `json:"cardCount"`
-}
diff --git a/v2/hsgd/hsgd.go b/v2/hsgd/hsgd.go
deleted file mode 100644
index 282d47b..0000000
--- a/v2/hsgd/hsgd.go
+++ /dev/null
@@ -1,117 +0,0 @@
-// Package hsgd contains types for the Hearthstone Game Data APIs
-package hsgd
-
-// Collectibility type
-type Collectibility string
-
-func (collectibility Collectibility) String() string {
- return string(collectibility)
-}
-
-// Collectibility constants
-const (
- CollectibilityCollectible = Collectibility("1")
- CollectibilityUncollectible = Collectibility("0")
- CollectibilityBoth = Collectibility("0,1")
-)
-
-// Sort - manaCost, attack, health, or name
-type Sort string
-
-func (sort Sort) String() string {
- return string(sort)
-}
-
-// Sort constants
-const (
- SortManaCost = Sort("manaCost")
- SortAttack = Sort("attack")
- SortHealth = Sort("health")
- SortName = Sort("name")
-)
-
-// Order - asc or desc
-type Order string
-
-func (order Order) String() string {
- return string(order)
-}
-
-// Order constants
-const (
- OrderAsc = Order("asc")
- OrderDesc = Order("desc")
-)
-
-// MetadataType - sets, setGroups, types, rarities, classes, minionTypes, and keywords
-type MetadataType string
-
-func (metadataType MetadataType) String() string {
- return string(metadataType)
-}
-
-// MetadataType constants
-const (
- MetadataTypeSets = MetadataType("sets")
- MetadataTypeSetGroups = MetadataType("setGroups")
- MetadataTypeTypes = MetadataType("types")
- MetadataTypeRarities = MetadataType("rarities")
- MetadataTypeClasses = MetadataType("classes")
- MetadataTypeMinionTypes = MetadataType("minionTypes")
- MetadataTypeKeywords = MetadataType("keywords")
-)
-
-// GameMode - constructed or battlegrounds
-type GameMode string
-
-func (gameMode GameMode) String() string {
- return string(gameMode)
-}
-
-// GameMode constants
-const (
- GameModeConstructed = GameMode("constructed")
- GameModeBattlegrounds = GameMode("battlegrounds")
-)
-
-// Tier - hero, 1, 2, 3, 4, 5, or 6
-type Tier string
-
-func (tier Tier) String() string {
- return string(tier)
-}
-
-// Tier constants
-const (
- TierHero = Tier("hero")
- Tier1 = Tier("1")
- Tier2 = Tier("2")
- Tier3 = Tier("3")
- Tier4 = Tier("4")
- Tier5 = Tier("5")
- Tier6 = Tier("6")
-)
-
-// CardBackCategory - base, achieve, fireside, heroes, season, legend, esports, game_license, promotion, pre_purchase, blizzard, golden, events
-type CardBackCategory string
-
-func (cardBackCategory CardBackCategory) String() string {
- return string(cardBackCategory)
-}
-
-// CardBackCategory constants
-const (
- CardBackCategoryBase = CardBackCategory("base")
- CardBackCategoryAchieve = CardBackCategory("achieve")
- CardBackCategoryFireside = CardBackCategory("fireside")
- CardBackCategoryHeroes = CardBackCategory("heroes")
- CardBackCategorySeason = CardBackCategory("season")
- CardBackCategoryLegend = CardBackCategory("legend")
- CardBackCategoryEsports = CardBackCategory("esports")
- CardBackCategoryGameLicense = CardBackCategory("game_license")
- CardBackCategoryPromotion = CardBackCategory("promotion")
- CardBackCategoryPrePurchase = CardBackCategory("pre_purchase")
- CardBackCategoryBlizzard = CardBackCategory("blizzard")
- CardBackCategoryGolden = CardBackCategory("golden")
- CardBackCategoryEvents = CardBackCategory("events")
-)
diff --git a/v2/hsgd/metadata.go b/v2/hsgd/metadata.go
deleted file mode 100644
index 0bc48b4..0000000
--- a/v2/hsgd/metadata.go
+++ /dev/null
@@ -1,77 +0,0 @@
-package hsgd
-
-// Metadata structure
-type Metadata struct {
- Sets []Set `json:"sets"`
- SetGroups []SetGroup `json:"setGroups"`
- Types []Type `json:"types"`
- Rarities []Rarity `json:"rarities"`
- Classes []Class `json:"classes"`
- MinionTypes []MinionType `json:"minionTypes"`
- Keywords []Keyword `json:"keywords"`
- FilterableFields []string `json:"filterableFields"`
- NumericFields []string `json:"numericFields"`
-}
-
-// Set structure
-type Set struct {
- ID int `json:"id"`
- Slug string `json:"slug"`
- ReleaseDate string `json:"releaseDate,omitempty"`
- Name string `json:"name"`
- CollectibleCount int `json:"collectibleCount"`
- CollectibleRevealedCount int `json:"collectibleRevealedCount"`
- NonCollectibleCount int `json:"nonCollectibleCount"`
- NonCollectibleRevealedCount int `json:"nonCollectibleRevealedCount"`
- Type string `json:"type,omitempty"`
-}
-
-// SetGroup structure
-type SetGroup struct {
- Slug string `json:"slug"`
- Year int `json:"year,omitempty"`
- CardSets []string `json:"cardSets"`
- Name string `json:"name"`
- Standard bool `json:"standard,omitempty"`
- Icon string `json:"icon,omitempty"`
- YearRange string `json:"yearRange,omitempty"`
-}
-
-// Type structure
-type Type struct {
- ID int `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
-}
-
-// Rarity structure
-type Rarity struct {
- ID int `json:"id"`
- Slug string `json:"slug"`
- CraftingCost []int `json:"craftingCost"`
- DustValue []int `json:"dustValue"`
- Name string `json:"name"`
-}
-
-// Class structure
-type Class struct {
- ID interface{} `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
-}
-
-// MinionType structure
-type MinionType struct {
- ID int `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
-}
-
-// Keyword structure
-type Keyword struct {
- ID int `json:"id"`
- Slug string `json:"slug"`
- Name string `json:"name"`
- RefText string `json:"refText"`
- Text string `json:"text"`
-}
diff --git a/v2/hsgd_test.go b/v2/hsgd_test.go
deleted file mode 100644
index e2d9033..0000000
--- a/v2/hsgd_test.go
+++ /dev/null
@@ -1,211 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
- "testing"
-
- "github.com/FuzzyStatic/blizzard/v2/hsgd"
-)
-
-func TestHSCardsSearch(t *testing.T) {
- dat, _, err := c.HSCardsSearch(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestHSDetailedCardsSearch(t *testing.T) {
- dat, _, err := c.HSDetailedCardsSearch(
- context.Background(),
- "rise-of-shadows", "mage", "legendary", "minion", "dragon", "battlecry", "kalecgos",
- []int{10}, []int{4}, []int{10}, 1, 5,
- hsgd.CollectibilityCollectible, hsgd.SortName, hsgd.OrderAsc,
- )
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestHSBattlegroundsCardsSearch(t *testing.T) {
- dat, _, err := c.HSBattlegroundsCardsSearch(
- context.Background(),
- "", "", "", "", "",
- []int{}, []int{}, []int{}, 0, 0,
- []hsgd.Tier{hsgd.TierHero, hsgd.Tier3}, "", "", "",
- )
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestHSCardByIDOrSlug(t *testing.T) {
- dat, _, err := c.HSCardByIDOrSlug(context.Background(), "52119-arch-villain-rafaam", hsgd.GameModeConstructed)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestHSCardBackSearchAllLocales(t *testing.T) {
- dat, _, err := c.HSCardBackSearchAllLocales(context.Background(), hsgd.CardBackCategoryBase, "", hsgd.SortName, hsgd.OrderAsc)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestHSCardBackByIDOrSlug(t *testing.T) {
- dat, _, err := c.HSCardBackByIDOrSlug(context.Background(), "155-pizza-stone")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestHSCardBackSearch(t *testing.T) {
- dat, _, err := c.HSCardBackSearch(context.Background(), "", "", hsgd.SortName, hsgd.OrderAsc)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestHSDeck(t *testing.T) {
- dat, _, err := c.HSDeck(context.Background(), "AAECAQcG+wyd8AKS+AKggAOblAPanQMMS6IE/web8wLR9QKD+wKe+wKz/AL1gAOXlAOalAOSnwMA")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestHSMetadata(t *testing.T) {
- dat, _, err := c.HSMetadata(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestHSMetadataSets(t *testing.T) {
- dat, _, err := c.HSMetadataSets(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestHSMetadataSetGroups(t *testing.T) {
- dat, _, err := c.HSMetadataSetGroups(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestHSMetadataTypes(t *testing.T) {
- dat, _, err := c.HSMetadataTypes(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestHSMetadataRarities(t *testing.T) {
- dat, _, err := c.HSMetadataRarities(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestHSMetadataClasses(t *testing.T) {
- dat, _, err := c.HSMetadataClasses(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestHSMetadataMinionTypes(t *testing.T) {
- dat, _, err := c.HSMetadataMinionTypes(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestHSMetadataKeywords(t *testing.T) {
- dat, _, err := c.HSMetadataKeywords(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
diff --git a/v2/init_test.go b/v2/init_test.go
deleted file mode 100644
index bdfce14..0000000
--- a/v2/init_test.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
- "log"
- "os"
-)
-
-var printOutput string
-
-func init() {
- clientID := os.Getenv("CLIENT_ID")
- if clientID == "" {
- log.Fatal("Set the environment variable CLIENT_ID before retrying.")
- }
-
- clientSecret := os.Getenv("CLIENT_SECRET")
- if clientSecret == "" {
- log.Fatal("Set the environment variable CLIENT_SECRET before retrying.")
- }
-
- printOutput = os.Getenv("PRINT_OUTPUT")
- if printOutput == "" {
- log.Println("Output will not be printed for tests.")
- }
-
- c = NewClient(clientID, clientSecret, US, EnUS)
-
- err := c.AccessTokenRequest(context.Background())
- if err != nil {
- fmt.Println(err)
- return
- }
-}
diff --git a/v2/oauth.go b/v2/oauth.go
deleted file mode 100644
index 8a23424..0000000
--- a/v2/oauth.go
+++ /dev/null
@@ -1,155 +0,0 @@
-package blizzard
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "io"
- "net/http"
- "strings"
-
- "github.com/FuzzyStatic/blizzard/v2/oauth"
- "golang.org/x/oauth2"
-)
-
-// OAuth credentials and access token to access Blizzard API
-type OAuth struct {
- ClientID string
- ClientSecret string
- Token *oauth2.Token
-}
-
-// AuthorizeConfig returns OAuth2 config
-func (c *Client) AuthorizeConfig(redirectURI string, profiles ...oauth.Profile) oauth2.Config {
- var scopes []string
-
- for _, profile := range profiles {
- scopes = append(scopes, string(profile))
- }
-
- c.authorizedCfg = oauth2.Config{
- ClientID: c.oauth.ClientID,
- ClientSecret: c.oauth.ClientSecret,
- Scopes: scopes,
- RedirectURL: redirectURI,
- Endpoint: oauth2.Endpoint{
- AuthURL: c.oauthHost + "/oauth/authorize",
- TokenURL: c.oauthHost + "/oauth/token",
- },
- }
-
- return c.authorizedCfg
-}
-
-// AccessTokenRequest retrieves new OAuth2 Token
-func (c *Client) AccessTokenRequest(ctx context.Context) error {
- var (
- req *http.Request
- res *http.Response
- body []byte
- err error
- )
-
- req, err = http.NewRequestWithContext(ctx, "POST", c.oauthHost+"/oauth/token", strings.NewReader("grant_type=client_credentials"))
- if err != nil {
- return err
- }
-
- q := req.URL.Query()
- q.Set("grant_type", "client_credentials")
- req.URL.RawQuery = q.Encode()
-
- req.SetBasicAuth(c.oauth.ClientID, c.oauth.ClientSecret)
- req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
-
- res, err = c.httpClient.Do(req)
- if err != nil {
- return err
- }
- defer res.Body.Close()
-
- body, err = io.ReadAll(res.Body)
- if err != nil {
- return err
- }
-
- err = json.Unmarshal(body, &c.oauth.Token)
- if err != nil {
- return err
- }
-
- return nil
-}
-
-// UserInfoHeader returns basic information about the user associated with the current bearer token
-func (c *Client) UserInfoHeader(token *oauth2.Token) (*oauth.UserInfo, []byte, error) {
- var (
- dat oauth.UserInfo
- req *http.Request
- client *http.Client
- res *http.Response
- b []byte
- err error
- )
-
- req, err = http.NewRequest("GET", c.oauthHost+"/oauth/userinfo", nil)
- if err != nil {
- return &dat, b, err
- }
-
- client = c.authorizedCfg.Client(context.Background(), token)
-
- res, err = client.Do(req)
- if err != nil {
- return &dat, b, err
- }
- defer res.Body.Close()
-
- b, err = io.ReadAll(res.Body)
- if err != nil {
- return &dat, b, err
- }
-
- err = json.Unmarshal(b, &dat)
- if err != nil {
- return &dat, b, err
- }
-
- return &dat, b, nil
-}
-
-// TokenValidation verify that a given bearer token is valid and retrieve metadata about the token including the client_id used to create the token, expiration timestamp, and scopes granted to the token
-func (c *Client) TokenValidation(ctx context.Context, token *oauth2.Token) (*oauth.TokenValidation, []byte, error) {
- var (
- dat oauth.TokenValidation
- req *http.Request
- res *http.Response
- b []byte
- err error
- )
-
- req, err = http.NewRequestWithContext(ctx, "GET", c.oauthHost+fmt.Sprintf("/oauth/check_token?token=%s", token.AccessToken), nil)
- if err != nil {
- return &dat, b, err
- }
-
- req.Header.Set("Accept", "application/json")
-
- res, err = c.httpClient.Do(req)
- if err != nil {
- return &dat, b, err
- }
- defer res.Body.Close()
-
- b, err = io.ReadAll(res.Body)
- if err != nil {
- return &dat, b, err
- }
-
- err = json.Unmarshal(b, &dat)
- if err != nil {
- return &dat, b, err
- }
-
- return &dat, b, nil
-}
diff --git a/v2/oauth/oauth.go b/v2/oauth/oauth.go
deleted file mode 100644
index 72c80a6..0000000
--- a/v2/oauth/oauth.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Package oauth contains types for the OAuth APIs
-package oauth
-
-// Profile type
-type Profile string
-
-// PRofile field authorize scopes
-const (
- ProfileD3 Profile = "d3.profile"
- ProfileSC2 Profile = "sc2.profile"
- ProfileWoW Profile = "wow.profile"
-)
diff --git a/v2/oauth/tokenValidation.go b/v2/oauth/tokenValidation.go
deleted file mode 100644
index ab7815e..0000000
--- a/v2/oauth/tokenValidation.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package oauth
-
-// TokenValidation contains token validation data
-type TokenValidation struct {
- Exp int `json:"exp"`
- Username string `json:"user_name"`
- Authorities []string `json:"authorities"`
- ClientID string `json:"client_id"`
- Scope []string `json:"scope"`
-}
diff --git a/v2/oauth/userAuthentication.go b/v2/oauth/userAuthentication.go
deleted file mode 100644
index 5c1978d..0000000
--- a/v2/oauth/userAuthentication.go
+++ /dev/null
@@ -1,8 +0,0 @@
-package oauth
-
-// UserInfo structure
-type UserInfo struct {
- Sub string `json:"sub"`
- ID int `json:"id"`
- Battletag string `json:"battletag"`
-}
diff --git a/v2/oauth_test.go b/v2/oauth_test.go
deleted file mode 100644
index 2705f94..0000000
--- a/v2/oauth_test.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
- "testing"
-)
-
-func TestAccessTokenRequest(t *testing.T) {
- err := c.AccessTokenRequest(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", c.oauth)
- }
-}
-
-// func TestUserInfoHeader(t *testing.T) {
-// err := c.Token()
-// if err != nil {
-// fmt.Println(err)
-// t.Fail()
-// }
-
-// dat, _, err := c.UserInfoHeader(c.oauth.Token)
-// if err != nil {
-// fmt.Println(err)
-// t.Fail()
-// }
-
-// if printOutput != "" {
-// fmt.Printf("%+v\n", dat)
-// }
-// }
-
-func TestTokenValidation(t *testing.T) {
- dat, _, err := c.TokenValidation(context.Background(), c.oauth.Token)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
diff --git a/v2/sc2c.go b/v2/sc2c.go
deleted file mode 100644
index 04448c5..0000000
--- a/v2/sc2c.go
+++ /dev/null
@@ -1,134 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
-
- "github.com/FuzzyStatic/blizzard/v2/sc2c"
-)
-
-// SC2StaticProfile returns all static SC2 profile data (ctx context.Context, achievements, categories, criteria, and rewards)
-func (c *Client) SC2StaticProfile(ctx context.Context, region Region) (*sc2c.StaticProfile, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/sc2/static/profile/%d", region),
- &sc2c.StaticProfile{},
- )
- return dat.(*sc2c.StaticProfile), header, err
-}
-
-// SC2MetadataProfile returns all SC2 profile metadata
-func (c *Client) SC2MetadataProfile(ctx context.Context, region Region, realmID, profileID int) (*sc2c.MetadataProfile, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/sc2/metadata/profile/%d/%d/%d", region, realmID, profileID),
- &sc2c.MetadataProfile{},
- )
- return dat.(*sc2c.MetadataProfile), header, err
-}
-
-// SC2Profile returns all SC2 profile data
-func (c *Client) SC2Profile(ctx context.Context, region Region, realmID, profileID int) (*sc2c.Profile, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/sc2/profile/%d/%d/%d", region, realmID, profileID),
- &sc2c.Profile{},
- )
- return dat.(*sc2c.Profile), header, err
-}
-
-// SC2ProfileLadderSummary returns SC2 profile ladder summary
-func (c *Client) SC2ProfileLadderSummary(ctx context.Context, region Region, realmID, profileID int) (*sc2c.LadderSummary, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/sc2/profile/%d/%d/%d/ladder/summary", region, realmID, profileID),
- &sc2c.LadderSummary{},
- )
- return dat.(*sc2c.LadderSummary), header, err
-}
-
-// SC2ProfileLadder returns SC2 profile ladder data
-func (c *Client) SC2ProfileLadder(ctx context.Context, region Region, realmID, profileID, ladderID int) (*sc2c.Ladder, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/sc2/profile/%d/%d/%d/ladder/%d", region, realmID, profileID, ladderID),
- &sc2c.Ladder{},
- )
- return dat.(*sc2c.Ladder), header, err
-}
-
-// SC2LadderGrandmaster returns SC2 ladder grandmaster for current season
-func (c *Client) SC2LadderGrandmaster(ctx context.Context, region Region) (*sc2c.LadderGrandmaster, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/sc2/ladder/grandmaster/%d", region),
- &sc2c.LadderGrandmaster{},
- )
- return dat.(*sc2c.LadderGrandmaster), header, err
-}
-
-// SC2LadderSeason returns SC2 ladder current season
-func (c *Client) SC2LadderSeason(ctx context.Context, region Region) (*sc2c.LadderSeason, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/sc2/ladder/season/%d", region),
- &sc2c.LadderSeason{},
- )
- return dat.(*sc2c.LadderSeason), header, err
-}
-
-// SC2Player returns data about player using account ID
-func (c *Client) SC2Player(ctx context.Context, accountID int) (*sc2c.Player, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/sc2/player/%d", accountID),
- &sc2c.Player{},
- )
- return dat.(*sc2c.Player), header, err
-}
-
-// SC2LegacyProfile returns all SC2 legacy profile data
-func (c *Client) SC2LegacyProfile(ctx context.Context, region Region, realmID, profileID int) (*sc2c.LegacyProfile, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/sc2/legacy/profile/%d/%d/%d", region, realmID, profileID),
- &sc2c.LegacyProfile{},
- )
- return dat.(*sc2c.LegacyProfile), header, err
-}
-
-// SC2LegacyProfileLadders returns all SC2 legacy profile ladder data
-func (c *Client) SC2LegacyProfileLadders(ctx context.Context, region Region, realmID, profileID int) (*sc2c.LegacyProfileLadders, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/sc2/legacy/profile/%d/%d/%d/ladders", region, realmID, profileID),
- &sc2c.LegacyProfileLadders{},
- )
- return dat.(*sc2c.LegacyProfileLadders), header, err
-}
-
-// SC2LegacyProfileMatches returns all SC2 legacy profile matches data
-func (c *Client) SC2LegacyProfileMatches(ctx context.Context, region Region, realmID, profileID int) (*sc2c.LegacyProfileMatches, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/sc2/legacy/profile/%d/%d/%d/matches", region, realmID, profileID),
- &sc2c.LegacyProfileMatches{},
- )
- return dat.(*sc2c.LegacyProfileMatches), header, err
-}
-
-// SC2LegacyLadder returns SC2 legacy ladder data
-func (c *Client) SC2LegacyLadder(ctx context.Context, region Region, ladderID int) (*sc2c.LegacyLadder, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/sc2/legacy/ladder/%d/%d", region, ladderID),
- &sc2c.LegacyLadder{},
- )
- return dat.(*sc2c.LegacyLadder), header, err
-}
-
-// SC2LegacyAchievements returns SC2 legacy achievements for region
-func (c *Client) SC2LegacyAchievements(ctx context.Context, region Region) (*sc2c.LegacyAchievements, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/sc2/legacy/data/achievements/%d", region),
- &sc2c.LegacyAchievements{},
- )
- return dat.(*sc2c.LegacyAchievements), header, err
-}
-
-// SC2LegacyRewards returns SC2 legacy rewards for region
-func (c *Client) SC2LegacyRewards(ctx context.Context, region Region) (*sc2c.LegacyRewards, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/sc2/legacy/data/rewards/%d", region),
- &sc2c.LegacyRewards{},
- )
- return dat.(*sc2c.LegacyRewards), header, err
-}
diff --git a/v2/sc2c/account.go b/v2/sc2c/account.go
deleted file mode 100644
index 3a51a8f..0000000
--- a/v2/sc2c/account.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package sc2c
-
-// Player structure
-type Player []struct {
- Name string `json:"name"`
- ProfileURL string `json:"profileUrl"`
- AvatarURL string `json:"avatarUrl"`
- ProfileID string `json:"profileId"`
- RegionID int `json:"regionId"`
- RealmID int `json:"realmId"`
-}
diff --git a/v2/sc2c/ladder.go b/v2/sc2c/ladder.go
deleted file mode 100644
index ded3e03..0000000
--- a/v2/sc2c/ladder.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package sc2c
-
-// LadderGrandmaster structure
-type LadderGrandmaster struct {
- LadderTeams []struct {
- TeamMembers []struct {
- ID string `json:"id"`
- Realm int `json:"realm"`
- Region int `json:"region"`
- DisplayName string `json:"displayName"`
- ClanTag string `json:"clanTag"`
- FavoriteRace string `json:"favoriteRace"`
- } `json:"teamMembers"`
- PreviousRank int `json:"previousRank"`
- Points int `json:"points"`
- Wins int `json:"wins"`
- Losses int `json:"losses"`
- Mmr int `json:"mmr"`
- JoinTimestamp int `json:"joinTimestamp"`
- } `json:"ladderTeams"`
-}
-
-// LadderSeason structure
-type LadderSeason struct {
- SeasonID int `json:"seasonId"`
- Number int `json:"number"`
- Year int `json:"year"`
- StartDate string `json:"startDate"`
- EndDate string `json:"endDate"`
-}
diff --git a/v2/sc2c/legacy.go b/v2/sc2c/legacy.go
deleted file mode 100644
index f8aa207..0000000
--- a/v2/sc2c/legacy.go
+++ /dev/null
@@ -1,300 +0,0 @@
-package sc2c
-
-// LegacyProfile structure
-type LegacyProfile struct {
- ID string `json:"id"`
- Realm int `json:"realm"`
- DisplayName string `json:"displayName"`
- ClanName string `json:"clanName"`
- ClanTag string `json:"clanTag"`
- ProfilePath string `json:"profilePath"`
- Portrait struct {
- X int `json:"x"`
- Y int `json:"y"`
- W int `json:"w"`
- H int `json:"h"`
- Offset int `json:"offset"`
- URL string `json:"url"`
- } `json:"portrait"`
- Career struct {
- PrimaryRace string `json:"primaryRace"`
- TerranWins int `json:"terranWins"`
- ProtossWins int `json:"protossWins"`
- ZergWins int `json:"zergWins"`
- Highest1V1Rank string `json:"highest1v1Rank"`
- HighestTeamRank string `json:"highestTeamRank"`
- SeasonTotalGames int `json:"seasonTotalGames"`
- CareerTotalGames int `json:"careerTotalGames"`
- } `json:"career"`
- SwarmLevels struct {
- Level int `json:"level"`
- Terran struct {
- Level int `json:"level"`
- TotalLevelXP int `json:"totalLevelXP"`
- CurrentLevelXP int `json:"currentLevelXP"`
- } `json:"terran"`
- Zerg struct {
- Level int `json:"level"`
- TotalLevelXP int `json:"totalLevelXP"`
- CurrentLevelXP int `json:"currentLevelXP"`
- } `json:"zerg"`
- Protoss struct {
- Level int `json:"level"`
- TotalLevelXP int `json:"totalLevelXP"`
- CurrentLevelXP int `json:"currentLevelXP"`
- } `json:"protoss"`
- } `json:"swarmLevels"`
- Campaign struct {
- Wol string `json:"wol"`
- Hots string `json:"hots"`
- } `json:"campaign"`
- Season struct {
- SeasonID int `json:"seasonId"`
- SeasonNumber int `json:"seasonNumber"`
- SeasonYear int `json:"seasonYear"`
- TotalGamesThisSeason int `json:"totalGamesThisSeason"`
- Stats []struct {
- Type string `json:"type"`
- Wins int `json:"wins"`
- Games int `json:"games"`
- } `json:"stats"`
- } `json:"season"`
- Rewards struct {
- Selected []string `json:"selected"`
- Earned []string `json:"earned"`
- } `json:"rewards"`
- Achievements struct {
- Points struct {
- TotalPoints int `json:"totalPoints"`
- CategoryPoints struct {
- Num4325377 int `json:"4325377"`
- Num4325379 int `json:"4325379"`
- Num4325382 int `json:"4325382"`
- Num4325408 int `json:"4325408"`
- Num4325410 int `json:"4325410"`
- Num4330138 int `json:"4330138"`
- Num4364473 int `json:"4364473"`
- Num4386911 int `json:"4386911"`
- } `json:"categoryPoints"`
- } `json:"points"`
- Achievements []struct {
- AchievementID string `json:"achievementId"`
- CompletionDate int `json:"completionDate"`
- } `json:"achievements"`
- } `json:"achievements"`
-}
-
-// LegacyProfileLadders structure
-type LegacyProfileLadders struct {
- CurrentSeason []struct {
- Characters []struct {
- ClanName string `json:"clanName"`
- ClanTag string `json:"clanTag"`
- DisplayName string `json:"displayName"`
- ID string `json:"id"`
- ProfilePath string `json:"profilePath"`
- Realm int `json:"realm"`
- Region int `json:"region"`
- } `json:"characters"`
- Ladder []struct {
- Division int `json:"division"`
- LadderID string `json:"ladderId"`
- LadderName string `json:"ladderName"`
- League string `json:"league"`
- Losses int `json:"losses"`
- MatchMakingQueue string `json:"matchMakingQueue"`
- Rank int `json:"rank"`
- Showcase bool `json:"showcase"`
- Wins int `json:"wins"`
- } `json:"ladder"`
- NonRanked []interface{} `json:"nonRanked"`
- } `json:"currentSeason"`
- PreviousSeason []struct {
- Characters []struct {
- ClanName string `json:"clanName"`
- ClanTag string `json:"clanTag"`
- DisplayName string `json:"displayName"`
- ID string `json:"id"`
- ProfilePath string `json:"profilePath"`
- Realm int `json:"realm"`
- Region int `json:"region"`
- } `json:"characters"`
- Ladder []struct {
- Division int `json:"division"`
- LadderID string `json:"ladderId"`
- LadderName string `json:"ladderName"`
- League string `json:"league"`
- Losses int `json:"losses"`
- MatchMakingQueue string `json:"matchMakingQueue"`
- Rank int `json:"rank"`
- Showcase bool `json:"showcase"`
- Wins int `json:"wins"`
- } `json:"ladder"`
- NonRanked []struct {
- GamesPlayed int `json:"gamesPlayed"`
- Mmq string `json:"mmq"`
- } `json:"nonRanked"`
- } `json:"previousSeason"`
- ShowcasePlacement []struct {
- Characters []struct {
- ClanName string `json:"clanName"`
- ClanTag string `json:"clanTag"`
- DisplayName string `json:"displayName"`
- ID string `json:"id"`
- ProfilePath string `json:"profilePath"`
- Realm int `json:"realm"`
- Region int `json:"region"`
- } `json:"characters"`
- Ladder []interface{} `json:"ladder"`
- NonRanked []struct {
- GamesPlayed int `json:"gamesPlayed"`
- Mmq string `json:"mmq"`
- } `json:"nonRanked"`
- } `json:"showcasePlacement"`
-}
-
-// LegacyProfileMatches structure
-type LegacyProfileMatches struct {
- Matches []struct {
- Map string `json:"map"`
- Type string `json:"type"`
- Decision string `json:"decision"`
- Speed string `json:"speed"`
- Date int `json:"date"`
- } `json:"matches"`
-}
-
-// LegacyLadder structure
-type LegacyLadder struct {
- LadderMembers []struct {
- Character struct {
- ID string `json:"id"`
- Realm int `json:"realm"`
- Region int `json:"region"`
- DisplayName string `json:"displayName"`
- ClanName string `json:"clanName"`
- ClanTag string `json:"clanTag"`
- ProfilePath string `json:"profilePath"`
- } `json:"character"`
- JoinTimestamp int `json:"joinTimestamp"`
- Points int `json:"points"`
- Wins int `json:"wins"`
- Losses int `json:"losses"`
- HighestRank int `json:"highestRank"`
- PreviousRank int `json:"previousRank"`
- FavoriteRaceP1 string `json:"favoriteRaceP1"`
- } `json:"ladderMembers"`
-}
-
-// LegacyAchievements structure
-type LegacyAchievements struct {
- Achievements []struct {
- Title string `json:"title"`
- Description string `json:"description"`
- AchievementID string `json:"achievementId"`
- CategoryID string `json:"categoryId"`
- Points int `json:"points"`
- Icon struct {
- X int `json:"x"`
- Y int `json:"y"`
- W int `json:"w"`
- H int `json:"h"`
- Offset int `json:"offset"`
- URL string `json:"url"`
- } `json:"icon"`
- } `json:"achievements"`
- Categories []struct {
- Title string `json:"title"`
- CategoryID string `json:"categoryId"`
- FeaturedAchievementID string `json:"featuredAchievementId"`
- Children []struct {
- Title string `json:"title"`
- CategoryID string `json:"categoryId"`
- FeaturedAchievementID string `json:"featuredAchievementId"`
- } `json:"children,omitempty"`
- } `json:"categories"`
-}
-
-// LegacyRewards structure
-type LegacyRewards struct {
- Portraits []struct {
- Title string `json:"title"`
- ID string `json:"id"`
- Icon struct {
- X int `json:"x"`
- Y int `json:"y"`
- W int `json:"w"`
- H int `json:"h"`
- Offset int `json:"offset"`
- URL string `json:"url"`
- } `json:"icon"`
- AchievementID string `json:"achievementId"`
- } `json:"portraits"`
- TerranDecals []struct {
- Title string `json:"title"`
- ID string `json:"id"`
- Icon struct {
- X int `json:"x"`
- Y int `json:"y"`
- W int `json:"w"`
- H int `json:"h"`
- Offset int `json:"offset"`
- URL string `json:"url"`
- } `json:"icon"`
- AchievementID string `json:"achievementId"`
- } `json:"terranDecals"`
- ZergDecals []struct {
- Title string `json:"title"`
- ID string `json:"id"`
- Icon struct {
- X int `json:"x"`
- Y int `json:"y"`
- W int `json:"w"`
- H int `json:"h"`
- Offset int `json:"offset"`
- URL string `json:"url"`
- } `json:"icon"`
- AchievementID string `json:"achievementId"`
- } `json:"zergDecals"`
- ProtossDecals []struct {
- Title string `json:"title"`
- ID string `json:"id"`
- Icon struct {
- X int `json:"x"`
- Y int `json:"y"`
- W int `json:"w"`
- H int `json:"h"`
- Offset int `json:"offset"`
- URL string `json:"url"`
- } `json:"icon"`
- AchievementID string `json:"achievementId"`
- } `json:"protossDecals"`
- Skins []struct {
- Title string `json:"title"`
- ID string `json:"id"`
- Icon struct {
- X int `json:"x"`
- Y int `json:"y"`
- W int `json:"w"`
- H int `json:"h"`
- Offset int `json:"offset"`
- URL string `json:"url"`
- } `json:"icon"`
- Name string `json:"name,omitempty"`
- AchievementID string `json:"achievementId"`
- } `json:"skins"`
- Animations []struct {
- Title string `json:"title"`
- Command string `json:"command"`
- ID string `json:"id"`
- Icon struct {
- X int `json:"x"`
- Y int `json:"y"`
- W int `json:"w"`
- H int `json:"h"`
- Offset int `json:"offset"`
- URL string `json:"url"`
- } `json:"icon"`
- AchievementID string `json:"achievementId"`
- } `json:"animations"`
-}
diff --git a/v2/sc2c/profile.go b/v2/sc2c/profile.go
deleted file mode 100644
index f247fe2..0000000
--- a/v2/sc2c/profile.go
+++ /dev/null
@@ -1,188 +0,0 @@
-package sc2c
-
-// StaticProfile structure
-type StaticProfile struct {
- Achievements []struct {
- CategoryID string `json:"categoryId"`
- ChainAchievementIds []string `json:"chainAchievementIds"`
- ChainRewardSize int `json:"chainRewardSize"`
- CriteriaIds []string `json:"criteriaIds,omitempty"`
- Description string `json:"description"`
- Flags int `json:"flags"`
- ID string `json:"id"`
- ImageURL string `json:"imageUrl"`
- IsChained bool `json:"isChained"`
- Points int `json:"points"`
- Title string `json:"title"`
- UIOrderHint int `json:"uiOrderHint"`
- } `json:"achievements"`
- Criteria []struct {
- AchievementID string `json:"achievementId"`
- Description string `json:"description"`
- EvaluationClass string `json:"evaluationClass"`
- Flags int `json:"flags"`
- ID string `json:"id"`
- NecessaryQuantity int `json:"necessaryQuantity"`
- UIOrderHint int `json:"uiOrderHint"`
- } `json:"criteria"`
- Categories []struct {
- ChildrenCategoryIds []interface{} `json:"childrenCategoryIds"`
- FeaturedAchievementID string `json:"featuredAchievementId"`
- ID string `json:"id"`
- Name string `json:"name"`
- ParentCategoryID string `json:"parentCategoryId"`
- Points int `json:"points"`
- UIOrderHint int `json:"uiOrderHint"`
- MedalTiers []int `json:"medalTiers,omitempty"`
- } `json:"categories"`
- Rewards []struct {
- Flags int `json:"flags"`
- ID string `json:"id"`
- AchievementID string `json:"achievementId,omitempty"`
- Name string `json:"name"`
- ImageURL string `json:"imageUrl"`
- UnlockableType string `json:"unlockableType"`
- IsSkin bool `json:"isSkin"`
- UIOrderHint int `json:"uiOrderHint"`
- Command string `json:"command,omitempty"`
- } `json:"rewards"`
-}
-
-// MetadataProfile structure
-type MetadataProfile struct {
- Name string `json:"name"`
- ProfileURL string `json:"profileUrl"`
- AvatarURL string `json:"avatarUrl"`
- ProfileID string `json:"profileId"`
- RegionID int `json:"regionId"`
- RealmID int `json:"realmId"`
-}
-
-// Profile structure
-type Profile struct {
- Summary struct {
- ID string `json:"id"`
- Realm int `json:"realm"`
- DisplayName string `json:"displayName"`
- Portrait string `json:"portrait"`
- DecalTerran string `json:"decalTerran"`
- DecalProtoss string `json:"decalProtoss"`
- DecalZerg string `json:"decalZerg"`
- TotalSwarmLevel int `json:"totalSwarmLevel"`
- TotalAchievementPoints int `json:"totalAchievementPoints"`
- } `json:"summary"`
- Snapshot struct {
- SeasonSnapshot struct {
- OneV1 struct {
- Rank int `json:"rank"`
- LeagueName interface{} `json:"leagueName"`
- TotalGames int `json:"totalGames"`
- TotalWins int `json:"totalWins"`
- } `json:"1v1"`
- TwoV2 struct {
- Rank int `json:"rank"`
- LeagueName interface{} `json:"leagueName"`
- TotalGames int `json:"totalGames"`
- TotalWins int `json:"totalWins"`
- } `json:"2v2"`
- ThreeV3 struct {
- Rank int `json:"rank"`
- LeagueName interface{} `json:"leagueName"`
- TotalGames int `json:"totalGames"`
- TotalWins int `json:"totalWins"`
- } `json:"3v3"`
- FourV4 struct {
- Rank int `json:"rank"`
- LeagueName interface{} `json:"leagueName"`
- TotalGames int `json:"totalGames"`
- TotalWins int `json:"totalWins"`
- } `json:"4v4"`
- Archon struct {
- Rank int `json:"rank"`
- LeagueName interface{} `json:"leagueName"`
- TotalGames int `json:"totalGames"`
- TotalWins int `json:"totalWins"`
- } `json:"Archon"`
- } `json:"seasonSnapshot"`
- TotalRankedSeasonGamesPlayed int `json:"totalRankedSeasonGamesPlayed"`
- } `json:"snapshot"`
- Career struct {
- TerranWins int `json:"terranWins"`
- ZergWins int `json:"zergWins"`
- ProtossWins int `json:"protossWins"`
- TotalCareerGames int `json:"totalCareerGames"`
- TotalGamesThisSeason int `json:"totalGamesThisSeason"`
- Current1V1LeagueName interface{} `json:"current1v1LeagueName"`
- CurrentBestTeamLeagueName interface{} `json:"currentBestTeamLeagueName"`
- Best1V1Finish struct {
- LeagueName string `json:"leagueName"`
- TimesAchieved int `json:"timesAchieved"`
- } `json:"best1v1Finish"`
- BestTeamFinish struct {
- LeagueName interface{} `json:"leagueName"`
- TimesAchieved int `json:"timesAchieved"`
- } `json:"bestTeamFinish"`
- } `json:"career"`
- SwarmLevels struct {
- Level int `json:"level"`
- Terran struct {
- Level int `json:"level"`
- MaxLevelPoints int `json:"maxLevelPoints"`
- CurrentLevelPoints int `json:"currentLevelPoints"`
- } `json:"terran"`
- Zerg struct {
- Level int `json:"level"`
- MaxLevelPoints int `json:"maxLevelPoints"`
- CurrentLevelPoints int `json:"currentLevelPoints"`
- } `json:"zerg"`
- Protoss struct {
- Level int `json:"level"`
- MaxLevelPoints int `json:"maxLevelPoints"`
- CurrentLevelPoints int `json:"currentLevelPoints"`
- } `json:"protoss"`
- } `json:"swarmLevels"`
- Campaign struct {
- DifficultyCompleted struct {
- WingsOfLiberty string `json:"wings-of-liberty"`
- HeartOfTheSwarm string `json:"heart-of-the-swarm"`
- } `json:"difficultyCompleted"`
- } `json:"campaign"`
- CategoryPointProgress []struct {
- CategoryID string `json:"categoryId"`
- PointsEarned int `json:"pointsEarned"`
- } `json:"categoryPointProgress"`
- AchievementShowcase []string `json:"achievementShowcase"`
- EarnedRewards []struct {
- RewardID string `json:"rewardId"`
- Selected bool `json:"selected"`
- AchievementID string `json:"achievementId,omitempty"`
- Category string `json:"category,omitempty"`
- } `json:"earnedRewards"`
- EarnedAchievements []struct {
- AchievementID string `json:"achievementId"`
- CompletionDate float64 `json:"completionDate"`
- NumCompletedAchievementsInSeries int `json:"numCompletedAchievementsInSeries"`
- TotalAchievementsInSeries int `json:"totalAchievementsInSeries"`
- IsComplete bool `json:"isComplete"`
- InProgress bool `json:"inProgress"`
- Criteria []struct {
- CriterionID string `json:"criterionId"`
- } `json:"criteria"`
- NextProgressEarnedQuantity int `json:"nextProgressEarnedQuantity,omitempty"`
- NextProgressRequiredQuantity int `json:"nextProgressRequiredQuantity,omitempty"`
- } `json:"earnedAchievements"`
-}
-
-// LadderSummary structure
-type LadderSummary struct {
- ShowCaseEntries []interface{} `json:"showCaseEntries"`
- PlacementMatches []interface{} `json:"placementMatches"`
- AllLadderMemberships []interface{} `json:"allLadderMemberships"`
-}
-
-// Ladder structure
-type Ladder struct {
- LadderTeams []interface{} `json:"ladderTeams"`
- AllLadderMemberships []interface{} `json:"allLadderMemberships"`
- RanksAndPools []interface{} `json:"ranksAndPools"`
-}
diff --git a/v2/sc2c/sc2c.go b/v2/sc2c/sc2c.go
deleted file mode 100644
index f2498f6..0000000
--- a/v2/sc2c/sc2c.go
+++ /dev/null
@@ -1,2 +0,0 @@
-// Package sc2c contains types for the Starcraft 2 Community APIs
-package sc2c
diff --git a/v2/sc2c_test.go b/v2/sc2c_test.go
deleted file mode 100644
index dcf6332..0000000
--- a/v2/sc2c_test.go
+++ /dev/null
@@ -1,175 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
- "testing"
-)
-
-func TestSC2StaticProfile(t *testing.T) {
- dat, _, err := c.SC2StaticProfile(context.Background(), US)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestSC2MetadataProfile(t *testing.T) {
- dat, _, err := c.SC2MetadataProfile(context.Background(), US, 1, 305084)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestSC2Profile(t *testing.T) {
- dat, _, err := c.SC2Profile(context.Background(), US, 1, 305084)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestSC2ProfileLadderSummary(t *testing.T) {
- dat, _, err := c.SC2ProfileLadderSummary(context.Background(), US, 1, 305084)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestSC2ProfileLadder(t *testing.T) {
- dat, _, err := c.SC2ProfileLadder(context.Background(), US, 1, 2376042, 194163)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestSC2LadderGrandmaster(t *testing.T) {
- dat, _, err := c.SC2LadderGrandmaster(context.Background(), EU)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestSC2LadderSeason(t *testing.T) {
- dat, _, err := c.SC2LadderSeason(context.Background(), EU)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestSC2Player(t *testing.T) {
- dat, _, err := c.SC2Player(context.Background(), 1312411)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestSC2LegacyProfile(t *testing.T) {
- dat, _, err := c.SC2LegacyProfile(context.Background(), US, 1, 1655091)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestSC2LegacyProfileLadders(t *testing.T) {
- dat, _, err := c.SC2LegacyProfileLadders(context.Background(), US, 1, 1655091)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestSC2LegacyProfileMatches(t *testing.T) {
- dat, _, err := c.SC2LegacyProfileMatches(context.Background(), US, 1, 1655091)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestSC2LegacyLadder(t *testing.T) {
- dat, _, err := c.SC2LegacyLadder(context.Background(), US, 194163)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestSC2LegacyAchievements(t *testing.T) {
- dat, _, err := c.SC2LegacyAchievements(context.Background(), US)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestSC2LegacyRewards(t *testing.T) {
- dat, _, err := c.SC2LegacyRewards(context.Background(), US)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
diff --git a/v2/sc2gd.go b/v2/sc2gd.go
deleted file mode 100644
index 378910c..0000000
--- a/v2/sc2gd.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
-
- "github.com/FuzzyStatic/blizzard/v2/sc2gd"
-)
-
-// SC2LeagueData returns all SC2 league data from for seasonID, queue ID, team type, and league ID
-func (c *Client) SC2LeagueData(ctx context.Context, seasonID int,
- queueID sc2gd.QueueID, teamType sc2gd.TeamType, leagueID sc2gd.LeagueID) (*sc2gd.League, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/sc2/league/%d/%d/%d/%d", seasonID, queueID, teamType, leagueID),
- &sc2gd.League{},
- )
- return dat.(*sc2gd.League), header, err
-}
-
-// SC2LadderData returns SC2 ladder for given division's ladderID.
-// This API is undocumented by Blizzard, so it may be unstable.
-func (c *Client) SC2LadderData(ctx context.Context, ladderID int) (*sc2gd.Ladder, *Header, error) {
- dat, header, err := c.getStructDataNoNamespace(ctx,
- fmt.Sprintf("/data/sc2/ladder/%d", ladderID),
- &sc2gd.Ladder{},
- )
- return dat.(*sc2gd.Ladder), header, err
-}
diff --git a/v2/sc2gd/ladder.go b/v2/sc2gd/ladder.go
deleted file mode 100644
index a56448d..0000000
--- a/v2/sc2gd/ladder.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package sc2gd
-
-// Ladder structure
-type Ladder struct {
- Team []struct {
- ID uint64 `json:"id"`
- Rating int `json:"rating"`
- Wins int `json:"wins"`
- Losses int `json:"losses"`
- Ties int `json:"ties"`
- Points int `json:"points"`
- LongestWinStreak int `json:"longest_win_streak"`
- CurrentWinStreak int `json:"current_win_streak"`
- CurrentRank int `json:"current_rank"`
- HighestRank int `json:"highest_rank"`
- PreviousRank int `json:"previous_rank"`
- JoinTimeStamp int `json:"join_time_stamp"`
- LastPlayedTimeStamp int `json:"last_played_time_stamp"`
- Member []struct {
- LegacyLink struct {
- ID int `json:"id"`
- Realm int `json:"realm"`
- Name string `json:"name"`
- Path string `json:"path"`
- } `json:"legacy_link"`
- PlayedRaceCount []struct {
- Race string `json:"race"`
- Count int `json:"count"`
- } `json:"played_race_count"`
- CharacterLink struct {
- ID int `json:"id"`
- BattleTag string `json:"battle_tag"`
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- } `json:"character_link"`
- ClanLink struct {
- ID int `json:"id"`
- ClanTag string `json:"clan_tag"`
- ClanName string `json:"clan_name"`
- IconURL string `json:"icon_url"`
- DecalURL string `json:"decal_url"`
- } `json:"clan_link"`
- } `json:"member"`
- } `json:"team"`
-}
diff --git a/v2/sc2gd/league.go b/v2/sc2gd/league.go
deleted file mode 100644
index fcffa0a..0000000
--- a/v2/sc2gd/league.go
+++ /dev/null
@@ -1,81 +0,0 @@
-package sc2gd
-
-// QueueID IDs for different league queues
-type QueueID int
-
-// QueueID constants (1=WoL 1v1, 2=WoL 2v2, 3=WoL 3v3, 4=WoL 4v4) DO NOT REARRANGE
-const (
- _ QueueID = iota
- WoL1v1
- WoL2v2
- WoL3v3
- WoL4v4
-)
-
-// QueueID constants (101=HotS 1v1, 102=HotS 2v2, 103=HotS 3v3, 104=HotS 4v4) DO NOT REARRANGE
-const (
- _ QueueID = 100 + iota
- HotS1v1
- HotS2v2
- HotS3v3
- HotS4v4
-)
-
-// QueueID constants (201=LotV 1v1, 202=LotV 2v2, 203=LotV 3v3, 204=LotV 4v4, 206=LotV Archon) DO NOT REARRANGE
-const (
- _ QueueID = 200 + iota
- LotV1v1
- LotV2v2
- LotV3v3
- LotV4v4
- _
- LotVArchon
-)
-
-// TeamType different team types
-type TeamType int
-
-// TeamType constants (0=arranged, 1=random) DO NOT REARRANGE
-const (
- Arranged TeamType = iota
- Random
-)
-
-// LeagueID available leagues
-type LeagueID int
-
-// LeagueID constants ( 0=Bronze, 1=Silver, 2=Gold, 3=Platinum, 4=Diamond, 5=Master, 6=Grandmaster) DO NOT REARRANGE
-const (
- Bronze LeagueID = iota
- Silver
- Gold
- Platinum
- Diamond
- Master
- Grandmaster
-)
-
-// League structure
-type League struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Key struct {
- LeagueID int `json:"league_id"`
- SeasonID int `json:"season_id"`
- QueueID int `json:"queue_id"`
- TeamType int `json:"team_type"`
- } `json:"key"`
- Tier []struct {
- ID int `json:"id"`
- MinRating int `json:"min_rating"`
- MaxRating int `json:"max_rating"`
- Division []struct {
- ID int `json:"id"`
- LadderID int `json:"ladder_id"`
- MemberCount int `json:"member_count"`
- } `json:"division"`
- } `json:"tier"`
-}
diff --git a/v2/sc2gd/sc2gd.go b/v2/sc2gd/sc2gd.go
deleted file mode 100644
index ee00f38..0000000
--- a/v2/sc2gd/sc2gd.go
+++ /dev/null
@@ -1,2 +0,0 @@
-// Package sc2gd contains types for the Starcraft 2 Game Data APIs
-package sc2gd
diff --git a/v2/sc2gd_test.go b/v2/sc2gd_test.go
deleted file mode 100644
index a4bd211..0000000
--- a/v2/sc2gd_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
- "testing"
-
- "github.com/FuzzyStatic/blizzard/v2/sc2gd"
-)
-
-func TestSC2LeagueData(t *testing.T) {
- dat, _, err := c.SC2LeagueData(context.Background(), 37, sc2gd.LotV1v1, sc2gd.Arranged, sc2gd.Master)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestSC2LadderData(t *testing.T) {
- dat, _, err := c.SC2LadderData(context.Background(), 292787)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
diff --git a/v2/wowcgd.go b/v2/wowcgd.go
deleted file mode 100644
index 0faf6d6..0000000
--- a/v2/wowcgd.go
+++ /dev/null
@@ -1,309 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
-
- "github.com/FuzzyStatic/blizzard/v2/wowcgd"
- "github.com/FuzzyStatic/blizzard/v2/wowsearch"
-)
-
-// ClassicWoWConnectedRealmsIndex returns an index of connected realms.
-func (c *Client) ClassicWoWConnectedRealmsIndex(ctx context.Context) (*wowcgd.ConnectedRealmsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/connected-realm/index",
- c.GetDynamicClassicNamespace(),
- &wowcgd.ConnectedRealmsIndex{},
- )
- return dat.(*wowcgd.ConnectedRealmsIndex), header, err
-}
-
-// ClassicWoWConnectedRealm returns a connected realm by ID.
-func (c *Client) ClassicWoWConnectedRealm(ctx context.Context, connectedRealmID int) (*wowcgd.ConnectedRealm, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/connected-realm/%d", connectedRealmID),
- c.GetDynamicClassicNamespace(),
- &wowcgd.ConnectedRealm{},
- )
- return dat.(*wowcgd.ConnectedRealm), header, err
-}
-
-// ClassicWoWCreatureFamiliesIndex returns an index of creature families.
-func (c *Client) ClassicWoWCreatureFamiliesIndex(ctx context.Context) (*wowcgd.CreatureFamiliesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/creature-family/index",
- c.GetStaticClassicNamespace(),
- &wowcgd.CreatureFamiliesIndex{},
- )
- return dat.(*wowcgd.CreatureFamiliesIndex), header, err
-}
-
-// ClassicWoWCreatureFamily returns a creature family by ID.
-func (c *Client) ClassicWoWCreatureFamily(ctx context.Context, creatureFamilyID int) (*wowcgd.CreatureFamily, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/creature-family/%d", creatureFamilyID),
- c.GetStaticClassicNamespace(),
- &wowcgd.CreatureFamily{},
- )
- return dat.(*wowcgd.CreatureFamily), header, err
-}
-
-// ClassicWoWCreatureTypesIndex returns an index of creature types.
-func (c *Client) ClassicWoWCreatureTypesIndex(ctx context.Context) (*wowcgd.CreatureTypesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/creature-type/index",
- c.GetStaticClassicNamespace(),
- &wowcgd.CreatureTypesIndex{},
- )
- return dat.(*wowcgd.CreatureTypesIndex), header, err
-}
-
-// ClassicWoWCreatureType returns a creature type by ID.
-func (c *Client) ClassicWoWCreatureType(ctx context.Context, creatureTypeID int) (*wowcgd.CreatureType, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/creature-type/%d", creatureTypeID),
- c.GetStaticClassicNamespace(),
- &wowcgd.CreatureType{},
- )
- return dat.(*wowcgd.CreatureType), header, err
-}
-
-// ClassicWoWCreature returns a creature type by ID.
-func (c *Client) ClassicWoWCreature(ctx context.Context, creatureID int) (*wowcgd.Creature, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/creature/%d", creatureID),
- c.GetStaticClassicNamespace(),
- &wowcgd.Creature{},
- )
- return dat.(*wowcgd.Creature), header, err
-}
-
-// ClassicWoWCreatureDisplayMedia returns media for a creature display by ID.
-func (c *Client) ClassicWoWCreatureDisplayMedia(ctx context.Context, creatureDisplayID int) (*wowcgd.CreatureDisplayMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/creature-display/%d", creatureDisplayID),
- c.GetStaticClassicNamespace(),
- &wowcgd.CreatureDisplayMedia{},
- )
- return dat.(*wowcgd.CreatureDisplayMedia), header, err
-}
-
-// ClassicWoWCreatureFamilyMedia returns media for a creature family by ID.
-func (c *Client) ClassicWoWCreatureFamilyMedia(ctx context.Context, creatureFamilyID int) (*wowcgd.CreatureFamilyMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/creature-family/%d", creatureFamilyID),
- c.GetStaticClassicNamespace(),
- &wowcgd.CreatureFamilyMedia{},
- )
- return dat.(*wowcgd.CreatureFamilyMedia), header, err
-}
-
-// ClassicWoWGuildCrestComponentsIndex returns an index of guild crest media
-func (c *Client) ClassicWoWGuildCrestComponentsIndex(ctx context.Context) (*wowcgd.GuildCrestComponentsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/guild-crest/index",
- c.GetStaticClassicNamespace(),
- &wowcgd.GuildCrestComponentsIndex{},
- )
- return dat.(*wowcgd.GuildCrestComponentsIndex), header, err
-}
-
-// ClassicWoWGuildCrestBorderMedia returns media for a guild crest border by ID
-func (c *Client) ClassicWoWGuildCrestBorderMedia(ctx context.Context, borderID int) (*wowcgd.GuildCrestBorderMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/guild-crest/border/%d", borderID),
- c.GetStaticClassicNamespace(),
- &wowcgd.GuildCrestBorderMedia{},
- )
- return dat.(*wowcgd.GuildCrestBorderMedia), header, err
-}
-
-// ClassicWoWGuildCrestEmblemMedia returns media for a guild crest emblem by ID
-func (c *Client) ClassicWoWGuildCrestEmblemMedia(ctx context.Context, emblemID int) (*wowcgd.GuildCrestEmblemMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/guild-crest/emblem/%d", emblemID),
- c.GetStaticClassicNamespace(),
- &wowcgd.GuildCrestEmblemMedia{},
- )
- return dat.(*wowcgd.GuildCrestEmblemMedia), header, err
-}
-
-// ClassicWoWItemClassesIndex returns an index of item classes
-func (c *Client) ClassicWoWItemClassesIndex(ctx context.Context) (*wowcgd.ItemClassesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/item-class/index",
- c.GetStaticClassicNamespace(),
- &wowcgd.ItemClassesIndex{},
- )
- return dat.(*wowcgd.ItemClassesIndex), header, err
-}
-
-// ClassicWoWItemClass returns an item class by ID
-func (c *Client) ClassicWoWItemClass(ctx context.Context, itemClassID int) (*wowcgd.ItemClass, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/item-class/%d", itemClassID),
- c.GetStaticClassicNamespace(),
- &wowcgd.ItemClass{},
- )
- return dat.(*wowcgd.ItemClass), header, err
-}
-
-// ClassicWoWItemSubclass returns an item subclass by ID
-func (c *Client) ClassicWoWItemSubclass(ctx context.Context, itemClassID, itemSubclassID int) (*wowcgd.ItemSubclass, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/item-class/%d/item-subclass/%d", itemClassID, itemSubclassID),
- c.GetStaticClassicNamespace(),
- &wowcgd.ItemSubclass{},
- )
- return dat.(*wowcgd.ItemSubclass), header, err
-}
-
-// ClassicWoWItem returns an item by ID
-func (c *Client) ClassicWoWItem(ctx context.Context, itemID int) (*wowcgd.Item, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/item/%d", itemID),
- c.GetStaticClassicNamespace(),
- &wowcgd.Item{},
- )
- return dat.(*wowcgd.Item), header, err
-}
-
-// ClassicWoWItemMedia returns media for an item by ID
-func (c *Client) ClassicWoWItemMedia(ctx context.Context, itemID int) (*wowcgd.ItemMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/item/%d", itemID),
- c.GetStaticClassicNamespace(),
- &wowcgd.ItemMedia{},
- )
- return dat.(*wowcgd.ItemMedia), header, err
-}
-
-// ClassicWoWPlayableClassesIndex returns an index of playable classes
-func (c *Client) ClassicWoWPlayableClassesIndex(ctx context.Context) (*wowcgd.PlayableClassesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/playable-class/index",
- c.GetStaticClassicNamespace(),
- &wowcgd.PlayableClassesIndex{},
- )
- return dat.(*wowcgd.PlayableClassesIndex), header, err
-}
-
-// ClassicWoWPlayableClass returns a playable class by ID
-func (c *Client) ClassicWoWPlayableClass(ctx context.Context, classID int) (*wowcgd.PlayableClass, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/playable-class/%d", classID),
- c.GetStaticClassicNamespace(),
- &wowcgd.PlayableClass{},
- )
- return dat.(*wowcgd.PlayableClass), header, err
-}
-
-// ClassicWoWPlayableClassMedia returns media for a playable class by ID
-func (c *Client) ClassicWoWPlayableClassMedia(ctx context.Context, playableClassID int) (*wowcgd.PlayableClassMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/playable-class/%d", playableClassID),
- c.GetStaticClassicNamespace(),
- &wowcgd.PlayableClassMedia{},
- )
- return dat.(*wowcgd.PlayableClassMedia), header, err
-}
-
-// ClassicWoWPlayableRacesIndex returns an index of playable races
-func (c *Client) ClassicWoWPlayableRacesIndex(ctx context.Context) (*wowcgd.PlayableRacesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/playable-race/index",
- c.GetStaticClassicNamespace(),
- &wowcgd.PlayableRacesIndex{},
- )
- return dat.(*wowcgd.PlayableRacesIndex), header, err
-}
-
-// ClassicWoWPlayableRace returns a playable race by ID
-func (c *Client) ClassicWoWPlayableRace(ctx context.Context, raceID int) (*wowcgd.PlayableRace, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/playable-race/%d", raceID),
- c.GetStaticClassicNamespace(),
- &wowcgd.PlayableRace{},
- )
- return dat.(*wowcgd.PlayableRace), header, err
-}
-
-// ClassicWoWPowerTypesIndex returns an index of power types
-func (c *Client) ClassicWoWPowerTypesIndex(ctx context.Context) (*wowcgd.PowerTypesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/power-type/index",
- c.GetStaticClassicNamespace(),
- &wowcgd.PowerTypesIndex{},
- )
- return dat.(*wowcgd.PowerTypesIndex), header, err
-}
-
-// ClassicWoWPowerType returns a power type by ID
-func (c *Client) ClassicWoWPowerType(ctx context.Context, powerTypeID int) (*wowcgd.PowerType, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/power-type/%d", powerTypeID),
- c.GetStaticClassicNamespace(),
- &wowcgd.PowerType{},
- )
- return dat.(*wowcgd.PowerType), header, err
-}
-
-// ClassicWoWRealmIndex returns an index of realms.
-func (c *Client) ClassicWoWRealmIndex(ctx context.Context) (*wowcgd.RealmIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/realm/index",
- c.GetDynamicClassicNamespace(),
- &wowcgd.RealmIndex{},
- )
- return dat.(*wowcgd.RealmIndex), header, err
-}
-
-// ClassicWoWRealm returns a single realm by slug or ID.
-func (c *Client) ClassicWoWRealm(ctx context.Context, realmSlug string) (*wowcgd.Realm, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/realm/%s", realmSlug),
- c.GetDynamicClassicNamespace(),
- &wowcgd.Realm{},
- )
- return dat.(*wowcgd.Realm), header, err
-}
-
-// ClassicWoWRegionIndex returns an index of regions.
-func (c *Client) ClassicWoWRegionIndex(ctx context.Context) (*wowcgd.RegionIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/region/index",
- c.GetDynamicClassicNamespace(),
- &wowcgd.RegionIndex{},
- )
- return dat.(*wowcgd.RegionIndex), header, err
-}
-
-// ClassicWoWRegion returns a region by ID.
-func (c *Client) ClassicWoWRegion(ctx context.Context, regionID int) (*wowcgd.Region, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/region/%d", regionID),
- c.GetDynamicClassicNamespace(),
- &wowcgd.Region{},
- )
- return dat.(*wowcgd.Region), header, err
-}
-
-// ClassicRealmSearch searches for realms
-func (c Client) ClassicRealmSearch(ctx context.Context, opts ...wowsearch.Opt) (*wowcgd.RealmSearch, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/search/realm%s", buildSearchParams(opts...)),
- c.GetDynamicClassicNamespace(),
- &wowcgd.RealmSearch{},
- )
- return dat.(*wowcgd.RealmSearch), header, err
-}
-
-// ClassicConnectedRealmSearch searches for connected realms
-func (c Client) ClassicConnectedRealmSearch(ctx context.Context, opts ...wowsearch.Opt) (*wowcgd.ConnectedRealmsSearch, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/search/connected-realm%s", buildSearchParams(opts...)),
- c.GetDynamicClassicNamespace(),
- &wowcgd.ConnectedRealmsSearch{},
- )
- return dat.(*wowcgd.ConnectedRealmsSearch), header, err
-}
diff --git a/v2/wowcgd/connectedRealm.go b/v2/wowcgd/connectedRealm.go
deleted file mode 100644
index ac9a702..0000000
--- a/v2/wowcgd/connectedRealm.go
+++ /dev/null
@@ -1,178 +0,0 @@
-package wowcgd
-
-// ConnectedRealmsIndex structure
-type ConnectedRealmsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ConnectedRealms []struct {
- Href string `json:"href"`
- } `json:"connected_realms"`
-}
-
-// ConnectedRealm structure
-type ConnectedRealm struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- HasQueue bool `json:"has_queue"`
- Status struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"status"`
- Population struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"population"`
- Realms []struct {
- ID int `json:"id"`
- Region struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"region"`
- ConnectedRealm struct {
- Href string `json:"href"`
- } `json:"connected_realm"`
- Name string `json:"name"`
- Category string `json:"category"`
- Locale string `json:"locale"`
- Timezone string `json:"timezone"`
- Type struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"type"`
- IsTournament bool `json:"is_tournament"`
- Slug string `json:"slug"`
- } `json:"realms"`
- MythicLeaderboards struct {
- Href string `json:"href"`
- } `json:"mythic_leaderboards"`
-}
-
-// ConnectedRealmsSearch structure
-type ConnectedRealmsSearch struct {
- Page int `json:"page"`
- PageSize int `json:"pageSize"`
- MaxPageSize int `json:"maxPageSize"`
- PageCount int `json:"pageCount"`
- Results []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Data struct {
- Realms []struct {
- IsTournament bool `json:"is_tournament"`
- Timezone string `json:"timezone"`
- Name struct {
- ItIT string `json:"it_IT"`
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- ID int `json:"id"`
- Region struct {
- Name struct {
- ItIT string `json:"it_IT"`
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- ID int `json:"id"`
- } `json:"region"`
- Category struct {
- ItIT string `json:"it_IT"`
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"category"`
- Locale string `json:"locale"`
- Type struct {
- Name struct {
- ItIT string `json:"it_IT"`
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- Type string `json:"type"`
- } `json:"type"`
- Slug string `json:"slug"`
- } `json:"realms"`
- ID int `json:"id"`
- HasQueue bool `json:"has_queue"`
- Status struct {
- Name struct {
- ItIT string `json:"it_IT"`
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- Type string `json:"type"`
- } `json:"status"`
- Population struct {
- Name struct {
- ItIT string `json:"it_IT"`
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- Type string `json:"type"`
- } `json:"population"`
- } `json:"data"`
- } `json:"results"`
-}
diff --git a/v2/wowcgd/creature.go b/v2/wowcgd/creature.go
deleted file mode 100644
index c9a0f5d..0000000
--- a/v2/wowcgd/creature.go
+++ /dev/null
@@ -1,118 +0,0 @@
-package wowcgd
-
-// CreatureFamiliesIndex structure
-type CreatureFamiliesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- CreatureFamilies []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"creature_families"`
-}
-
-// CreatureFamily structure
-type CreatureFamily struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
-}
-
-// CreatureTypesIndex structure
-type CreatureTypesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- CreatureTypes []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"creature_types"`
-}
-
-// CreatureType structure
-type CreatureType struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
-}
-
-// Creature structure
-type Creature struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Type struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"type"`
- Family struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"family"`
- CreatureDisplays []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- } `json:"creature_displays"`
- IsTameable bool `json:"is_tameable"`
-}
-
-// CreatureDisplayMedia structure
-type CreatureDisplayMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- } `json:"assets"`
-}
-
-// CreatureFamilyMedia structure
-type CreatureFamilyMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- } `json:"assets"`
-}
diff --git a/v2/wowcgd/guildCrest.go b/v2/wowcgd/guildCrest.go
deleted file mode 100644
index 84f5939..0000000
--- a/v2/wowcgd/guildCrest.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package wowcgd
-
-// GuildCrestComponentsIndex structure
-type GuildCrestComponentsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Emblems []struct {
- ID int `json:"id"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- } `json:"media"`
- } `json:"emblems"`
- Borders []struct {
- ID int `json:"id"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- } `json:"media"`
- } `json:"borders"`
-}
-
-// GuildCrestBorderMedia structure
-type GuildCrestBorderMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- } `json:"assets"`
-}
-
-// GuildCrestEmblemMedia structure
-type GuildCrestEmblemMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- } `json:"assets"`
-}
diff --git a/v2/wowcgd/item.go b/v2/wowcgd/item.go
deleted file mode 100644
index 32e7c37..0000000
--- a/v2/wowcgd/item.go
+++ /dev/null
@@ -1,107 +0,0 @@
-package wowcgd
-
-// ItemClassesIndex structure
-type ItemClassesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ItemClasses []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"item_classes"`
-}
-
-// ItemClass structure
-type ItemClass struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ClassID int `json:"class_id"`
- Name string `json:"name"`
- ItemSubclasses []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"item_subclasses"`
-}
-
-// ItemSubclass structure
-type ItemSubclass struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ClassID int `json:"class_id"`
- SubclassID int `json:"subclass_id"`
- DisplayName string `json:"display_name"`
- HideSubclassInTooltips bool `json:"hide_subclass_in_tooltips"`
-}
-
-// Item structure
-type Item struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Quality struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"quality"`
- Level int `json:"level"`
- RequiredLevel int `json:"required_level"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
- ItemClass struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"item_class"`
- ItemSubclass struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"item_subclass"`
- InventoryType struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"inventory_type"`
- PurchasePrice int `json:"purchase_price"`
- SellPrice int `json:"sell_price"`
- MaxCount int `json:"max_count"`
- IsEquippable bool `json:"is_equippable"`
- IsStackable bool `json:"is_stackable"`
-}
-
-// ItemMedia structure
-type ItemMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- } `json:"assets"`
-}
diff --git a/v2/wowcgd/mediaSearch.go b/v2/wowcgd/mediaSearch.go
deleted file mode 100644
index 3d97207..0000000
--- a/v2/wowcgd/mediaSearch.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package wowcgd
-
-// MediaSearch Structure
-type MediaSearch struct {
- Page int `json:"page"`
- PageSize int `json:"pageSize"`
- MaxPageSize int `json:"maxPageSize"`
- PageCount int `json:"pageCount"`
- ResultCountCapped bool `json:"resultCountCapped"`
- Results []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Data struct {
- Assets []struct {
- FileDataID int `json:"file_data_id"`
- Value string `json:"value"`
- Key string `json:"key"`
- } `json:"assets"`
- ID int `json:"id"`
- } `json:"data"`
- } `json:"results"`
-}
diff --git a/v2/wowcgd/playableClass.go b/v2/wowcgd/playableClass.go
deleted file mode 100644
index 94f1078..0000000
--- a/v2/wowcgd/playableClass.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package wowcgd
-
-// PlayableClassesIndex structure
-type PlayableClassesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Classes []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"classes"`
-}
-
-// PlayableClass structure
-type PlayableClass struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- GenderName struct {
- Male string `json:"male"`
- Female string `json:"female"`
- } `json:"gender_name"`
- PowerType struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"power_type"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
- PvpTalentSlots struct {
- Href string `json:"href"`
- } `json:"pvp_talent_slots"`
-}
-
-// PlayableClassMedia structure
-type PlayableClassMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
-}
diff --git a/v2/wowcgd/playableRace.go b/v2/wowcgd/playableRace.go
deleted file mode 100644
index 75c5f06..0000000
--- a/v2/wowcgd/playableRace.go
+++ /dev/null
@@ -1,38 +0,0 @@
-package wowcgd
-
-// PlayableRacesIndex structure
-type PlayableRacesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Races []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"races"`
-}
-
-// PlayableRace structure
-type PlayableRace struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- GenderName struct {
- Male string `json:"male"`
- Female string `json:"female"`
- } `json:"gender_name"`
- Faction struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"faction"`
- IsSelectable bool `json:"is_selectable"`
- IsAlliedRace bool `json:"is_allied_race"`
-}
diff --git a/v2/wowcgd/powerType.go b/v2/wowcgd/powerType.go
deleted file mode 100644
index 2345694..0000000
--- a/v2/wowcgd/powerType.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package wowcgd
-
-// PowerTypesIndex structure
-type PowerTypesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- PowerTypes []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"power_types"`
-}
-
-// PowerType structure
-type PowerType struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
-}
diff --git a/v2/wowcgd/realm.go b/v2/wowcgd/realm.go
deleted file mode 100644
index 06bf91c..0000000
--- a/v2/wowcgd/realm.go
+++ /dev/null
@@ -1,125 +0,0 @@
-package wowcgd
-
-// RealmIndex structure
-type RealmIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Realms []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realms"`
-}
-
-// Realm structure
-type Realm struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Region struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"region"`
- ConnectedRealm struct {
- Href string `json:"href"`
- } `json:"connected_realm"`
- Name string `json:"name"`
- Category string `json:"category"`
- Locale string `json:"locale"`
- Timezone string `json:"timezone"`
- Type struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"type"`
- IsTournament bool `json:"is_tournament"`
- Slug string `json:"slug"`
-}
-
-// RealmSearch structure
-type RealmSearch struct {
- Page int `json:"page"`
- PageSize int `json:"pageSize"`
- MaxPageSize int `json:"maxPageSize"`
- PageCount int `json:"pageCount"`
- Results []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Data struct {
- IsTournament bool `json:"is_tournament"`
- Timezone string `json:"timezone"`
- Name struct {
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- ID int `json:"id"`
- Region struct {
- Name struct {
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- } `json:"region"`
- Category struct {
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"category"`
- Locale string `json:"locale"`
- Type struct {
- Name struct {
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- Type string `json:"type"`
- } `json:"type"`
- Slug string `json:"slug"`
- } `json:"data"`
- } `json:"results"`
-}
diff --git a/v2/wowcgd/region.go b/v2/wowcgd/region.go
deleted file mode 100644
index 31da4cb..0000000
--- a/v2/wowcgd/region.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package wowcgd
-
-// RegionIndex structure
-type RegionIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Regions []struct {
- Href string `json:"href"`
- } `json:"regions"`
-}
-
-// Region structure
-type Region struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Tag string `json:"tag"`
-}
diff --git a/v2/wowcgd/wowcgd.go b/v2/wowcgd/wowcgd.go
deleted file mode 100644
index c6d13a1..0000000
--- a/v2/wowcgd/wowcgd.go
+++ /dev/null
@@ -1,2 +0,0 @@
-// Package wowcgd contains types for the World of Warcraft Classic Game Data APIs
-package wowcgd
diff --git a/v2/wowcgd_test.go b/v2/wowcgd_test.go
deleted file mode 100644
index 76b891c..0000000
--- a/v2/wowcgd_test.go
+++ /dev/null
@@ -1,343 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
- "testing"
-)
-
-func TestClassicWoWConnectedRealmsIndex(t *testing.T) {
- dat, _, err := c.ClassicWoWConnectedRealmsIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWConnectedRealm(t *testing.T) {
- dat, _, err := c.ClassicWoWConnectedRealm(context.Background(), 4388)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWCreatureFamiliesIndex(t *testing.T) {
- dat, _, err := c.ClassicWoWCreatureFamiliesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWCreatureFamily(t *testing.T) {
- dat, _, err := c.ClassicWoWCreatureFamily(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWCreatureTypesIndex(t *testing.T) {
- dat, _, err := c.ClassicWoWCreatureTypesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWCreatureType(t *testing.T) {
- dat, _, err := c.ClassicWoWCreatureType(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWCreature(t *testing.T) {
- dat, _, err := c.ClassicWoWCreature(context.Background(), 30)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWCreatureDisplayMedia(t *testing.T) {
- dat, _, err := c.ClassicWoWCreatureDisplayMedia(context.Background(), 30)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWCreatureFamilyMedia(t *testing.T) {
- dat, _, err := c.ClassicWoWCreatureFamilyMedia(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWGuildCrestComponentsIndex(t *testing.T) {
- dat, _, err := c.ClassicWoWGuildCrestComponentsIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWGuildCrestBorderMedia(t *testing.T) {
- dat, _, err := c.ClassicWoWGuildCrestBorderMedia(context.Background(), 0)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWGuildCrestEmblemMedia(t *testing.T) {
- dat, _, err := c.ClassicWoWGuildCrestEmblemMedia(context.Background(), 0)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWItemClassesIndex(t *testing.T) {
- dat, _, err := c.ClassicWoWItemClassesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWItemClass(t *testing.T) {
- dat, _, err := c.ClassicWoWItemClass(context.Background(), 0)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWItemSubclass(t *testing.T) {
- dat, _, err := c.ClassicWoWItemSubclass(context.Background(), 0, 0)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWItem(t *testing.T) {
- dat, _, err := c.ClassicWoWItem(context.Background(), 19019)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWItemMedia(t *testing.T) {
- dat, _, err := c.ClassicWoWItemMedia(context.Background(), 19019)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWPlayableClassesIndex(t *testing.T) {
- dat, _, err := c.ClassicWoWPlayableClassesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWPlayableClass(t *testing.T) {
- dat, _, err := c.ClassicWoWPlayableClass(context.Background(), 7)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWPlayableClassMedia(t *testing.T) {
- dat, _, err := c.ClassicWoWPlayableClassMedia(context.Background(), 7)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWPlayableRacesIndex(t *testing.T) {
- dat, _, err := c.ClassicWoWPlayableRacesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWPlayableRace(t *testing.T) {
- dat, _, err := c.ClassicWoWPlayableRace(context.Background(), 2)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWPowerTypesIndex(t *testing.T) {
- dat, _, err := c.ClassicWoWPowerTypesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWPowerType(t *testing.T) {
- dat, _, err := c.ClassicWoWPowerType(context.Background(), 0)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWRealmIndex(t *testing.T) {
- dat, _, err := c.ClassicWoWRealmIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWRealm(t *testing.T) {
- dat, _, err := c.ClassicWoWRealm(context.Background(), "westfall")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWRegionIndex(t *testing.T) {
- dat, _, err := c.ClassicWoWRegionIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestClassicWoWRegion(t *testing.T) {
- dat, _, err := c.ClassicWoWRegion(context.Background(), 41)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
diff --git a/v2/wowgd.go b/v2/wowgd.go
deleted file mode 100644
index c7adc69..0000000
--- a/v2/wowgd.go
+++ /dev/null
@@ -1,1264 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
-
- "github.com/FuzzyStatic/blizzard/v2/wowgd"
- "github.com/FuzzyStatic/blizzard/v2/wowsearch"
-)
-
-// WoWAchievementCategoriesIndex returns an index of achievement categories.
-func (c *Client) WoWAchievementCategoriesIndex(ctx context.Context) (*wowgd.AchievementCategoriesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/achievement-category/index",
- c.GetStaticNamespace(),
- &wowgd.AchievementCategoriesIndex{},
- )
- return dat.(*wowgd.AchievementCategoriesIndex), header, err
-}
-
-// WoWAchievementCategory returns an achievement category by ID.
-func (c *Client) WoWAchievementCategory(ctx context.Context, achievementCategoryID int) (*wowgd.AchievementCategory, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/achievement-category/%d", achievementCategoryID),
- c.GetStaticNamespace(),
- &wowgd.AchievementCategory{},
- )
- return dat.(*wowgd.AchievementCategory), header, err
-}
-
-// WoWAchievementIndex returns an index of achievements.
-func (c *Client) WoWAchievementIndex(ctx context.Context) (*wowgd.AchievementIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/achievement/index",
- c.GetStaticNamespace(),
- &wowgd.AchievementIndex{},
- )
- return dat.(*wowgd.AchievementIndex), header, err
-}
-
-// WoWAchievement returns an achievement category by ID.
-func (c *Client) WoWAchievement(ctx context.Context, achievementID int) (*wowgd.Achievement, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/achievement/%d", achievementID),
- c.GetStaticNamespace(),
- &wowgd.Achievement{},
- )
- return dat.(*wowgd.Achievement), header, err
-}
-
-// WoWAchievementMedia returns media for an achievement by ID.
-func (c *Client) WoWAchievementMedia(ctx context.Context, achievementID int) (*wowgd.AchievementMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/achievement/%d", achievementID),
- c.GetStaticNamespace(),
- &wowgd.AchievementMedia{},
- )
- return dat.(*wowgd.AchievementMedia), header, err
-}
-
-// WoWAuctions returns all active auctions for a connected realm. See the Connected Realm API for information about retrieving a list of connected realm IDs.
-// Auction house data updates at a set interval. The value was initially set at 1 hour; however, it might change over time without notice.
-// Depending on the number of active auctions on the specified connected realm, the response from this endpoint may be rather large, sometimes exceeding 10 MB.
-func (c *Client) WoWAuctions(ctx context.Context, connectedRealmID int) (*wowgd.AuctionHouse, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/connected-realm/%d/auctions", connectedRealmID),
- c.GetDynamicNamespace(),
- &wowgd.AuctionHouse{},
- )
- return dat.(*wowgd.AuctionHouse), header, err
-}
-
-// WoWAzeriteEssenceIndex returns an index of azerite essences.
-func (c *Client) WoWAzeriteEssenceIndex(ctx context.Context) (*wowgd.AzeriteEssenceIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/azerite-essence/index",
- c.GetStaticNamespace(),
- &wowgd.AzeriteEssenceIndex{},
- )
- return dat.(*wowgd.AzeriteEssenceIndex), header, err
-}
-
-// WoWAzeriteEssence returns an azerite essence by ID.
-func (c *Client) WoWAzeriteEssence(ctx context.Context, azeriteEssenceID int) (*wowgd.AzeriteEssence, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/azerite-essence/%d", azeriteEssenceID), c.GetStaticNamespace(),
- &wowgd.AzeriteEssence{},
- )
- return dat.(*wowgd.AzeriteEssence), header, err
-}
-
-// WoWAzeriteEssenceMedia returns media for an azerite essence by ID.
-func (c *Client) WoWAzeriteEssenceMedia(ctx context.Context, azeriteEssenceID int) (*wowgd.AzeriteEssenceMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/azerite-essence/%d", azeriteEssenceID),
- c.GetStaticNamespace(),
- &wowgd.AzeriteEssenceMedia{},
- )
- return dat.(*wowgd.AzeriteEssenceMedia), header, err
-}
-
-// WoWConnectedRealmsIndex returns an index of connected realms
-func (c *Client) WoWConnectedRealmsIndex(ctx context.Context) (*wowgd.ConnectedRealmsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/connected-realm/index",
- c.GetDynamicNamespace(),
- &wowgd.ConnectedRealmsIndex{},
- )
- return dat.(*wowgd.ConnectedRealmsIndex), header, err
-}
-
-// WoWConnectedRealm returns a single connected realm by ID
-func (c *Client) WoWConnectedRealm(ctx context.Context, connectedRealmID int) (*wowgd.ConnectedRealm, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/connected-realm/%d", connectedRealmID),
- c.GetDynamicNamespace(),
- &wowgd.ConnectedRealm{},
- )
- return dat.(*wowgd.ConnectedRealm), header, err
-}
-
-// WoWCovenantsIndex returns an index of covenants.
-func (c *Client) WoWCovenantsIndex(ctx context.Context) (*wowgd.CovenantsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/covenant/index",
- c.GetStaticNamespace(),
- &wowgd.CovenantsIndex{},
- )
- return dat.(*wowgd.CovenantsIndex), header, err
-}
-
-// WoWCovenant returns a covenant by ID.
-func (c *Client) WoWCovenant(ctx context.Context, covenantID int) (*wowgd.Covenant, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/covenant/%d", covenantID),
- c.GetStaticNamespace(),
- &wowgd.Covenant{},
- )
- return dat.(*wowgd.Covenant), header, err
-}
-
-// WoWCovenantMedia returns media for a covenant by ID.
-func (c *Client) WoWCovenantMedia(ctx context.Context, covenantID int) (*wowgd.CovenantMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/covenant/%d", covenantID),
- c.GetStaticNamespace(),
- &wowgd.CovenantMedia{},
- )
- return dat.(*wowgd.CovenantMedia), header, err
-}
-
-// WoWCovenantSoulbindsIndex returns an index of soulbinds.
-func (c *Client) WoWCovenantSoulbindsIndex(ctx context.Context) (*wowgd.CovenantSoulbindsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/covenant/soulbind/index",
- c.GetStaticNamespace(),
- &wowgd.CovenantSoulbindsIndex{},
- )
- return dat.(*wowgd.CovenantSoulbindsIndex), header, err
-}
-
-// WoWCovenantSoulbind returns a soulbind by ID.
-func (c *Client) WoWCovenantSoulbind(ctx context.Context, soulbindID int) (*wowgd.CovenantSoulbind, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/covenant/soulbind/%d", soulbindID),
- c.GetStaticNamespace(),
- &wowgd.CovenantSoulbind{},
- )
- return dat.(*wowgd.CovenantSoulbind), header, err
-}
-
-// WoWCovenantConduitsIndex returns an index of conduits.
-func (c *Client) WoWCovenantConduitsIndex(ctx context.Context) (*wowgd.CovenantConduitsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/covenant/conduit/index",
- c.GetStaticNamespace(),
- &wowgd.CovenantConduitsIndex{},
- )
- return dat.(*wowgd.CovenantConduitsIndex), header, err
-}
-
-// WoWCovenantConduit returns a conduit by ID.
-func (c *Client) WoWCovenantConduit(ctx context.Context, conduitID int) (*wowgd.CovenantConduit, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/covenant/conduit/%d", conduitID),
- c.GetStaticNamespace(),
- &wowgd.CovenantConduit{},
- )
- return dat.(*wowgd.CovenantConduit), header, err
-}
-
-// WoWCreatureFamiliesIndex returns an index of creature families.
-func (c *Client) WoWCreatureFamiliesIndex(ctx context.Context) (*wowgd.CreatureFamiliesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/creature-family/index",
- c.GetStaticNamespace(),
- &wowgd.CreatureFamiliesIndex{},
- )
- return dat.(*wowgd.CreatureFamiliesIndex), header, err
-}
-
-// WoWCreatureFamily returns a creature family by ID.
-func (c *Client) WoWCreatureFamily(ctx context.Context, creatureFamilyID int) (*wowgd.CreatureFamily, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/creature-family/%d", creatureFamilyID),
- c.GetStaticNamespace(),
- &wowgd.CreatureFamily{},
- )
- return dat.(*wowgd.CreatureFamily), header, err
-}
-
-// WoWCreatureTypesIndex returns an index of creature types.
-func (c *Client) WoWCreatureTypesIndex(ctx context.Context) (*wowgd.CreatureTypesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/creature-type/index",
- c.GetStaticNamespace(),
- &wowgd.CreatureTypesIndex{},
- )
- return dat.(*wowgd.CreatureTypesIndex), header, err
-}
-
-// WoWCreatureType returns a creature type by ID.
-func (c *Client) WoWCreatureType(ctx context.Context, creatureTypeID int) (*wowgd.CreatureType, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/creature-type/%d", creatureTypeID),
- c.GetStaticNamespace(),
- &wowgd.CreatureType{},
- )
- return dat.(*wowgd.CreatureType), header, err
-}
-
-// WoWCreature returns a creature type by ID.
-func (c *Client) WoWCreature(ctx context.Context, creatureID int) (*wowgd.Creature, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/creature/%d", creatureID),
- c.GetStaticNamespace(),
- &wowgd.Creature{},
- )
- return dat.(*wowgd.Creature), header, err
-}
-
-// WoWCreatureDisplayMedia returns media for a creature display by ID.
-func (c *Client) WoWCreatureDisplayMedia(ctx context.Context, creatureDisplayID int) (*wowgd.CreatureDisplayMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/creature-display/%d", creatureDisplayID),
- c.GetStaticNamespace(),
- &wowgd.CreatureDisplayMedia{},
- )
- return dat.(*wowgd.CreatureDisplayMedia), header, err
-}
-
-// WoWCreatureFamilyMedia returns media for a creature family by ID.
-func (c *Client) WoWCreatureFamilyMedia(ctx context.Context, creatureFamilyID int) (*wowgd.CreatureFamilyMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/creature-family/%d", creatureFamilyID),
- c.GetStaticNamespace(),
- &wowgd.CreatureFamilyMedia{},
- )
- return dat.(*wowgd.CreatureFamilyMedia), header, err
-}
-
-// WoWGuildCrestComponentsIndex returns an index of guild crest media.
-func (c *Client) WoWGuildCrestComponentsIndex(ctx context.Context) (*wowgd.GuildCrestComponentsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/guild-crest/index",
- c.GetStaticNamespace(),
- &wowgd.GuildCrestComponentsIndex{},
- )
- return dat.(*wowgd.GuildCrestComponentsIndex), header, err
-}
-
-// WoWGuildCrestBorderMedia returns media for a guild crest border by ID.
-func (c *Client) WoWGuildCrestBorderMedia(ctx context.Context, borderID int) (*wowgd.GuildCrestBorderMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/guild-crest/border/%d", borderID),
- c.GetStaticNamespace(),
- &wowgd.GuildCrestBorderMedia{},
- )
- return dat.(*wowgd.GuildCrestBorderMedia), header, err
-}
-
-// WoWGuildCrestEmblemMedia returns media for a guild crest emblem by ID.
-func (c *Client) WoWGuildCrestEmblemMedia(ctx context.Context, emblemID int) (*wowgd.GuildCrestEmblemMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/guild-crest/emblem/%d", emblemID),
- c.GetStaticNamespace(),
- &wowgd.GuildCrestEmblemMedia{},
- )
- return dat.(*wowgd.GuildCrestEmblemMedia), header, err
-}
-
-// WoWItemClassesIndex returns an index of item classes.
-func (c *Client) WoWItemClassesIndex(ctx context.Context) (*wowgd.ItemClassesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/item-class/index",
- c.GetStaticNamespace(),
- &wowgd.ItemClassesIndex{},
- )
- return dat.(*wowgd.ItemClassesIndex), header, err
-}
-
-// WoWItemClass returns an item class by ID.
-func (c *Client) WoWItemClass(ctx context.Context, itemClassID int) (*wowgd.ItemClass, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/item-class/%d", itemClassID),
- c.GetStaticNamespace(),
- &wowgd.ItemClass{},
- )
- return dat.(*wowgd.ItemClass), header, err
-}
-
-// WoWItemSetsIndex returns an index of item sets.
-func (c *Client) WoWItemSetsIndex(ctx context.Context) (*wowgd.ItemSetsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/item-set/index",
- c.GetStaticNamespace(),
- &wowgd.ItemSetsIndex{},
- )
- return dat.(*wowgd.ItemSetsIndex), header, err
-}
-
-// WoWItemSet returns an item set by ID.
-func (c *Client) WoWItemSet(ctx context.Context, itemSetID int) (*wowgd.ItemSet, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/item-set/%d", itemSetID),
- c.GetStaticNamespace(),
- &wowgd.ItemSet{},
- )
- return dat.(*wowgd.ItemSet), header, err
-}
-
-// WoWItemSubclass returns an item subclass by ID.
-func (c *Client) WoWItemSubclass(ctx context.Context, itemClassID, itemSubclassID int) (*wowgd.ItemSubclass, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/item-class/%d/item-subclass/%d", itemClassID, itemSubclassID),
- c.GetStaticNamespace(),
- &wowgd.ItemSubclass{},
- )
- return dat.(*wowgd.ItemSubclass), header, err
-}
-
-// WoWItem returns an item by ID.
-func (c *Client) WoWItem(ctx context.Context, itemID int) (*wowgd.Item, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/item/%d", itemID),
- c.GetStaticNamespace(),
- &wowgd.Item{},
- )
- return dat.(*wowgd.Item), header, err
-}
-
-// WoWItemMedia returns media for an item by ID.
-func (c *Client) WoWItemMedia(ctx context.Context, itemID int) (*wowgd.ItemMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/item/%d", itemID),
- c.GetStaticNamespace(),
- &wowgd.ItemMedia{},
- )
- return dat.(*wowgd.ItemMedia), header, err
-}
-
-// WoWJournalExpansionsIndex returns an index of journal expansions.
-func (c *Client) WoWJournalExpansionsIndex(ctx context.Context) (*wowgd.JournalExpansionsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/journal-expansion/index",
- c.GetStaticNamespace(),
- &wowgd.JournalExpansionsIndex{},
- )
- return dat.(*wowgd.JournalExpansionsIndex), header, err
-}
-
-// WoWJournalExpansion returns a journal expansion by ID.
-func (c *Client) WoWJournalExpansion(ctx context.Context, journalExpansionID int) (*wowgd.JournalExpansion, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/journal-expansion/%d", journalExpansionID),
- c.GetStaticNamespace(),
- &wowgd.JournalExpansion{},
- )
- return dat.(*wowgd.JournalExpansion), header, err
-}
-
-// WoWJournalEncountersIndex returns an index of journal encounters.
-func (c *Client) WoWJournalEncountersIndex(ctx context.Context) (*wowgd.JournalEncountersIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/journal-encounter/index",
- c.GetStaticNamespace(),
- &wowgd.JournalEncountersIndex{},
- )
- return dat.(*wowgd.JournalEncountersIndex), header, err
-}
-
-// WoWJournalEncounter returns a journal expansion by ID.
-func (c *Client) WoWJournalEncounter(ctx context.Context, journalEncounterID int) (*wowgd.JournalEncounter, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/journal-encounter/%d", journalEncounterID),
- c.GetStaticNamespace(),
- &wowgd.JournalEncounter{},
- )
- return dat.(*wowgd.JournalEncounter), header, err
-}
-
-// WoWJournalInstancesIndex returns an index of journal instances.
-func (c *Client) WoWJournalInstancesIndex(ctx context.Context) (*wowgd.JournalInstancesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/journal-instance/index",
- c.GetStaticNamespace(),
- &wowgd.JournalInstancesIndex{},
- )
- return dat.(*wowgd.JournalInstancesIndex), header, err
-}
-
-// WoWJournalInstance returns a journal instance.
-func (c *Client) WoWJournalInstance(ctx context.Context, journalInstanceID int) (*wowgd.JournalInstance, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/journal-instance/%d", journalInstanceID),
- c.GetStaticNamespace(),
- &wowgd.JournalInstance{},
- )
- return dat.(*wowgd.JournalInstance), header, err
-}
-
-// WoWJournalInstanceMedia returns media for a journal instance by ID.
-func (c *Client) WoWJournalInstanceMedia(ctx context.Context, journalInstanceID int) (*wowgd.JournalInstanceMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/journal-instance/%d", journalInstanceID),
- c.GetStaticNamespace(),
- &wowgd.JournalInstanceMedia{},
- )
- return dat.(*wowgd.JournalInstanceMedia), header, err
-}
-
-// WoWModifiedCraftingIndex returns the parent index for Modified Crafting.
-func (c *Client) WoWModifiedCraftingIndex(ctx context.Context) (*wowgd.ModifiedCraftingIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/modified-crafting/index",
- c.GetStaticNamespace(),
- &wowgd.ModifiedCraftingIndex{},
- )
- return dat.(*wowgd.ModifiedCraftingIndex), header, err
-}
-
-// WoWModifiedCraftingCategoryIndex returns the index of Modified Crafting categories.
-func (c *Client) WoWModifiedCraftingCategoryIndex(ctx context.Context) (*wowgd.ModifiedCraftingCategoryIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/modified-crafting/category/index",
- c.GetStaticNamespace(),
- &wowgd.ModifiedCraftingCategoryIndex{},
- )
- return dat.(*wowgd.ModifiedCraftingCategoryIndex), header, err
-}
-
-// WoWModifiedCraftingCategory returns a Modified Crafting category by ID.
-func (c *Client) WoWModifiedCraftingCategory(ctx context.Context, categoryID int) (*wowgd.ModifiedCraftingCategory, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/modified-crafting/category/%d", categoryID),
- c.GetStaticNamespace(),
- &wowgd.ModifiedCraftingCategory{},
- )
- return dat.(*wowgd.ModifiedCraftingCategory), header, err
-}
-
-// WoWModifiedCraftingReagentSlotTypeIndex returns the index of Modified Crafting reagent slot types.
-func (c *Client) WoWModifiedCraftingReagentSlotTypeIndex(ctx context.Context) (*wowgd.ModifiedCraftingReagentSlotTypeIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/modified-crafting/reagent-slot-type/index",
- c.GetStaticNamespace(),
- &wowgd.ModifiedCraftingReagentSlotTypeIndex{},
- )
- return dat.(*wowgd.ModifiedCraftingReagentSlotTypeIndex), header, err
-}
-
-// WoWModifiedCraftingReagentSlotType returns a Modified Crafting reagent slot type by ID.
-func (c *Client) WoWModifiedCraftingReagentSlotType(ctx context.Context,
- slotTypeID int) (*wowgd.ModifiedCraftingReagentSlotType, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/modified-crafting/reagent-slot-type/%d", slotTypeID),
- c.GetStaticNamespace(),
- &wowgd.ModifiedCraftingReagentSlotType{},
- )
- return dat.(*wowgd.ModifiedCraftingReagentSlotType), header, err
-}
-
-// WoWMountIndex returns an index of mounts.
-func (c *Client) WoWMountIndex(ctx context.Context) (*wowgd.MountIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/mount/index",
- c.GetStaticNamespace(),
- &wowgd.MountIndex{},
- )
- return dat.(*wowgd.MountIndex), header, err
-}
-
-// WoWMount returns a mount by ID.
-func (c *Client) WoWMount(ctx context.Context, mountID int) (*wowgd.Mount, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/mount/%d", mountID),
- c.GetStaticNamespace(),
- &wowgd.Mount{},
- )
- return dat.(*wowgd.Mount), header, err
-}
-
-// WoWMythicKeystoneAffixIndex returns an index of Keystone affixes
-func (c *Client) WoWMythicKeystoneAffixIndex(ctx context.Context) (*wowgd.MythicKeystoneAffixIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/keystone-affix/index",
- c.GetStaticNamespace(),
- &wowgd.MythicKeystoneAffixIndex{},
- )
- return dat.(*wowgd.MythicKeystoneAffixIndex), header, err
-}
-
-// WoWMythicKeystoneAffix returns a single connected realm by ID
-func (c *Client) WoWMythicKeystoneAffix(ctx context.Context, keystoneAffixID int) (*wowgd.MythicKeystoneAffix, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/keystone-affix/%d", keystoneAffixID),
- c.GetStaticNamespace(),
- &wowgd.MythicKeystoneAffix{},
- )
- return dat.(*wowgd.MythicKeystoneAffix), header, err
-}
-
-// WoWMythicKeystoneAffixMedia returns media for a mythic keystone affix by ID.
-func (c *Client) WoWMythicKeystoneAffixMedia(ctx context.Context, keystoneAffixID int) (*wowgd.MythicKeystoneAffixMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/keystone-affix/%d", keystoneAffixID),
- c.GetStaticNamespace(),
- &wowgd.MythicKeystoneAffixMedia{},
- )
- return dat.(*wowgd.MythicKeystoneAffixMedia), header, err
-}
-
-// WoWMythicKeystoneDungeonIndex returns an index of Mythic Keystone dungeons
-func (c *Client) WoWMythicKeystoneDungeonIndex(ctx context.Context) (*wowgd.MythicKeystoneDungeonIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/mythic-keystone/dungeon/index",
- c.GetDynamicNamespace(),
- &wowgd.MythicKeystoneDungeonIndex{},
- )
- return dat.(*wowgd.MythicKeystoneDungeonIndex), header, err
-}
-
-// WoWMythicKeystoneDungeon returns a Mythic Keystone dungeon by ID
-func (c *Client) WoWMythicKeystoneDungeon(ctx context.Context, dungeonID int) (*wowgd.MythicKeystoneDungeon, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/mythic-keystone/dungeon/%d", dungeonID),
- c.GetDynamicNamespace(),
- &wowgd.MythicKeystoneDungeon{},
- )
- return dat.(*wowgd.MythicKeystoneDungeon), header, err
-}
-
-// WoWMythicKeystoneIndex returns n index of links to other documents related to Mythic Keystone dungeons
-func (c *Client) WoWMythicKeystoneIndex(ctx context.Context) (*wowgd.MythicKeystoneIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/mythic-keystone/index",
- c.GetDynamicNamespace(),
- &wowgd.MythicKeystoneIndex{},
- )
- return dat.(*wowgd.MythicKeystoneIndex), header, err
-}
-
-// WoWMythicKeystonePeriodIndex returns an index of Mythic Keystone periods
-func (c *Client) WoWMythicKeystonePeriodIndex(ctx context.Context) (*wowgd.MythicKeystonePeriodIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/mythic-keystone/period/index",
- c.GetDynamicNamespace(),
- &wowgd.MythicKeystonePeriodIndex{},
- )
- return dat.(*wowgd.MythicKeystonePeriodIndex), header, err
-}
-
-// WoWMythicKeystonePeriod returns a Mythic Keystone period by ID
-func (c *Client) WoWMythicKeystonePeriod(ctx context.Context, periodID int) (*wowgd.MythicKeystonePeriod, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/mythic-keystone/period/%d", periodID),
- c.GetDynamicNamespace(),
- &wowgd.MythicKeystonePeriod{},
- )
- return dat.(*wowgd.MythicKeystonePeriod), header, err
-}
-
-// WoWMythicKeystoneSeasonIndex returns an index of Mythic Keystone seasons
-func (c *Client) WoWMythicKeystoneSeasonIndex(ctx context.Context) (*wowgd.MythicKeystoneSeasonIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/mythic-keystone/season/index",
- c.GetDynamicNamespace(),
- &wowgd.MythicKeystoneSeasonIndex{},
- )
- return dat.(*wowgd.MythicKeystoneSeasonIndex), header, err
-}
-
-// WoWMythicKeystoneSeason returns a Mythic Keystone season by ID
-func (c *Client) WoWMythicKeystoneSeason(ctx context.Context, seasonID int) (*wowgd.MythicKeystoneSeason, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/mythic-keystone/season/%d", seasonID),
- c.GetDynamicNamespace(),
- &wowgd.MythicKeystoneSeason{},
- )
- return dat.(*wowgd.MythicKeystoneSeason), header, err
-}
-
-// WoWMythicKeystoneLeaderboardIndex returns an index of Mythic Keystone Leaderboard dungeon instances for a connected realm
-func (c *Client) WoWMythicKeystoneLeaderboardIndex(ctx context.Context,
- connectedRealmID int) (*wowgd.MythicKeystoneLeaderboardIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/connected-realm/%d/mythic-leaderboard/index", connectedRealmID),
- c.GetDynamicNamespace(),
- &wowgd.MythicKeystoneLeaderboardIndex{},
- )
- return dat.(*wowgd.MythicKeystoneLeaderboardIndex), header, err
-}
-
-// WoWMythicKeystoneLeaderboard returns a weekly Mythic Keystone Leaderboard by period
-func (c *Client) WoWMythicKeystoneLeaderboard(ctx context.Context,
- connectedRealmID, dungeonID, period int) (*wowgd.MythicKeystoneLeaderboard, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/connected-realm/%d/mythic-leaderboard/%d/period/%d",
- connectedRealmID, dungeonID, period),
- c.GetDynamicNamespace(),
- &wowgd.MythicKeystoneLeaderboard{},
- )
- return dat.(*wowgd.MythicKeystoneLeaderboard), header, err
-}
-
-// WoWMythicRaidLeaderboard returns the leaderboard for a given raid and faction
-func (c *Client) WoWMythicRaidLeaderboard(ctx context.Context, raid, faction string) (*wowgd.MythicRaidLeaderboard, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/leaderboard/hall-of-fame/%s/%s", raid, faction),
- c.GetDynamicNamespace(),
- &wowgd.MythicRaidLeaderboard{},
- )
- return dat.(*wowgd.MythicRaidLeaderboard), header, err
-}
-
-// WoWPetIndex returns an index of pets.
-func (c *Client) WoWPetIndex(ctx context.Context) (*wowgd.PetIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/pet/index",
- c.GetStaticNamespace(),
- &wowgd.PetIndex{},
- )
- return dat.(*wowgd.PetIndex), header, err
-}
-
-// WoWPet returns a pet by ID.
-func (c *Client) WoWPet(ctx context.Context, petID int) (*wowgd.Pet, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/pet/%d", petID),
- c.GetStaticNamespace(),
- &wowgd.Pet{},
- )
- return dat.(*wowgd.Pet), header, err
-}
-
-// WoWPetMedia returns media information for a pet ID.
-func (c *Client) WoWPetMedia(ctx context.Context, petID int) (*wowgd.PetMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/pet/%d", petID),
- c.GetStaticNamespace(),
- &wowgd.PetMedia{},
- )
- return dat.(*wowgd.PetMedia), header, err
-}
-
-// WoWPetAbilityIndex returns an index of pet abilities.
-func (c *Client) WoWPetAbilityIndex(ctx context.Context) (*wowgd.PetAbilityIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/pet-ability/index",
- c.GetStaticNamespace(),
- &wowgd.PetAbilityIndex{},
- )
- return dat.(*wowgd.PetAbilityIndex), header, err
-}
-
-// WoWPetAbility returns a pet ability by ID.
-func (c *Client) WoWPetAbility(ctx context.Context, petAbilityID int) (*wowgd.PetAbility, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/pet-ability/%d", petAbilityID),
- c.GetStaticNamespace(),
- &wowgd.PetAbility{},
- )
- return dat.(*wowgd.PetAbility), header, err
-}
-
-// WoWPetAbilityMedia returns media information for a pet ID.
-func (c *Client) WoWPetAbilityMedia(ctx context.Context, petAbilityID int) (*wowgd.PetMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/pet-ability/%d", petAbilityID),
- c.GetStaticNamespace(),
- &wowgd.PetMedia{},
- )
- return dat.(*wowgd.PetMedia), header, err
-}
-
-// WoWPlayableClassesIndex returns an index of playable classes
-func (c *Client) WoWPlayableClassesIndex(ctx context.Context) (*wowgd.PlayableClassesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/playable-class/index",
- c.GetStaticNamespace(),
- &wowgd.PlayableClassesIndex{},
- )
- return dat.(*wowgd.PlayableClassesIndex), header, err
-}
-
-// WoWPlayableClass returns a playable class by ID
-func (c *Client) WoWPlayableClass(ctx context.Context, classID int) (*wowgd.PlayableClass, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/playable-class/%d", classID),
- c.GetStaticNamespace(),
- &wowgd.PlayableClass{},
- )
- return dat.(*wowgd.PlayableClass), header, err
-}
-
-// WoWPlayableClassMedia returns media for a playable class by ID.
-func (c *Client) WoWPlayableClassMedia(ctx context.Context, classID int) (*wowgd.PlayableClassMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/playable-class/%d", classID),
- c.GetStaticNamespace(),
- &wowgd.PlayableClassMedia{},
- )
- return dat.(*wowgd.PlayableClassMedia), header, err
-}
-
-// WoWPlayableClassPvPTalentSlots returns the PvP talent slots for a playable class by ID
-func (c *Client) WoWPlayableClassPvPTalentSlots(ctx context.Context, classID int) (*wowgd.PlayableClassPvPTalentSlots, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/playable-class/%d/pvp-talent-slots", classID),
- c.GetStaticNamespace(),
- &wowgd.PlayableClassPvPTalentSlots{},
- )
- return dat.(*wowgd.PlayableClassPvPTalentSlots), header, err
-}
-
-// WoWPlayableRacesIndex returns an index of races.
-func (c *Client) WoWPlayableRacesIndex(ctx context.Context) (*wowgd.PlayableRacesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/playable-race/index",
- c.GetStaticNamespace(),
- &wowgd.PlayableRacesIndex{},
- )
- return dat.(*wowgd.PlayableRacesIndex), header, err
-}
-
-// WoWPlayableRace returns a race by ID.
-func (c *Client) WoWPlayableRace(ctx context.Context, raceID int) (*wowgd.PlayableRace, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/playable-race/%d", raceID),
- c.GetStaticNamespace(),
- &wowgd.PlayableRace{},
- )
- return dat.(*wowgd.PlayableRace), header, err
-}
-
-// WoWPlayableSpecializationIndex returns an index of playable specializations.
-func (c *Client) WoWPlayableSpecializationIndex(ctx context.Context) (*wowgd.PlayableSpecializationIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/playable-specialization/index",
- c.GetStaticNamespace(),
- &wowgd.PlayableSpecializationIndex{},
- )
- return dat.(*wowgd.PlayableSpecializationIndex), header, err
-}
-
-// WoWPlayableSpecialization returns a playable specialization by ID.
-func (c *Client) WoWPlayableSpecialization(ctx context.Context, specID int) (*wowgd.PlayableSpecialization, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/playable-specialization/%d", specID),
- c.GetStaticNamespace(),
- &wowgd.PlayableSpecialization{},
- )
- return dat.(*wowgd.PlayableSpecialization), header, err
-}
-
-// WoWPlayableSpecializationMedia returns media for a playable specialization by ID.
-func (c *Client) WoWPlayableSpecializationMedia(ctx context.Context, specID int) (*wowgd.PlayableSpecializationMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/playable-specialization/%d", specID),
- c.GetStaticNamespace(),
- &wowgd.PlayableSpecializationMedia{},
- )
- return dat.(*wowgd.PlayableSpecializationMedia), header, err
-}
-
-// WoWPowerTypesIndex returns an index of power types.
-func (c *Client) WoWPowerTypesIndex(ctx context.Context) (*wowgd.PowerTypesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/power-type/index",
- c.GetStaticNamespace(),
- &wowgd.PowerTypesIndex{},
- )
- return dat.(*wowgd.PowerTypesIndex), header, err
-}
-
-// WoWPowerType returns a power type by ID.
-func (c *Client) WoWPowerType(ctx context.Context, powerTypeID int) (*wowgd.PowerType, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/power-type/%d", powerTypeID),
- c.GetStaticNamespace(),
- &wowgd.PowerType{},
- )
- return dat.(*wowgd.PowerType), header, err
-}
-
-// WoWProfessionsIndex returns an index of professions.
-func (c *Client) WoWProfessionsIndex(ctx context.Context) (*wowgd.ProfessionsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/profession/index",
- c.GetStaticNamespace(),
- &wowgd.ProfessionsIndex{},
- )
- return dat.(*wowgd.ProfessionsIndex), header, err
-}
-
-// WoWProfession returns a profession by ID.
-func (c *Client) WoWProfession(ctx context.Context, professionID int) (*wowgd.Profession, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/profession/%d", professionID),
- c.GetStaticNamespace(),
- &wowgd.Profession{},
- )
- return dat.(*wowgd.Profession), header, err
-}
-
-// WoWProfessionMedia returns media for a profession by ID.
-func (c *Client) WoWProfessionMedia(ctx context.Context, professionID int) (*wowgd.ProfessionMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/profession/%d", professionID),
- c.GetStaticNamespace(),
- &wowgd.ProfessionMedia{},
- )
- return dat.(*wowgd.ProfessionMedia), header, err
-}
-
-// WoWProfessionSkillTier returns a skill tier for a profession by ID.
-func (c *Client) WoWProfessionSkillTier(ctx context.Context, professionID, skillTierID int) (*wowgd.ProfessionSkillTier, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/profession/%d/skill-tier/%d", professionID, skillTierID),
- c.GetStaticNamespace(),
- &wowgd.ProfessionSkillTier{},
- )
- return dat.(*wowgd.ProfessionSkillTier), header, err
-}
-
-// WoWRecipe returns a recipe by ID.
-func (c *Client) WoWRecipe(ctx context.Context, recipeID int) (*wowgd.Recipe, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/recipe/%d", recipeID),
- c.GetStaticNamespace(),
- &wowgd.Recipe{},
- )
- return dat.(*wowgd.Recipe), header, err
-}
-
-// WoWRecipeMedia returns media for a recipe by ID.
-func (c *Client) WoWRecipeMedia(ctx context.Context, recipeID int) (*wowgd.RecipeMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/recipe/%d", recipeID),
- c.GetStaticNamespace(),
- &wowgd.RecipeMedia{},
- )
- return dat.(*wowgd.RecipeMedia), header, err
-}
-
-// WoWPvPSeasonIndex returns an index of PvP seasons.
-func (c *Client) WoWPvPSeasonIndex(ctx context.Context) (*wowgd.PvPSeasonIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/pvp-season/index",
- c.GetDynamicNamespace(),
- &wowgd.PvPSeasonIndex{},
- )
- return dat.(*wowgd.PvPSeasonIndex), header, err
-}
-
-// WoWPvPSeason returns a PvP season by ID.
-func (c *Client) WoWPvPSeason(ctx context.Context, pvpSeasonID int) (*wowgd.PvPSeason, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/pvp-season/%d", pvpSeasonID),
- c.GetDynamicNamespace(),
- &wowgd.PvPSeason{},
- )
- return dat.(*wowgd.PvPSeason), header, err
-}
-
-// WoWPvPLeaderboardsIndex returns an index of PvP leaderboards for a PvP season.
-func (c *Client) WoWPvPLeaderboardsIndex(ctx context.Context, pvpSeasonID int) (*wowgd.PvPLeaderboardsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/pvp-season/%d/pvp-leaderboard/index", pvpSeasonID),
- c.GetDynamicNamespace(),
- &wowgd.PvPLeaderboardsIndex{},
- )
- return dat.(*wowgd.PvPLeaderboardsIndex), header, err
-}
-
-// WoWPvPLeaderboard returns the PvP leaderboard of a specific PvP bracket for a PvP season.
-func (c *Client) WoWPvPLeaderboard(ctx context.Context, pvpSeasonID int, pvpBracket wowgd.Bracket) (*wowgd.PvPLeaderboard, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/pvp-season/%d/pvp-leaderboard/%s", pvpSeasonID, pvpBracket),
- c.GetDynamicNamespace(),
- &wowgd.PvPLeaderboard{},
- )
- return dat.(*wowgd.PvPLeaderboard), header, err
-}
-
-// WoWPvPRewardsIndex returns an index of PvP rewards for a PvP season.
-func (c *Client) WoWPvPRewardsIndex(ctx context.Context, pvpSeasonID int) (*wowgd.PvPRewardsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/pvp-season/%d/pvp-reward/index", pvpSeasonID),
- c.GetDynamicNamespace(),
- &wowgd.PvPRewardsIndex{},
- )
- return dat.(*wowgd.PvPRewardsIndex), header, err
-}
-
-// WoWPvPTierMedia returns media for a PvP tier by ID.
-func (c *Client) WoWPvPTierMedia(ctx context.Context, pvpTierID int) (*wowgd.PvPTierMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/pvp-tier/%d", pvpTierID),
- c.GetStaticNamespace(),
- &wowgd.PvPTierMedia{},
- )
- return dat.(*wowgd.PvPTierMedia), header, err
-}
-
-// WoWPvPTiersIndex returns an index of PvP tiers.
-func (c *Client) WoWPvPTiersIndex(ctx context.Context) (*wowgd.PvPTiersIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/pvp-tier/index",
- c.GetStaticNamespace(),
- &wowgd.PvPTiersIndex{},
- )
- return dat.(*wowgd.PvPTiersIndex), header, err
-}
-
-// WoWPvPTier returns a PvP tier by ID.
-func (c *Client) WoWPvPTier(ctx context.Context, pvpTierID int) (*wowgd.PvPTier, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/pvp-tier/%d", pvpTierID),
- c.GetStaticNamespace(),
- &wowgd.PvPTier{},
- )
- return dat.(*wowgd.PvPTier), header, err
-}
-
-// WoWQuestsIndex returns the parent index for quests.
-func (c *Client) WoWQuestsIndex(ctx context.Context) (*wowgd.QuestsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/quest/index",
- c.GetStaticNamespace(),
- &wowgd.QuestsIndex{},
- )
- return dat.(*wowgd.QuestsIndex), header, err
-}
-
-// WoWQuest returns a quest by ID.
-func (c *Client) WoWQuest(ctx context.Context, questID int) (*wowgd.Quest, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/quest/%d", questID),
- c.GetStaticNamespace(),
- &wowgd.Quest{},
- )
- return dat.(*wowgd.Quest), header, err
-}
-
-// WoWQuestCategoriesIndex returns an index of quest categories (such as quests for a specific class, profession, or storyline).
-func (c *Client) WoWQuestCategoriesIndex(ctx context.Context) (*wowgd.QuestCategoriesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/quest/category/index",
- c.GetStaticNamespace(),
- &wowgd.QuestCategoriesIndex{},
- )
- return dat.(*wowgd.QuestCategoriesIndex), header, err
-}
-
-// WoWQuestCategory returns a quest category by ID.
-func (c *Client) WoWQuestCategory(ctx context.Context, questCategoryID int) (*wowgd.QuestCategory, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/quest/category/%d", questCategoryID),
- c.GetStaticNamespace(),
- &wowgd.QuestCategory{},
- )
- return dat.(*wowgd.QuestCategory), header, err
-}
-
-// WoWQuestAreasIndex returns an index of quest areas.
-func (c *Client) WoWQuestAreasIndex(ctx context.Context) (*wowgd.QuestAreasIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/quest/area/index",
- c.GetStaticNamespace(),
- &wowgd.QuestAreasIndex{},
- )
- return dat.(*wowgd.QuestAreasIndex), header, err
-}
-
-// WoWQuestArea returns a quest area by ID.
-func (c *Client) WoWQuestArea(ctx context.Context, questAreaID int) (*wowgd.QuestArea, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/quest/area/%d", questAreaID),
- c.GetStaticNamespace(),
- &wowgd.QuestArea{},
- )
- return dat.(*wowgd.QuestArea), header, err
-}
-
-// WoWQuestTypesIndex returns an index of quest types (such as PvP quests, raid quests, or account quests).
-func (c *Client) WoWQuestTypesIndex(ctx context.Context) (*wowgd.QuestTypesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/quest/type/index",
- c.GetStaticNamespace(),
- &wowgd.QuestTypesIndex{},
- )
- return dat.(*wowgd.QuestTypesIndex), header, err
-}
-
-// WoWQuestType returns a quest type by ID.
-func (c *Client) WoWQuestType(ctx context.Context, questTypeID int) (*wowgd.QuestType, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/quest/type/%d", questTypeID),
- c.GetStaticNamespace(),
- &wowgd.QuestType{},
- )
- return dat.(*wowgd.QuestType), header, err
-}
-
-// WoWRealmIndex returns an index of realms.
-func (c *Client) WoWRealmIndex(ctx context.Context) (*wowgd.RealmIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/realm/index",
- c.GetDynamicNamespace(),
- &wowgd.RealmIndex{},
- )
- return dat.(*wowgd.RealmIndex), header, err
-}
-
-// WoWRealm returns a single realm by slug or ID.
-func (c *Client) WoWRealm(ctx context.Context, realmSlug string) (*wowgd.Realm, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/realm/%s", realmSlug),
- c.GetDynamicNamespace(),
- &wowgd.Realm{},
- )
- return dat.(*wowgd.Realm), header, err
-}
-
-// WoWRegionIndex returns an index of regions.
-func (c *Client) WoWRegionIndex(ctx context.Context) (*wowgd.RegionIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/region/index",
- c.GetDynamicNamespace(),
- &wowgd.RegionIndex{},
- )
- return dat.(*wowgd.RegionIndex), header, err
-}
-
-// WoWRegion returns a single region by ID.
-func (c *Client) WoWRegion(ctx context.Context, regionID int) (*wowgd.Region, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/region/%d", regionID),
- c.GetDynamicNamespace(),
- &wowgd.Region{},
- )
- return dat.(*wowgd.Region), header, err
-}
-
-// WoWReputationFactionsIndex returns an index of reputation factions.
-func (c *Client) WoWReputationFactionsIndex(ctx context.Context) (*wowgd.ReputationFactionsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/reputation-faction/index",
- c.GetStaticNamespace(),
- &wowgd.ReputationFactionsIndex{},
- )
- return dat.(*wowgd.ReputationFactionsIndex), header, err
-}
-
-// WoWReputationFaction returns a single reputation faction by ID.
-func (c *Client) WoWReputationFaction(ctx context.Context, reputationFactionID int) (*wowgd.ReputationFaction, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/pvp-tier/%d", reputationFactionID),
- c.GetStaticNamespace(),
- &wowgd.ReputationFaction{},
- )
- return dat.(*wowgd.ReputationFaction), header, err
-}
-
-// WoWReputationTiersIndex returns an index of reputation tiers.
-func (c *Client) WoWReputationTiersIndex(ctx context.Context) (*wowgd.ReputationTiersIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/reputation-tiers/index",
- c.GetStaticNamespace(),
- &wowgd.ReputationTiersIndex{},
- )
- return dat.(*wowgd.ReputationTiersIndex), header, err
-}
-
-// WoWReputationTiers returns a single set of reputation tiers by ID.
-func (c *Client) WoWReputationTiers(ctx context.Context, reputationTiersID int) (*wowgd.ReputationTiers, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/reputation-tiers/%d", reputationTiersID),
- c.GetStaticNamespace(),
- &wowgd.ReputationTiers{},
- )
- return dat.(*wowgd.ReputationTiers), header, err
-}
-
-// WoWSpell returns a spell by ID.
-func (c *Client) WoWSpell(ctx context.Context, spellID int) (*wowgd.Spell, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/spell/%d", spellID),
- c.GetStaticNamespace(),
- &wowgd.Spell{},
- )
- return dat.(*wowgd.Spell), header, err
-}
-
-// WoWSpellMedia returns media for a spell by ID.
-func (c *Client) WoWSpellMedia(ctx context.Context, spellID int) (*wowgd.SpellMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/spell/%d", spellID),
- c.GetStaticNamespace(),
- &wowgd.SpellMedia{},
- )
- return dat.(*wowgd.SpellMedia), header, err
-}
-
-// WoWTalentsIndex returns an index of talents.
-func (c *Client) WoWTalentsIndex(ctx context.Context) (*wowgd.TalentsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/talent/",
- c.GetStaticNamespace(),
- &wowgd.TalentsIndex{},
- )
- return dat.(*wowgd.TalentsIndex), header, err
-}
-
-// WoWTalent returns a talent by ID.
-func (c *Client) WoWTalent(ctx context.Context, talentID int) (*wowgd.Talent, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/talent/%d", talentID),
- c.GetStaticNamespace(),
- &wowgd.Talent{},
- )
- return dat.(*wowgd.Talent), header, err
-}
-
-// WoWPvPTalentsIndex returns an index of PvP talents.
-func (c *Client) WoWPvPTalentsIndex(ctx context.Context) (*wowgd.PvPTalentsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/pvp-talent/",
- c.GetStaticNamespace(),
- &wowgd.PvPTalentsIndex{},
- )
- return dat.(*wowgd.PvPTalentsIndex), header, err
-}
-
-// WoWPvPTalent returns a PvP talent by ID.
-func (c *Client) WoWPvPTalent(ctx context.Context, pvpTalentID int) (*wowgd.PvPTalent, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/pvp-talent/%d", pvpTalentID),
- c.GetStaticNamespace(),
- &wowgd.PvPTalent{},
- )
- return dat.(*wowgd.PvPTalent), header, err
-}
-
-// WoWTechTalentTreeIndex returns an index of tech talent trees.
-func (c *Client) WoWTechTalentTreeIndex(ctx context.Context) (*wowgd.TechTalentTreeIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/tech-talent-tree/index",
- c.GetStaticNamespace(),
- &wowgd.TechTalentTreeIndex{},
- )
- return dat.(*wowgd.TechTalentTreeIndex), header, err
-}
-
-// WoWTechTalentTree returns a tech talent tree by ID.
-func (c *Client) WoWTechTalentTree(ctx context.Context, techTalentTreeID int) (*wowgd.TechTalentTree, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/tech-talent-tree/%d", techTalentTreeID),
- c.GetStaticNamespace(),
- &wowgd.TechTalentTree{},
- )
- return dat.(*wowgd.TechTalentTree), header, err
-}
-
-// WoWTechTalentIndex returns an index of tech talents.
-func (c *Client) WoWTechTalentIndex(ctx context.Context) (*wowgd.TechTalentIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/tech-talent/index",
- c.GetStaticNamespace(),
- &wowgd.TechTalentIndex{},
- )
- return dat.(*wowgd.TechTalentIndex), header, err
-}
-
-// WoWTechTalent returns a tech talent by ID.
-func (c *Client) WoWTechTalent(ctx context.Context, techTalentID int) (*wowgd.TechTalent, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/tech-talent/%d", techTalentID),
- c.GetStaticNamespace(),
- &wowgd.TechTalent{},
- )
- return dat.(*wowgd.TechTalent), header, err
-}
-
-// WoWTechTalentMedia returns media for a tech talent by ID.
-func (c *Client) WoWTechTalentMedia(ctx context.Context, techTalentID int) (*wowgd.TechTalentMedia, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/media/tech-talent/%d", techTalentID),
- c.GetStaticNamespace(),
- &wowgd.TechTalentMedia{},
- )
- return dat.(*wowgd.TechTalentMedia), header, err
-}
-
-// WoWTitlesIndex returns an index of titles.
-func (c *Client) WoWTitlesIndex(ctx context.Context) (*wowgd.TitlesIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/title/index",
- c.GetStaticNamespace(),
- &wowgd.TitlesIndex{},
- )
- return dat.(*wowgd.TitlesIndex), header, err
-}
-
-// WoWTitle returns a title by ID.
-func (c *Client) WoWTitle(ctx context.Context, titleID int) (*wowgd.Title, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/title/%d", titleID),
- c.GetStaticNamespace(),
- &wowgd.Title{},
- )
- return dat.(*wowgd.Title), header, err
-}
-
-// WoWToken returns the WoW Token index
-func (c *Client) WoWToken(ctx context.Context) (*wowgd.Token, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- "/data/wow/token/index",
- c.GetDynamicNamespace(),
- &wowgd.Token{},
- )
- return dat.(*wowgd.Token), header, err
-}
-
-// RealmSearch searches for realms
-func (c Client) RealmSearch(ctx context.Context, opts ...wowsearch.Opt) (*wowgd.RealmSearch, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/search/realm%s", buildSearchParams(opts...)),
- c.GetDynamicClassicNamespace(),
- &wowgd.RealmSearch{},
- )
- return dat.(*wowgd.RealmSearch), header, err
-}
-
-// ConnectedRealmSearch searches for connected realms
-func (c Client) ConnectedRealmSearch(ctx context.Context, opts ...wowsearch.Opt) (*wowgd.ConnectedRealmsSearch, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/search/connected-realm%s", buildSearchParams(opts...)),
- c.GetDynamicClassicNamespace(),
- &wowgd.ConnectedRealmsSearch{},
- )
- return dat.(*wowgd.ConnectedRealmsSearch), header, err
-}
diff --git a/v2/wowgd/achievement.go b/v2/wowgd/achievement.go
deleted file mode 100644
index 64e073b..0000000
--- a/v2/wowgd/achievement.go
+++ /dev/null
@@ -1,170 +0,0 @@
-package wowgd
-
-// AchievementCategoriesIndex structure
-type AchievementCategoriesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Categories []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"categories"`
- RootCategories []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"root_categories"`
- GuildCategories []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"guild_categories"`
-}
-
-// AchievementCategory structure
-type AchievementCategory struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Achievements []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"achievements"`
- Subcategories []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"subcategories"`
- IsGuildCategory bool `json:"is_guild_category"`
- AggregatesByFaction struct {
- Alliance struct {
- Quantity int `json:"quantity"`
- Points int `json:"points"`
- } `json:"alliance"`
- Horde struct {
- Quantity int `json:"quantity"`
- Points int `json:"points"`
- } `json:"horde"`
- } `json:"aggregates_by_faction"`
- DisplayOrder int `json:"display_order"`
-}
-
-// AchievementIndex structure
-type AchievementIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Achievements []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"achievements"`
-}
-
-// ChildCriteria struct used for representing nested Achievement criteria
-type ChildCriteria []struct {
- ID int `json:"id"`
- Description string `json:"description"`
- Amount int `json:"amount"`
- Faction struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"faction,omitempty"`
- Achievement struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"achievement,omitempty"`
- Operator struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"operator,omitempty"`
- ChildCriteria ChildCriteria `json:"child_criteria,omitempty"`
-}
-
-// Achievement structure
-type Achievement struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Category struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"category"`
- Name string `json:"name"`
- Description string `json:"description"`
- Points int `json:"points"`
- IsAccountWide bool `json:"is_account_wide"`
- Criteria struct {
- ID int `json:"id"`
- Description string `json:"description"`
- Amount int `json:"amount"`
- Faction struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"faction,omitempty"`
- Operator struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"operator"`
- ChildCriteria ChildCriteria `json:"child_criteria,omitempty"`
- } `json:"criteria"`
- RewardDescription string `json:"reward_description"`
- NextAchievement struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"next_achievement"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
- DisplayOrder int `json:"display_order"`
-}
-
-// AchievementMedia structure
-type AchievementMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- } `json:"assets"`
-}
diff --git a/v2/wowgd/auctionHouse.go b/v2/wowgd/auctionHouse.go
deleted file mode 100644
index d590945..0000000
--- a/v2/wowgd/auctionHouse.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package wowgd
-
-// AuctionHouse structure
-type AuctionHouse struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ConnectedRealm struct {
- Href string `json:"href"`
- } `json:"connected_realm"`
- Auctions []struct {
- ID int `json:"id"`
- Item struct {
- ID int `json:"id"`
- Context int `json:"context"`
- BonusLists []int `json:"bonus_lists"`
- Modifiers []struct {
- Type int `json:"type"`
- Value int `json:"value"`
- } `json:"modifiers"`
- PetBreedID int `json:"pet_breed_id"`
- PetLevel int `json:"pet_level"`
- PetQualityID int `json:"pet_quality_id"`
- PetSpeciesID int `json:"pet_species_id"`
- } `json:"item"`
- Buyout int `json:"buyout"`
- Quantity int `json:"quantity"`
- UnitPrice int `json:"unit_price"`
- TimeLeft TimeLeft `json:"time_left"`
- } `json:"auctions"`
-}
diff --git a/v2/wowgd/azeriteEssence.go b/v2/wowgd/azeriteEssence.go
deleted file mode 100644
index b29c6c0..0000000
--- a/v2/wowgd/azeriteEssence.go
+++ /dev/null
@@ -1,118 +0,0 @@
-package wowgd
-
-// AzeriteEssenceIndex structure
-type AzeriteEssenceIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- AzeriteEssences []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"azerite_essences"`
-}
-
-// AzeriteEssence structure
-type AzeriteEssence struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- AllowedSpecializations []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"allowed_specializations"`
- Powers []struct {
- ID int `json:"id"`
- Rank int `json:"rank"`
- MainPowerSpell struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"main_power_spell"`
- PassivePowerSpell struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"passive_power_spell"`
- } `json:"powers"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
-}
-
-// AzeriteEssenceSearch structure
-type AzeriteEssenceSearch struct {
- Page int `json:"page"`
- PageSize int `json:"pageSize"`
- MaxPageSize int `json:"maxPageSize"`
- PageCount int `json:"pageCount"`
- Results []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Data struct {
- AllowedSpecializations []struct {
- Name struct {
- ItIT string `json:"it_IT"`
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- ID int `json:"id"`
- } `json:"allowed_specializations"`
- Name struct {
- ItIT string `json:"it_IT"`
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- } `json:"data"`
- } `json:"results"`
-}
-
-// AzeriteEssenceMedia structure
-type AzeriteEssenceMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- } `json:"assets"`
-}
diff --git a/v2/wowgd/connectedRealm.go b/v2/wowgd/connectedRealm.go
deleted file mode 100644
index 5662511..0000000
--- a/v2/wowgd/connectedRealm.go
+++ /dev/null
@@ -1,178 +0,0 @@
-package wowgd
-
-// ConnectedRealmsIndex structure
-type ConnectedRealmsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ConnectedRealms []struct {
- Href string `json:"href"`
- } `json:"connected_realms"`
-}
-
-// ConnectedRealm structure
-type ConnectedRealm struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- HasQueue bool `json:"has_queue"`
- Status struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"status"`
- Population struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"population"`
- Realms []struct {
- ID int `json:"id"`
- Region struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"region"`
- ConnectedRealm struct {
- Href string `json:"href"`
- } `json:"connected_realm"`
- Name string `json:"name"`
- Category string `json:"category"`
- Locale string `json:"locale"`
- Timezone string `json:"timezone"`
- Type struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"type"`
- IsTournament bool `json:"is_tournament"`
- Slug string `json:"slug"`
- } `json:"realms"`
- MythicLeaderboards struct {
- Href string `json:"href"`
- } `json:"mythic_leaderboards"`
-}
-
-// ConnectedRealmsSearch structure
-type ConnectedRealmsSearch struct {
- Page int `json:"page"`
- PageSize int `json:"pageSize"`
- MaxPageSize int `json:"maxPageSize"`
- PageCount int `json:"pageCount"`
- Results []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Data struct {
- Realms []struct {
- IsTournament bool `json:"is_tournament"`
- Timezone string `json:"timezone"`
- Name struct {
- ItIT string `json:"it_IT"`
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- ID int `json:"id"`
- Region struct {
- Name struct {
- ItIT string `json:"it_IT"`
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- ID int `json:"id"`
- } `json:"region"`
- Category struct {
- ItIT string `json:"it_IT"`
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"category"`
- Locale string `json:"locale"`
- Type struct {
- Name struct {
- ItIT string `json:"it_IT"`
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- Type string `json:"type"`
- } `json:"type"`
- Slug string `json:"slug"`
- } `json:"realms"`
- ID int `json:"id"`
- HasQueue bool `json:"has_queue"`
- Status struct {
- Name struct {
- ItIT string `json:"it_IT"`
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- Type string `json:"type"`
- } `json:"status"`
- Population struct {
- Name struct {
- ItIT string `json:"it_IT"`
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- Type string `json:"type"`
- } `json:"population"`
- } `json:"data"`
- } `json:"results"`
-}
diff --git a/v2/wowgd/convenant.go b/v2/wowgd/convenant.go
deleted file mode 100644
index 826589e..0000000
--- a/v2/wowgd/convenant.go
+++ /dev/null
@@ -1,210 +0,0 @@
-package wowgd
-
-// CovenantsIndex structure
-type CovenantsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Covenants []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"covenants"`
-}
-
-// Covenant structure
-type Covenant struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Description string `json:"description"`
- SignatureAbility struct {
- ID int `json:"id"`
- SpellTooltip struct {
- Spell struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"spell"`
- Description string `json:"description"`
- CastTime string `json:"cast_time"`
- Cooldown string `json:"cooldown"`
- } `json:"spell_tooltip"`
- } `json:"signature_ability"`
- ClassAbilities []struct {
- ID int `json:"id"`
- PlayableClass struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"playable_class"`
- SpellTooltip struct {
- Spell struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"spell"`
- Description string `json:"description"`
- CastTime string `json:"cast_time"`
- PowerCost string `json:"power_cost"`
- Range string `json:"range"`
- Cooldown string `json:"cooldown"`
- } `json:"spell_tooltip,omitempty"`
- } `json:"class_abilities"`
- Soulbinds []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"soulbinds"`
- RenownRewards []struct {
- Level int `json:"level"`
- Reward struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"reward"`
- } `json:"renown_rewards"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
-}
-
-// CovenantMedia structure
-type CovenantMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- FileDataID int `json:"file_data_id"`
- } `json:"assets"`
-}
-
-// CovenantSoulbindsIndex structure
-type CovenantSoulbindsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Soulbinds []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"soulbinds"`
-}
-
-// CovenantSoulbind structure
-type CovenantSoulbind struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Covenant struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"covenant"`
- Creature struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"creature"`
- Follower struct {
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"follower"`
- TalentTree struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"talent_tree"`
-}
-
-// CovenantConduitsIndex structure
-type CovenantConduitsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Conduits []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"conduits"`
-}
-
-// CovenantConduit structure
-type CovenantConduit struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Item struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"item"`
- SocketType struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"socket_type"`
- Ranks []struct {
- ID int `json:"id"`
- Tier int `json:"tier"`
- SpellTooltip struct {
- Spell struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"spell"`
- Description string `json:"description"`
- CastTime string `json:"cast_time"`
- } `json:"spell_tooltip"`
- } `json:"ranks"`
-}
diff --git a/v2/wowgd/creature.go b/v2/wowgd/creature.go
deleted file mode 100644
index a4288e0..0000000
--- a/v2/wowgd/creature.go
+++ /dev/null
@@ -1,118 +0,0 @@
-package wowgd
-
-// CreatureFamiliesIndex structure
-type CreatureFamiliesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- CreatureFamilies []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"creature_families"`
-}
-
-// CreatureFamily structure
-type CreatureFamily struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
-}
-
-// CreatureTypesIndex structure
-type CreatureTypesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- CreatureTypes []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"creature_types"`
-}
-
-// CreatureType structure
-type CreatureType struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
-}
-
-// Creature structure
-type Creature struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Type struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"type"`
- Family struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"family"`
- CreatureDisplays []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- } `json:"creature_displays"`
- IsTameable bool `json:"is_tameable"`
-}
-
-// CreatureDisplayMedia structure
-type CreatureDisplayMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- } `json:"assets"`
-}
-
-// CreatureFamilyMedia structure
-type CreatureFamilyMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- } `json:"assets"`
-}
diff --git a/v2/wowgd/guildCrest.go b/v2/wowgd/guildCrest.go
deleted file mode 100644
index 5c49d44..0000000
--- a/v2/wowgd/guildCrest.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package wowgd
-
-// GuildCrestComponentsIndex structure
-type GuildCrestComponentsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Emblems []struct {
- ID int `json:"id"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- } `json:"media"`
- } `json:"emblems"`
- Borders []struct {
- ID int `json:"id"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- } `json:"media"`
- } `json:"borders"`
-}
-
-// GuildCrestBorderMedia structure
-type GuildCrestBorderMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- } `json:"assets"`
-}
-
-// GuildCrestEmblemMedia structure
-type GuildCrestEmblemMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- } `json:"assets"`
-}
diff --git a/v2/wowgd/item.go b/v2/wowgd/item.go
deleted file mode 100644
index a634410..0000000
--- a/v2/wowgd/item.go
+++ /dev/null
@@ -1,146 +0,0 @@
-package wowgd
-
-// ItemClassesIndex structure
-type ItemClassesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ItemClasses []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"item_classes"`
-}
-
-// ItemClass structure
-type ItemClass struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ClassID int `json:"class_id"`
- Name string `json:"name"`
- ItemSubclasses []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"item_subclasses"`
-}
-
-// ItemSetsIndex structure
-type ItemSetsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ItemSets []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"item_sets"`
-}
-
-// ItemSet structure
-type ItemSet struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Items []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"items"`
- Effects []struct {
- DisplayString string `json:"display_string"`
- RequiredCount int `json:"required_count"`
- } `json:"effects"`
- IsEffectActive bool `json:"is_effect_active"`
-}
-
-// ItemSubclass structure
-type ItemSubclass struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ClassID int `json:"class_id"`
- SubclassID int `json:"subclass_id"`
- DisplayName string `json:"display_name"`
- HideSubclassInTooltips bool `json:"hide_subclass_in_tooltips"`
-}
-
-// Item structure
-type Item struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Quality struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"quality"`
- Level int `json:"level"`
- RequiredLevel int `json:"required_level"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
- ItemClass struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"item_class"`
- ItemSubclass struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"item_subclass"`
- InventoryType struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"inventory_type"`
- PurchasePrice int `json:"purchase_price"`
- SellPrice int `json:"sell_price"`
- MaxCount int `json:"max_count"`
- IsEquippable bool `json:"is_equippable"`
- IsStackable bool `json:"is_stackable"`
-}
-
-// ItemMedia structure
-type ItemMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- } `json:"assets"`
-}
diff --git a/v2/wowgd/journal.go b/v2/wowgd/journal.go
deleted file mode 100644
index 215fa5e..0000000
--- a/v2/wowgd/journal.go
+++ /dev/null
@@ -1,209 +0,0 @@
-package wowgd
-
-// JournalExpansionsIndex structure
-type JournalExpansionsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Tiers []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Name string `json:"name"`
- } `json:"tiers"`
-}
-
-// JournalExpansion structure
-type JournalExpansion struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Dungeons []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Name string `json:"name"`
- } `json:"dungeons"`
- Raids []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Name string `json:"name"`
- } `json:"raids"`
-}
-
-// JournalEncountersIndex structure
-type JournalEncountersIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Encounters []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Name string `json:"name"`
- } `json:"encounters"`
-}
-
-// JournalEncounter structure
-type JournalEncounter struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Description string `json:"description"`
- Creatures []struct {
- ID int `json:"id"`
- Name string `json:"name"`
- CreatureDisplay struct {
- ID int `json:"id"`
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- } `json:"creature_display"`
- } `json:"creatures"`
- Items []struct {
- ID int `json:"id"`
- Item struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Name string `json:"name"`
- } `json:"item"`
- } `json:"items"`
- Sections []struct {
- ID int `json:"id"`
- Title string `json:"title"`
- BodyText string `json:"body_text"`
- Sections []struct {
- ID int `json:"id"`
- Title string `json:"title"`
- Sections []struct {
- ID int `json:"id"`
- Title string `json:"title"`
- BodyText string `json:"body_text"`
- } `json:"sections"`
- CreatureDisplay struct {
- ID int `json:"id"`
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- } `json:"creature_display"`
- } `json:"sections"`
- } `json:"sections"`
- Instance struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Name string `json:"name"`
- } `json:"instance"`
- Category struct {
- Type string `json:"type"`
- } `json:"category"`
- Modes []struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"modes"`
-}
-
-// JournalInstancesIndex structure
-type JournalInstancesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Instances []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Name string `json:"name"`
- } `json:"instances"`
-}
-
-// JournalInstance structure
-type JournalInstance struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Description string `json:"description"`
- MinimumLevel int `json:"minimum_level"`
- Map struct {
- ID int `json:"id"`
- Name string `json:"name"`
- } `json:"map"`
- Area struct {
- ID int `json:"id"`
- Name string `json:"name"`
- } `json:"area"`
- Location struct {
- ID int `json:"id"`
- Name string `json:"name"`
- } `json:"location"`
- Encounters []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Name string `json:"name"`
- } `json:"encounters"`
- Expansion struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Name string `json:"name"`
- } `json:"expansion"`
- Modes []struct {
- Mode struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"mode"`
- Players int `json:"players"`
- IsTracked bool `json:"is_tracked"`
- } `json:"modes"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
- Category struct {
- Type string `json:"type"`
- } `json:"category"`
-}
-
-// JournalInstanceMedia structure
-type JournalInstanceMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- } `json:"assets"`
-}
diff --git a/v2/wowgd/mediaSearch.go b/v2/wowgd/mediaSearch.go
deleted file mode 100644
index 012d776..0000000
--- a/v2/wowgd/mediaSearch.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package wowgd
-
-// MediaSearch Structure
-type MediaSearch struct {
- Page int `json:"page"`
- PageSize int `json:"pageSize"`
- MaxPageSize int `json:"maxPageSize"`
- PageCount int `json:"pageCount"`
- ResultCountCapped bool `json:"resultCountCapped"`
- Results []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Data struct {
- Assets []struct {
- FileDataID int `json:"file_data_id"`
- Value string `json:"value"`
- Key string `json:"key"`
- } `json:"assets"`
- ID int `json:"id"`
- } `json:"data"`
- } `json:"results"`
-}
diff --git a/v2/wowgd/modifiedCrafting.go b/v2/wowgd/modifiedCrafting.go
deleted file mode 100644
index 2827f12..0000000
--- a/v2/wowgd/modifiedCrafting.go
+++ /dev/null
@@ -1,77 +0,0 @@
-package wowgd
-
-// ModifiedCraftingIndex structure
-type ModifiedCraftingIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Categories struct {
- Href string `json:"href"`
- } `json:"categories"`
- SlotTypes struct {
- Href string `json:"href"`
- } `json:"slot_types"`
-}
-
-// ModifiedCraftingCategoryIndex structure
-type ModifiedCraftingCategoryIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Categories []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"categories"`
-}
-
-// ModifiedCraftingCategory structure
-type ModifiedCraftingCategory struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
-}
-
-// ModifiedCraftingReagentSlotTypeIndex structure
-type ModifiedCraftingReagentSlotTypeIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- SlotTypes []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name,omitempty"`
- ID int `json:"id"`
- } `json:"slot_types"`
-}
-
-// ModifiedCraftingReagentSlotType structure
-type ModifiedCraftingReagentSlotType struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Description string `json:"description"`
- CompatibleCategories []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"compatible_categories"`
-}
diff --git a/v2/wowgd/mount.go b/v2/wowgd/mount.go
deleted file mode 100644
index ca6e7f0..0000000
--- a/v2/wowgd/mount.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package wowgd
-
-// MountIndex structure
-type MountIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Mounts []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"mounts"`
-}
-
-// Mount structure
-type Mount struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- CreatureDisplays []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- } `json:"creature_displays"`
- Description string `json:"description"`
- Source struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"source"`
- Faction struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"faction"`
-}
diff --git a/v2/wowgd/mythicKeystoneAffix.go b/v2/wowgd/mythicKeystoneAffix.go
deleted file mode 100644
index 18cc483..0000000
--- a/v2/wowgd/mythicKeystoneAffix.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package wowgd
-
-// MythicKeystoneAffixIndex structure
-type MythicKeystoneAffixIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Affixes []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"affixes"`
-}
-
-// MythicKeystoneAffix structure
-type MythicKeystoneAffix struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Description string `json:"description"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
-}
-
-// MythicKeystoneAffixMedia structure
-type MythicKeystoneAffixMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- FileDataID int `json:"file_data_id"`
- } `json:"assets"`
- ID int `json:"id"`
-}
diff --git a/v2/wowgd/mythicKeystoneDungeon.go b/v2/wowgd/mythicKeystoneDungeon.go
deleted file mode 100644
index db5f0e0..0000000
--- a/v2/wowgd/mythicKeystoneDungeon.go
+++ /dev/null
@@ -1,125 +0,0 @@
-package wowgd
-
-// MythicKeystoneDungeonIndex structure
-type MythicKeystoneDungeonIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Dungeons []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"dungeons"`
-}
-
-// MythicKeystoneDungeon structure
-type MythicKeystoneDungeon struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Map struct {
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"map"`
- Zone struct {
- Slug string `json:"slug"`
- } `json:"zone"`
- KeystoneUpgrades []struct {
- UpgradeLevel int `json:"upgrade_level"`
- QualifyingDuration int `json:"qualifying_duration"`
- } `json:"keystone_upgrades"`
-}
-
-// MythicKeystoneIndex structure
-type MythicKeystoneIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Seasons struct {
- Href string `json:"href"`
- } `json:"seasons"`
- Dungeons struct {
- Href string `json:"href"`
- } `json:"dungeons"`
-}
-
-// MythicKeystonePeriodIndex structure
-type MythicKeystonePeriodIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Periods []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"periods"`
- CurrentPeriod struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"current_period"`
-}
-
-// MythicKeystonePeriod structure
-type MythicKeystonePeriod struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- StartTimestamp int64 `json:"start_timestamp"`
- EndTimestamp int64 `json:"end_timestamp"`
-}
-
-// MythicKeystoneSeasonIndex structure
-type MythicKeystoneSeasonIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Seasons []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"seasons"`
- CurrentSeason struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"current_season"`
-}
-
-// MythicKeystoneSeason structure
-type MythicKeystoneSeason struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- StartTimestamp int64 `json:"start_timestamp"`
- Periods []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"periods"`
-}
diff --git a/v2/wowgd/mythicKeystoneLeaderboard.go b/v2/wowgd/mythicKeystoneLeaderboard.go
deleted file mode 100644
index acd3e52..0000000
--- a/v2/wowgd/mythicKeystoneLeaderboard.go
+++ /dev/null
@@ -1,76 +0,0 @@
-package wowgd
-
-// MythicKeystoneLeaderboardIndex structure
-type MythicKeystoneLeaderboardIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- CurrentLeaderboards []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"current_leaderboards"`
-}
-
-// MythicKeystoneLeaderboard structure
-type MythicKeystoneLeaderboard struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Map struct {
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"map"`
- Period int `json:"period"`
- PeriodStartTimestamp int64 `json:"period_start_timestamp"`
- PeriodEndTimestamp int64 `json:"period_end_timestamp"`
- ConnectedRealm struct {
- Href string `json:"href"`
- } `json:"connected_realm"`
- LeadingGroups []struct {
- Ranking int `json:"ranking"`
- Duration int `json:"duration"`
- CompletedTimestamp int64 `json:"completed_timestamp"`
- KeystoneLevel int `json:"keystone_level"`
- Members []struct {
- Profile struct {
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"profile"`
- Faction struct {
- Type string `json:"type"`
- } `json:"faction"`
- Specialization struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"specialization"`
- } `json:"members"`
- } `json:"leading_groups"`
- KeystoneAffixes []struct {
- KeystoneAffix struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"keystone_affix"`
- StartingLevel int `json:"starting_level"`
- } `json:"keystone_affixes"`
- MapChallengeModeID int `json:"map_challenge_mode_id"`
- Name string `json:"name"`
-}
diff --git a/v2/wowgd/mythicRaidLeaderboard.go b/v2/wowgd/mythicRaidLeaderboard.go
deleted file mode 100644
index e4f5fbf..0000000
--- a/v2/wowgd/mythicRaidLeaderboard.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package wowgd
-
-// MythicRaidLeaderboard structure
-type MythicRaidLeaderboard struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Slug string `json:"slug"`
- CriteriaType string `json:"criteria_type"`
- Zone struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- } `json:"zone"`
- Entries []struct {
- Guild struct {
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"guild"`
- Faction struct {
- Type string `json:"type"`
- } `json:"faction"`
- Timestamp int64 `json:"timestamp"`
- Region string `json:"region"`
- Rank int `json:"rank"`
- } `json:"entries"`
-}
diff --git a/v2/wowgd/pet.go b/v2/wowgd/pet.go
deleted file mode 100644
index b57ae50..0000000
--- a/v2/wowgd/pet.go
+++ /dev/null
@@ -1,122 +0,0 @@
-package wowgd
-
-// PetIndex structure
-type PetIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Pets []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"pets"`
-}
-
-// Pet structure
-type Pet struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- BattlePetType struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"battle_pet_type"`
- Description string `json:"description"`
- IsCapturable bool `json:"is_capturable"`
- IsTradable bool `json:"is_tradable"`
- IsBattlepet bool `json:"is_battlepet"`
- IsAllianceOnly bool `json:"is_alliance_only"`
- IsHordeOnly bool `json:"is_horde_only"`
- Abilities []struct {
- Ability struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"ability"`
- Slot int `json:"slot"`
- RequiredLevel int `json:"required_level"`
- } `json:"abilities"`
- Source struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"source"`
- Icon string `json:"icon"`
- Creature struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"creature"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
- IsRandomCreatureDisplay bool `json:"is_random_creature_display"`
-}
-
-// PetAbilityIndex structure
-type PetAbilityIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Abilities []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"abilities"`
-}
-
-// PetAbility structure
-type PetAbility struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- BattlePetType struct {
- ID int `json:"id"`
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"battle_pet_type"`
- Rounds int `json:"rounds"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
-}
-
-// PetMedia structure
-type PetMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- FileDataID int `json:"file_data_id"`
- } `json:"assets"`
- ID int `json:"id"`
-}
diff --git a/v2/wowgd/playableClass.go b/v2/wowgd/playableClass.go
deleted file mode 100644
index 04cc7f0..0000000
--- a/v2/wowgd/playableClass.go
+++ /dev/null
@@ -1,83 +0,0 @@
-package wowgd
-
-// PlayableClassesIndex structure
-type PlayableClassesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Classes []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"classes"`
-}
-
-// PlayableClass structure
-type PlayableClass struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- GenderName struct {
- Male string `json:"male"`
- Female string `json:"female"`
- } `json:"gender_name"`
- PowerType struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"power_type"`
- Specializations []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"specializations"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
- PvpTalentSlots struct {
- Href string `json:"href"`
- } `json:"pvp_talent_slots"`
-}
-
-// PlayableClassMedia structure
-type PlayableClassMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- FileDataID int `json:"id"`
- } `json:"assets"`
- ID int `json:"id"`
-}
-
-// PlayableClassPvPTalentSlots structure
-type PlayableClassPvPTalentSlots struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- TalentSlots []struct {
- SlotNumber int `json:"slot_number"`
- UnlockPlayerLevel int `json:"unlock_player_level"`
- } `json:"talent_slots"`
-}
diff --git a/v2/wowgd/playableRace.go b/v2/wowgd/playableRace.go
deleted file mode 100644
index 7ed95ee..0000000
--- a/v2/wowgd/playableRace.go
+++ /dev/null
@@ -1,38 +0,0 @@
-package wowgd
-
-// PlayableRacesIndex structure
-type PlayableRacesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Races []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"races"`
-}
-
-// PlayableRace structure
-type PlayableRace struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- GenderName struct {
- Male string `json:"male"`
- Female string `json:"female"`
- } `json:"gender_name"`
- Faction struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"faction"`
- IsSelectable bool `json:"is_selectable"`
- IsAlliedRace bool `json:"is_allied_race"`
-}
diff --git a/v2/wowgd/playableSpecialization.go b/v2/wowgd/playableSpecialization.go
deleted file mode 100644
index 113b094..0000000
--- a/v2/wowgd/playableSpecialization.go
+++ /dev/null
@@ -1,100 +0,0 @@
-package wowgd
-
-// PlayableSpecializationIndex structure
-type PlayableSpecializationIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- CharacterSpecializations []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"character_specializations"`
- PetSpecializations []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"pet_specializations"`
-}
-
-// PlayableSpecialization structure
-type PlayableSpecialization struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- PlayableClass struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"playable_class"`
- Name string `json:"name"`
- GenderDescription struct {
- Male string `json:"male"`
- Female string `json:"female"`
- } `json:"gender_description"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
- Role struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"role"`
- TalentTiers []struct {
- Level int `json:"level"`
- Talents []struct {
- Talent struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"talent"`
- SpellTooltip struct {
- Description string `json:"description"`
- CastTime string `json:"cast_time"`
- } `json:"spell_tooltip"`
- } `json:"talents"`
- } `json:"talent_tiers"`
- PvpTalents []struct {
- Talent struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"talent"`
- SpellTooltip struct {
- Description string `json:"description"`
- CastTime string `json:"cast_time"`
- } `json:"spell_tooltip"`
- } `json:"pvp_talents"`
-}
-
-// PlayableSpecializationMedia structure
-type PlayableSpecializationMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- FileDataID int `json:"file_data_id"`
- } `json:"assets"`
- ID int `json:"id"`
-}
diff --git a/v2/wowgd/powerType.go b/v2/wowgd/powerType.go
deleted file mode 100644
index 7c0de8b..0000000
--- a/v2/wowgd/powerType.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package wowgd
-
-// PowerTypesIndex structure
-type PowerTypesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- PowerTypes []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"power_types"`
-}
-
-// PowerType structure
-type PowerType struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
-}
diff --git a/v2/wowgd/profession.go b/v2/wowgd/profession.go
deleted file mode 100644
index 00b9934..0000000
--- a/v2/wowgd/profession.go
+++ /dev/null
@@ -1,137 +0,0 @@
-package wowgd
-
-// ProfessionsIndex structure
-type ProfessionsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Professions []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"professions"`
-}
-
-// Profession structure
-type Profession struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Description string `json:"description"`
- Type struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"type"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
- SkillTiers []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"skill_tiers"`
-}
-
-// ProfessionMedia structure
-type ProfessionMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- FileDataID int `json:"file_data_id"`
- } `json:"assets"`
- ID int `json:"id"`
-}
-
-// ProfessionSkillTier structure
-type ProfessionSkillTier struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- MinimumSkillLevel int `json:"minimum_skill_level"`
- MaximumSkillLevel int `json:"maximum_skill_level"`
- Categories []struct {
- Name string `json:"name"`
- Recipes []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"recipes"`
- } `json:"categories"`
-}
-
-// Recipe structure
-type Recipe struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
- CraftedItem struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"crafted_item"`
- Reagents []struct {
- Reagent struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"reagent"`
- Quantity int `json:"quantity"`
- } `json:"reagents"`
- CraftedQuantity struct {
- Minimum float32 `json:"minimum"`
- Maximum float32 `json:"maximum"`
- } `json:"crafted_quantity"`
-}
-
-// RecipeMedia structure
-type RecipeMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- FileDataID int `json:"file_data_id"`
- } `json:"assets"`
- ID int `json:"id"`
-}
diff --git a/v2/wowgd/pvpSeason.go b/v2/wowgd/pvpSeason.go
deleted file mode 100644
index 322ca61..0000000
--- a/v2/wowgd/pvpSeason.go
+++ /dev/null
@@ -1,144 +0,0 @@
-package wowgd
-
-// PvPSeasonIndex structure
-type PvPSeasonIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Seasons []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"seasons"`
- CurrentSeason struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"current_season"`
-}
-
-// PvPSeason structure
-type PvPSeason struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Leaderboards struct {
- Href string `json:"href"`
- } `json:"leaderboards"`
- Rewards struct {
- Href string `json:"href"`
- } `json:"rewards"`
- SeasonStartTimestamp int64 `json:"season_start_timestamp"`
- SeasonEndTimestamp int64 `json:"season_end_timestamp"`
-}
-
-// PvPLeaderboardsIndex structure
-type PvPLeaderboardsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Season struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"season"`
- Leaderboards []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"leaderboards"`
-}
-
-// PvPLeaderboard structure
-type PvPLeaderboard struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Season struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"season"`
- Name string `json:"name"`
- Bracket struct {
- ID int `json:"id"`
- Type string `json:"type"`
- } `json:"bracket"`
- Entries []struct {
- Character struct {
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- Faction struct {
- Type string `json:"type"`
- } `json:"faction"`
- Rank int `json:"rank"`
- Rating int `json:"rating"`
- SeasonMatchStatistics struct {
- Played int `json:"played"`
- Won int `json:"won"`
- Lost int `json:"lost"`
- } `json:"season_match_statistics"`
- Tier struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"tier"`
- } `json:"entries"`
-}
-
-// PvPRewardsIndex structure
-type PvPRewardsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Season struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"season"`
- Rewards []struct {
- Bracket struct {
- ID int `json:"id"`
- Type string `json:"type"`
- } `json:"bracket"`
- Achievement struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"achievement"`
- RatingCutoff int `json:"rating_cutoff"`
- Faction struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"faction"`
- } `json:"rewards"`
-}
diff --git a/v2/wowgd/pvpTier.go b/v2/wowgd/pvpTier.go
deleted file mode 100644
index ac820a6..0000000
--- a/v2/wowgd/pvpTier.go
+++ /dev/null
@@ -1,53 +0,0 @@
-package wowgd
-
-// PvPTierMedia structure
-type PvPTierMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- } `json:"assets"`
-}
-
-// PvPTiersIndex structure
-type PvPTiersIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Tiers []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"tiers"`
-}
-
-// PvPTier structure
-type PvPTier struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- MinRating int `json:"min_rating"`
- MaxRating int `json:"max_rating"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- } `json:"media"`
- Bracket struct {
- ID int `json:"id"`
- Type string `json:"type"`
- } `json:"bracket"`
- RatingType int `json:"rating_type"`
-}
diff --git a/v2/wowgd/quest.go b/v2/wowgd/quest.go
deleted file mode 100644
index cdfe25a..0000000
--- a/v2/wowgd/quest.go
+++ /dev/null
@@ -1,169 +0,0 @@
-package wowgd
-
-// QuestsIndex structure
-type QuestsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Categories struct {
- Href string `json:"href"`
- } `json:"categories"`
- Areas struct {
- Href string `json:"href"`
- } `json:"areas"`
- Types struct {
- Href string `json:"href"`
- } `json:"types"`
-}
-
-// Quest structure
-type Quest struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Title string `json:"title"`
- Area struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"area"`
- Description string `json:"description"`
- Requirements struct {
- MinCharacterLevel int `json:"min_character_level"`
- MaxCharacterLevel int `json:"max_character_level"`
- Faction struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"faction"`
- } `json:"requirements"`
- Rewards struct {
- Experience int `json:"experience"`
- Reputations []struct {
- Reward struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"reward"`
- Value int `json:"value"`
- } `json:"reputations"`
- Money struct {
- Value int `json:"value"`
- Units struct {
- Gold int `json:"gold"`
- Silver int `json:"silver"`
- Copper int `json:"copper"`
- } `json:"units"`
- } `json:"money"`
- } `json:"rewards"`
-}
-
-// QuestCategoriesIndex structure
-type QuestCategoriesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Categories []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"categories"`
-}
-
-// QuestCategory structure
-type QuestCategory struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Category string `json:"category"`
- Quests []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"quests"`
-}
-
-// QuestAreasIndex structure
-type QuestAreasIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Areas []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"areas"`
-}
-
-// QuestArea structure
-type QuestArea struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Area string `json:"area"`
- Quests []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"quests"`
-}
-
-// QuestTypesIndex structure
-type QuestTypesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Types []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"types"`
-}
-
-// QuestType structure
-type QuestType struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Type string `json:"type"`
- Quests []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"quests"`
-}
diff --git a/v2/wowgd/realm.go b/v2/wowgd/realm.go
deleted file mode 100644
index 21aeb50..0000000
--- a/v2/wowgd/realm.go
+++ /dev/null
@@ -1,125 +0,0 @@
-package wowgd
-
-// RealmIndex structure
-type RealmIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Realms []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realms"`
-}
-
-// Realm structure
-type Realm struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Region struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"region"`
- ConnectedRealm struct {
- Href string `json:"href"`
- } `json:"connected_realm"`
- Name string `json:"name"`
- Category string `json:"category"`
- Locale string `json:"locale"`
- Timezone string `json:"timezone"`
- Type struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"type"`
- IsTournament bool `json:"is_tournament"`
- Slug string `json:"slug"`
-}
-
-// RealmSearch structure
-type RealmSearch struct {
- Page int `json:"page"`
- PageSize int `json:"pageSize"`
- MaxPageSize int `json:"maxPageSize"`
- PageCount int `json:"pageCount"`
- Results []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Data struct {
- IsTournament bool `json:"is_tournament"`
- Timezone string `json:"timezone"`
- Name struct {
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- ID int `json:"id"`
- Region struct {
- Name struct {
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- } `json:"region"`
- Category struct {
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"category"`
- Locale string `json:"locale"`
- Type struct {
- Name struct {
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- Type string `json:"type"`
- } `json:"type"`
- Slug string `json:"slug"`
- } `json:"data"`
- } `json:"results"`
-}
diff --git a/v2/wowgd/region.go b/v2/wowgd/region.go
deleted file mode 100644
index 24e13cb..0000000
--- a/v2/wowgd/region.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package wowgd
-
-// RegionIndex structure
-type RegionIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Regions []struct {
- Href string `json:"href"`
- } `json:"regions"`
-}
-
-// Region structure
-type Region struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Tag string `json:"tag"`
-}
diff --git a/v2/wowgd/reputations.go b/v2/wowgd/reputations.go
deleted file mode 100644
index 0500300..0000000
--- a/v2/wowgd/reputations.go
+++ /dev/null
@@ -1,81 +0,0 @@
-package wowgd
-
-// ReputationFactionsIndex structure
-type ReputationFactionsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Factions []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"factions"`
- RootFactions []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"root_factions"`
-}
-
-// ReputationFaction structure
-type ReputationFaction struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Description string `json:"description"`
- ReputationTiers struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"reputation_tiers"`
-}
-
-// ReputationTiersIndex structure
-type ReputationTiersIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ReputationTiers []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Name string `json:"name,omitempty"`
- } `json:"reputation_tiers"`
-}
-
-// ReputationTiers structure
-type ReputationTiers struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Tiers []struct {
- Name string `json:"name"`
- MinValue int `json:"min_value"`
- MaxValue int `json:"max_value"`
- ID int `json:"id"`
- } `json:"tiers"`
- Faction struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"faction"`
-}
diff --git a/v2/wowgd/spell.go b/v2/wowgd/spell.go
deleted file mode 100644
index 3657882..0000000
--- a/v2/wowgd/spell.go
+++ /dev/null
@@ -1,67 +0,0 @@
-package wowgd
-
-// Spell structure
-type Spell struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Description string `json:"description"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
-}
-
-// SpellMedia structure
-type SpellMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- FileDataID int `json:"file_data_id"`
- } `json:"assets"`
- ID int `json:"id"`
-}
-
-// SpellSearch structure
-type SpellSearch struct {
- Page int `json:"page"`
- PageSize int `json:"pageSize"`
- MaxPageSize int `json:"maxPageSize"`
- PageCount int `json:"pageCount"`
- Results []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Data struct {
- Name struct {
- ItIT string `json:"it_IT"`
- RuRU string `json:"ru_RU"`
- EnGB string `json:"en_GB"`
- ZhTW string `json:"zh_TW"`
- KoKR string `json:"ko_KR"`
- EnUS string `json:"en_US"`
- EsMX string `json:"es_MX"`
- PtBR string `json:"pt_BR"`
- EsES string `json:"es_ES"`
- ZhCN string `json:"zh_CN"`
- FrFR string `json:"fr_FR"`
- DeDE string `json:"de_DE"`
- } `json:"name"`
- ID int `json:"id"`
- Media struct {
- ID int `json:"id"`
- } `json:"media"`
- } `json:"data"`
- } `json:"results"`
-}
diff --git a/v2/wowgd/talent.go b/v2/wowgd/talent.go
deleted file mode 100644
index d3e59f5..0000000
--- a/v2/wowgd/talent.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package wowgd
-
-// TalentsIndex structure
-type TalentsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Talents []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"talents"`
-}
-
-// Talent structure
-type Talent struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- TierIndex int `json:"tier_index"`
- ColumnIndex int `json:"column_index"`
- Level int `json:"level"`
- Description string `json:"description"`
- Spell struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"spell"`
- PlayableClass struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"playable_class"`
-}
-
-// PvPTalentsIndex structure
-type PvPTalentsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- PvpTalents []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"pvp_talents"`
-}
-
-// PvPTalent structure
-type PvPTalent struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Spell struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"spell"`
- PlayableSpecialization struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"playable_specialization"`
- Description string `json:"description"`
- UnlockPlayerLevel int `json:"unlock_player_level"`
- CompatibleSlots []int `json:"compatible_slots"`
-}
diff --git a/v2/wowgd/techTalent.go b/v2/wowgd/techTalent.go
deleted file mode 100644
index 96e47a1..0000000
--- a/v2/wowgd/techTalent.go
+++ /dev/null
@@ -1,109 +0,0 @@
-package wowgd
-
-// TechTalentTreeIndex structure
-type TechTalentTreeIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- TalentTrees []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"talent_trees"`
-}
-
-// TechTalentTree structure
-type TechTalentTree struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- MaxTiers int `json:"max_tiers"`
- Talents []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"talents"`
-}
-
-// TechTalentIndex structure
-type TechTalentIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Talents []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"talents"`
-}
-
-// TechTalent structure
-type TechTalent struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- TalentTree struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"talent_tree"`
- Name string `json:"name"`
- Description string `json:"description"`
- SpellTooltip struct {
- Spell struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"spell"`
- Description string `json:"description"`
- CastTime string `json:"cast_time"`
- } `json:"spell_tooltip"`
- Tier int `json:"tier"`
- DisplayOrder int `json:"display_order"`
- PrerequisiteTalent struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"prerequisite_talent"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
-}
-
-// TechTalentMedia structure
-type TechTalentMedia struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- FileDataID int `json:"file_data_id"`
- } `json:"assets"`
-}
diff --git a/v2/wowgd/title.go b/v2/wowgd/title.go
deleted file mode 100644
index 0421451..0000000
--- a/v2/wowgd/title.go
+++ /dev/null
@@ -1,32 +0,0 @@
-package wowgd
-
-// TitlesIndex structure
-type TitlesIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Titles []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"titles"`
-}
-
-// Title structure
-type Title struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- GenderName struct {
- Male string `json:"male"`
- Female string `json:"female"`
- } `json:"gender_name"`
-}
diff --git a/v2/wowgd/wowToken.go b/v2/wowgd/wowToken.go
deleted file mode 100644
index 2c82730..0000000
--- a/v2/wowgd/wowToken.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package wowgd
-
-// Token structure
-type Token struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- LastUpdatedTimestamp int64 `json:"last_updated_timestamp"`
- Price int `json:"price"`
-}
diff --git a/v2/wowgd/wowgd.go b/v2/wowgd/wowgd.go
deleted file mode 100644
index 3d20955..0000000
--- a/v2/wowgd/wowgd.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Package wowgd contains types for the World of Warcraft Game Data APIs
-package wowgd
-
-// Bracket type
-type Bracket string
-
-// Bracket field for PVP API calls
-const (
- Bracket2v2 Bracket = "2v2"
- Bracket3v3 Bracket = "3v3"
- BracketRBG Bracket = "rbg"
-)
-
-// TimeLeft string
-type TimeLeft string
-
-// TimeLeft field for Auction House structure
-const (
- TimeLeftShort TimeLeft = "SHORT"
- TimeLeftMedium TimeLeft = "MEDIUM"
- TimeLeftLong TimeLeft = "LONG"
- TimeLeftVeryLong TimeLeft = "VERY_LONG"
-)
diff --git a/v2/wowgd_test.go b/v2/wowgd_test.go
deleted file mode 100644
index bffb12d..0000000
--- a/v2/wowgd_test.go
+++ /dev/null
@@ -1,1485 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
- "testing"
-
- "github.com/FuzzyStatic/blizzard/v2/wowgd"
-)
-
-func TestWoWAchievementCategoriesIndex(t *testing.T) {
- dat, _, err := c.WoWAchievementCategoriesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWAchievementCategory(t *testing.T) {
- dat, _, err := c.WoWAchievementCategory(context.Background(), 81)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWAchievementIndex(t *testing.T) {
- dat, _, err := c.WoWAchievementIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWAchievement(t *testing.T) {
- dat, _, err := c.WoWAchievement(context.Background(), 6)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWAchievementMedia(t *testing.T) {
- dat, _, err := c.WoWAchievementMedia(context.Background(), 6)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWAuctions(t *testing.T) {
- dat, _, err := c.WoWAuctions(context.Background(), 1138)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWAzeriteEssenceIndex(t *testing.T) {
- dat, _, err := c.WoWAzeriteEssenceIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWAzeriteEssence(t *testing.T) {
- dat, _, err := c.WoWAzeriteEssence(context.Background(), 6)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWAzeriteEssenceMedia(t *testing.T) {
- dat, _, err := c.WoWAzeriteEssenceMedia(context.Background(), 6)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWConnectedRealmsIndex(t *testing.T) {
- dat, _, err := c.WoWConnectedRealmsIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWConnectedRealm(t *testing.T) {
- dat, _, err := c.WoWConnectedRealm(context.Background(), 11)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCovenantsIndex(t *testing.T) {
- dat, _, err := c.WoWCovenantsIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCovenant(t *testing.T) {
- dat, _, err := c.WoWCovenant(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCovenantMedia(t *testing.T) {
- dat, _, err := c.WoWCovenantMedia(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCovenantSoulbindsIndex(t *testing.T) {
- dat, _, err := c.WoWCovenantSoulbindsIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCovenantSoulbind(t *testing.T) {
- dat, _, err := c.WoWCovenantSoulbind(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCovenantConduitsIndex(t *testing.T) {
- dat, _, err := c.WoWCovenantConduitsIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCovenantConduit(t *testing.T) {
- dat, _, err := c.WoWCovenantConduit(context.Background(), 13)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCreatureFamiliesIndex(t *testing.T) {
- dat, _, err := c.WoWCreatureFamiliesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCreatureFamily(t *testing.T) {
- dat, _, err := c.WoWCreatureFamily(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCreatureTypesIndex(t *testing.T) {
- dat, _, err := c.WoWCreatureTypesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCreatureType(t *testing.T) {
- dat, _, err := c.WoWCreatureType(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCreature(t *testing.T) {
- dat, _, err := c.WoWCreature(context.Background(), 30)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCreatureDisplayMedia(t *testing.T) {
- dat, _, err := c.WoWCreatureDisplayMedia(context.Background(), 30221)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCreatureFamilyMedia(t *testing.T) {
- dat, _, err := c.WoWCreatureFamilyMedia(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWGuildCrestComponentsIndex(t *testing.T) {
- dat, _, err := c.WoWGuildCrestComponentsIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWGuildCrestBorderMedia(t *testing.T) {
- dat, _, err := c.WoWGuildCrestBorderMedia(context.Background(), 0)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWGuildCrestEmblemMedia(t *testing.T) {
- dat, _, err := c.WoWGuildCrestEmblemMedia(context.Background(), 0)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWItemClassesIndex(t *testing.T) {
- dat, _, err := c.WoWItemClassesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWItemClass(t *testing.T) {
- dat, _, err := c.WoWItemClass(context.Background(), 0)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWItemSetsIndex(t *testing.T) {
- dat, _, err := c.WoWItemSetsIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWItemSet(t *testing.T) {
- dat, _, err := c.WoWItemClass(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWItemSubclass(t *testing.T) {
- dat, _, err := c.WoWItemSubclass(context.Background(), 0, 0)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWItem(t *testing.T) {
- dat, _, err := c.WoWItem(context.Background(), 19019)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWItemMedia(t *testing.T) {
- dat, _, err := c.WoWItemMedia(context.Background(), 19019)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWJournalExpansionsIndex(t *testing.T) {
- dat, _, err := c.WoWJournalExpansionsIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWJournalExpansion(t *testing.T) {
- dat, _, err := c.WoWJournalExpansion(context.Background(), 396)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWJournalEncountersIndex(t *testing.T) {
- dat, _, err := c.WoWJournalEncountersIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWJournalEncounter(t *testing.T) {
- dat, _, err := c.WoWJournalEncounter(context.Background(), 396)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWJournalInstancesIndex(t *testing.T) {
- dat, _, err := c.WoWJournalInstancesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWJournalInstance(t *testing.T) {
- dat, _, err := c.WoWJournalInstance(context.Background(), 63)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWJournalInstanceMedia(t *testing.T) {
- dat, _, err := c.WoWJournalInstanceMedia(context.Background(), 968)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWModifiedCraftingIndex(t *testing.T) {
- dat, _, err := c.WoWModifiedCraftingIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWModifiedCraftingCategoryIndex(t *testing.T) {
- dat, _, err := c.WoWModifiedCraftingCategoryIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWModifiedCraftingCategory(t *testing.T) {
- dat, _, err := c.WoWModifiedCraftingCategory(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWModifiedCraftingReagentSlotTypeIndex(t *testing.T) {
- dat, _, err := c.WoWModifiedCraftingReagentSlotTypeIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWModifiedCraftingReagentSlotType(t *testing.T) {
- dat, _, err := c.WoWModifiedCraftingReagentSlotType(context.Background(), 16)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWMountIndex(t *testing.T) {
- dat, _, err := c.WoWMountIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWMount(t *testing.T) {
- dat, _, err := c.WoWMount(context.Background(), 6)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWMythicKeystoneAffixIndex(t *testing.T) {
- dat, _, err := c.WoWMythicKeystoneAffixIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWMythicKeystoneAffix(t *testing.T) {
- dat, _, err := c.WoWMythicKeystoneAffix(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWMythicKeystoneAffixMedia(t *testing.T) {
- dat, _, err := c.WoWMythicKeystoneAffixMedia(context.Background(), 3)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWMythicKeystoneDungeonIndex(t *testing.T) {
- dat, _, err := c.WoWMythicKeystoneDungeonIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWMythicKeystoneDungeon(t *testing.T) {
- dat, _, err := c.WoWMythicKeystoneDungeon(context.Background(), 375)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWMythicKeystoneIndex(t *testing.T) {
- dat, _, err := c.WoWMythicKeystoneIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWMythicKeystonePeriodIndex(t *testing.T) {
- dat, _, err := c.WoWMythicKeystonePeriodIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWMythicKeystonePeriod(t *testing.T) {
- dat, _, err := c.WoWMythicKeystonePeriod(context.Background(), 641)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWMythicKeystoneSeasonIndex(t *testing.T) {
- dat, _, err := c.WoWMythicKeystoneSeasonIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWMythicKeystoneSeason(t *testing.T) {
- dat, _, err := c.WoWMythicKeystoneSeason(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWMythicKeystoneLeaderboardIndex(t *testing.T) {
- dat, _, err := c.WoWMythicKeystoneLeaderboardIndex(context.Background(), 11)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWMythicKeystoneLeaderboard(t *testing.T) {
- dat, _, err := c.WoWMythicKeystoneLeaderboard(context.Background(), 11, 197, 641)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWMythicRaidLeaderboard(t *testing.T) {
- dat, _, err := c.WoWMythicRaidLeaderboard(context.Background(), "uldir", "alliance")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPetIndex(t *testing.T) {
- dat, _, err := c.WoWPetIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPet(t *testing.T) {
- dat, _, err := c.WoWPet(context.Background(), 39)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPetMedia(t *testing.T) {
- dat, _, err := c.WoWPetMedia(context.Background(), 39)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPetAbilityIndex(t *testing.T) {
- dat, _, err := c.WoWPetAbilityIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPetAbilty(t *testing.T) {
- dat, _, err := c.WoWPetAbility(context.Background(), 110)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPetAbilityMedia(t *testing.T) {
- dat, _, err := c.WoWPetAbilityMedia(context.Background(), 110)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPlayableClassesIndex(t *testing.T) {
- dat, _, err := c.WoWPlayableClassesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPlayableClass(t *testing.T) {
- dat, _, err := c.WoWPlayableClass(context.Background(), 7)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPlayableClassMedia(t *testing.T) {
- dat, _, err := c.WoWPlayableClassMedia(context.Background(), 7)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPlayableClassPvPTalentSlots(t *testing.T) {
- dat, _, err := c.WoWPlayableClassPvPTalentSlots(context.Background(), 7)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPlayableRacesIndex(t *testing.T) {
- dat, _, err := c.WoWPlayableRacesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPlayableRace(t *testing.T) {
- dat, _, err := c.WoWPlayableRace(context.Background(), 2)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPlayableSpecializationIndex(t *testing.T) {
- dat, _, err := c.WoWPlayableSpecializationIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPlayableSpecialization(t *testing.T) {
- dat, _, err := c.WoWPlayableSpecialization(context.Background(), 262)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPlayableSpecializationMedia(t *testing.T) {
- dat, _, err := c.WoWPlayableSpecializationMedia(context.Background(), 262)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPowerTypesIndex(t *testing.T) {
- dat, _, err := c.WoWPowerTypesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPowerType(t *testing.T) {
- dat, _, err := c.WoWPowerType(context.Background(), 0)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWProfessionsIndex(t *testing.T) {
- dat, _, err := c.WoWProfessionsIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWProfession(t *testing.T) {
- dat, _, err := c.WoWProfession(context.Background(), 164)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWProfessionMedia(t *testing.T) {
- dat, _, err := c.WoWProfessionMedia(context.Background(), 164)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWProfessionSkillTier(t *testing.T) {
- dat, _, err := c.WoWProfessionSkillTier(context.Background(), 164, 2477)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWRecipe(t *testing.T) {
- dat, _, err := c.WoWRecipe(context.Background(), 1631)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWRecipeMedia(t *testing.T) {
- dat, _, err := c.WoWRecipeMedia(context.Background(), 1631)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPvPSeasonIndex(t *testing.T) {
- dat, _, err := c.WoWPvPSeasonIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPvPSeason(t *testing.T) {
- dat, _, err := c.WoWPvPSeason(context.Background(), 27)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPvPLeaderboardsIndex(t *testing.T) {
- dat, _, err := c.WoWPvPLeaderboardsIndex(context.Background(), 27)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPvPLeaderboard(t *testing.T) {
- dat, _, err := c.WoWPvPLeaderboard(context.Background(), 27, wowgd.BracketRBG)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPvPRewardsIndex(t *testing.T) {
- dat, _, err := c.WoWPvPRewardsIndex(context.Background(), 27)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPvPTierMedia(t *testing.T) {
- dat, _, err := c.WoWPvPTierMedia(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPvPTiersIndex(t *testing.T) {
- dat, _, err := c.WoWPvPTiersIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPvPTier(t *testing.T) {
- dat, _, err := c.WoWPvPTier(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWQuestsIndex(t *testing.T) {
- dat, _, err := c.WoWQuestsIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWQuest(t *testing.T) {
- dat, _, err := c.WoWQuest(context.Background(), 2)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWQuestCategoriesIndex(t *testing.T) {
- dat, _, err := c.WoWQuestCategoriesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWQuestCategory(t *testing.T) {
- dat, _, err := c.WoWQuestCategory(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWQuestAreasIndex(t *testing.T) {
- dat, _, err := c.WoWQuestAreasIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWQuestArea(t *testing.T) {
- dat, _, err := c.WoWQuestArea(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWQuestTypesIndex(t *testing.T) {
- dat, _, err := c.WoWQuestTypesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWQuestType(t *testing.T) {
- dat, _, err := c.WoWQuestType(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWRealmIndex(t *testing.T) {
- dat, _, err := c.WoWRealmIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWRealm(t *testing.T) {
- dat, _, err := c.WoWRealm(context.Background(), "tichondrius")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWRegionIndex(t *testing.T) {
- dat, _, err := c.WoWRegionIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWRegion(t *testing.T) {
- dat, _, err := c.WoWRegion(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWReputationFactionsIndex(t *testing.T) {
- dat, _, err := c.WoWReputationFactionsIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWReputationFaction(t *testing.T) {
- dat, _, err := c.WoWReputationFaction(context.Background(), 21)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWReputationTiersIndex(t *testing.T) {
- dat, _, err := c.WoWReputationTiersIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWReputationTiers(t *testing.T) {
- dat, _, err := c.WoWReputationTiers(context.Background(), 2)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWSpell(t *testing.T) {
- dat, _, err := c.WoWSpell(context.Background(), 196607)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWSpellMedia(t *testing.T) {
- dat, _, err := c.WoWSpellMedia(context.Background(), 196607)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWTalentsIndex(t *testing.T) {
- dat, _, err := c.WoWTalentsIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWTalent(t *testing.T) {
- dat, _, err := c.WoWTalent(context.Background(), 23106)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPvPTalentsIndex(t *testing.T) {
- dat, _, err := c.WoWPvPTalentsIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWPvPTalent(t *testing.T) {
- dat, _, err := c.WoWPvPTalent(context.Background(), 11)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWTechTalentTreeIndex(t *testing.T) {
- dat, _, err := c.WoWTechTalentTreeIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWTechTalentTree(t *testing.T) {
- dat, _, err := c.WoWTechTalentTree(context.Background(), 272)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWTechTalentIndex(t *testing.T) {
- dat, _, err := c.WoWTechTalentIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWTechTalent(t *testing.T) {
- dat, _, err := c.WoWTechTalent(context.Background(), 863)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWTechTalentMedia(t *testing.T) {
- dat, _, err := c.WoWTechTalentMedia(context.Background(), 863)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWTitlesIndex(t *testing.T) {
- dat, _, err := c.WoWTitlesIndex(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWTitle(t *testing.T) {
- dat, _, err := c.WoWTitle(context.Background(), 1)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWToken(t *testing.T) {
- dat, _, err := c.WoWToken(context.Background())
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
diff --git a/v2/wowp.go b/v2/wowp.go
deleted file mode 100644
index f883023..0000000
--- a/v2/wowp.go
+++ /dev/null
@@ -1,384 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
- "strings"
-
- "github.com/FuzzyStatic/blizzard/v2/wowp"
- "golang.org/x/oauth2"
-)
-
-// WoWAccountProfileSummary Returns a profile summary for an account.
-func (c *Client) WoWAccountProfileSummary(ctx context.Context, token *oauth2.Token) (*wowp.AccountProfileSummary, *Header, error) {
- dat, header, err := c.getStructDataOAuth(ctx,
- "/profile/user/wow",
- c.GetProfileNamespace(),
- token,
- &wowp.AccountProfileSummary{},
- )
- return dat.(*wowp.AccountProfileSummary), header, err
-}
-
-// WoWCharacterAchievementsSummary returns a summary of the achievements a character has completed.
-func (c *Client) WoWCharacterAchievementsSummary(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterAchievementsSummary, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/achievements", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterAchievementsSummary{},
- )
- return dat.(*wowp.CharacterAchievementsSummary), header, err
-}
-
-// WoWCharacterAchievementsStatistics returns a character's statistics as they pertain to achievements.
-func (c *Client) WoWCharacterAchievementsStatistics(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterAchievementsStatistics, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/achievements/statistics", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterAchievementsStatistics{},
- )
- return dat.(*wowp.CharacterAchievementsStatistics), header, err
-}
-
-// WoWCharacterAppearanceSummary returns a summary of a character's appearance settings.
-func (c *Client) WoWCharacterAppearanceSummary(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterAppearanceSummary, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/appearance", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterAppearanceSummary{},
- )
- return dat.(*wowp.CharacterAppearanceSummary), header, err
-}
-
-// WoWCharacterCollectionsIndex returns an index of collection types for a character.
-func (c *Client) WoWCharacterCollectionsIndex(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterCollectionsIndex, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/collections", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterCollectionsIndex{},
- )
- return dat.(*wowp.CharacterCollectionsIndex), header, err
-}
-
-// WoWCharacterMountsCollectionSummary returns a summary of the mounts a character has obtained.
-func (c *Client) WoWCharacterMountsCollectionSummary(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterMountsCollectionSummary, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/collections/mounts", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterMountsCollectionSummary{},
- )
- return dat.(*wowp.CharacterMountsCollectionSummary), header, err
-}
-
-// WoWCharacterPetsCollectionSummary returns a summary of the mounts a character has obtained.
-func (c *Client) WoWCharacterPetsCollectionSummary(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterPetsCollectionSummary, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/collections/pets", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterPetsCollectionSummary{},
- )
- return dat.(*wowp.CharacterPetsCollectionSummary), header, err
-}
-
-// WoWCharacterEncountersSummary returns a summary of a character's encounters.
-func (c *Client) WoWCharacterEncountersSummary(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterEncountersSummary, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/encounters", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterEncountersSummary{},
- )
- return dat.(*wowp.CharacterEncountersSummary), header, err
-}
-
-// WoWCharacterDungeons returns a summary of a character's completed dungeons.
-func (c *Client) WoWCharacterDungeons(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterDungeons, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/encounters/dungeons", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterDungeons{},
- )
- return dat.(*wowp.CharacterDungeons), header, err
-}
-
-// WoWCharacterRaids returns a summary of a character's completed raids.
-func (c *Client) WoWCharacterRaids(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterRaids, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/encounters/raids", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterRaids{},
- )
- return dat.(*wowp.CharacterRaids), header, err
-}
-
-// WoWCharacterEquipmentSummary returns a summary of the items equipped by a character.
-func (c *Client) WoWCharacterEquipmentSummary(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterEquipmentSummary, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/equipment", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterEquipmentSummary{},
- )
- return dat.(*wowp.CharacterEquipmentSummary), header, err
-}
-
-// WoWCharacterHunterPetsSummary if the character is a hunter, returns a summary of the character's hunter pets. Otherwise, returns an HTTP 404 Not Found error.
-func (c *Client) WoWCharacterHunterPetsSummary(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterHunterPetsSummary, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/hunter-pets", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterHunterPetsSummary{},
- )
- return dat.(*wowp.CharacterHunterPetsSummary), header, err
-}
-
-// WoWCharacterMediaSummary returns a summary of the media assets available for a character (such as an avatar render).
-func (c *Client) WoWCharacterMediaSummary(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterMediaSummary, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/character-media", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterMediaSummary{},
- )
- return dat.(*wowp.CharacterMediaSummary), header, err
-}
-
-// WoWMythicKeystoneProfileIndex returns the Mythic Keystone season details for a character.
-// Returns a 404 Not Found for characters that have not yet completed a Mythic Keystone dungeon for the specified season.
-func (c *Client) WoWMythicKeystoneProfileIndex(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterMythicKeystoneProfile, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/mythic-keystone-profile",
- realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterMythicKeystoneProfile{},
- )
- return dat.(*wowp.CharacterMythicKeystoneProfile), header, err
-}
-
-// WoWMythicKeystoneSeasonDetails returns a summary of the media assets available for a character (such as an avatar render).
-func (c *Client) WoWMythicKeystoneSeasonDetails(ctx context.Context, realmSlug, characterName string,
- seasonID int) (*wowp.CharacterMythicKeystoneProfileSeason, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/mythic-keystone-profile/season/%d",
- realmSlug, strings.ToLower(characterName), seasonID),
- c.GetProfileNamespace(),
- &wowp.CharacterMythicKeystoneProfileSeason{},
- )
- return dat.(*wowp.CharacterMythicKeystoneProfileSeason), header, err
-}
-
-// WoWCharacterProfessionsSummary returns a summary of professions for a character.
-func (c *Client) WoWCharacterProfessionsSummary(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterProfessionsSummary, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/professions", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterProfessionsSummary{},
- )
- return dat.(*wowp.CharacterProfessionsSummary), header, err
-}
-
-// WoWCharacterProfileSummary returns a profile summary for a character.
-func (c *Client) WoWCharacterProfileSummary(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterProfileSummary, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterProfileSummary{},
- )
- return dat.(*wowp.CharacterProfileSummary), header, err
-}
-
-// WoWCharacterProfileStatus returns the status and a unique ID for a character.
-// A client should delete information about a character from their application if any of the following conditions occur:
-// * an HTTP 404 Not Found error is returned
-// * the is_valid value is false
-// * the returned character ID doesn't match the previously recorded value for the character
-// The following example illustrates how to use this endpoint:
-// 1. A client requests and stores information about a character, including its unique character ID and the timestamp of the request.
-// 2. After 30 days, the client makes a request to the status endpoint to verify if the character information is still valid.
-// 3. If character cannot be found, is not valid, or the characters IDs do not match, the client removes the information from their application.
-// 4. If the character is valid and the character IDs match, the client retains the data for another 30 days.
-func (c *Client) WoWCharacterProfileStatus(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterProfileStatus, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/status", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterProfileStatus{},
- )
- return dat.(*wowp.CharacterProfileStatus), header, err
-}
-
-// WoWCharacterMythicKeystoneProfile returns a Mythic Keystone Profile index for a character.
-func (c *Client) WoWCharacterMythicKeystoneProfile(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterMythicKeystoneProfile, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/mythic-keystone-profile", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterMythicKeystoneProfile{},
- )
- return dat.(*wowp.CharacterMythicKeystoneProfile), header, err
-}
-
-// WoWCharacterMythicKeystoneProfileSeason returns a Mythic Keystone Profile index for a character.
-// Note: this request returns a 404 for characters that have not completed a Mythic Keystone dungeon.
-func (c *Client) WoWCharacterMythicKeystoneProfileSeason(ctx context.Context, realmSlug, characterName string,
- seasonID int) (*wowp.CharacterMythicKeystoneProfileSeason, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/mythic-keystone-profile/season/%d", realmSlug, strings.ToLower(characterName), seasonID),
- c.GetProfileNamespace(),
- &wowp.CharacterMythicKeystoneProfileSeason{},
- )
- return dat.(*wowp.CharacterMythicKeystoneProfileSeason), header, err
-}
-
-// WoWCharacterPvPBracketStatistics returns the PvP bracket statistics for a character.
-func (c *Client) WoWCharacterPvPBracketStatistics(ctx context.Context,
- realmSlug, characterName string, pvpBracket wowp.Bracket) (*wowp.CharacterPvPBracketStatistics, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/pvp-bracket/%s", realmSlug, strings.ToLower(characterName), pvpBracket),
- c.GetProfileNamespace(),
- &wowp.CharacterPvPBracketStatistics{},
- )
- return dat.(*wowp.CharacterPvPBracketStatistics), header, err
-}
-
-// WoWCharacterPvPSummary returns a PvP summary for a character.
-func (c *Client) WoWCharacterPvPSummary(ctx context.Context, realmSlug, characterName string) (*wowp.CharacterPvPSummary, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/pvp-summary", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterPvPSummary{},
- )
- return dat.(*wowp.CharacterPvPSummary), header, err
-}
-
-// WoWCharacterQuests returns a character's active quests as well as a link to the character's completed quests.
-func (c *Client) WoWCharacterQuests(ctx context.Context, realmSlug, characterName string) (*wowp.CharacterQuests, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/quests", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterQuests{},
- )
- return dat.(*wowp.CharacterQuests), header, err
-}
-
-// WoWCharacterCompletedQuests returns a list of quests that a character has completed.
-func (c *Client) WoWCharacterCompletedQuests(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterCompletedQuests, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/quests/completed", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterCompletedQuests{},
- )
- return dat.(*wowp.CharacterCompletedQuests), header, err
-}
-
-// WoWCharacterReputationsSummary returns a summary of a character's reputations.
-func (c *Client) WoWCharacterReputationsSummary(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterReputationsSummary, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/reputations", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterReputationsSummary{},
- )
- return dat.(*wowp.CharacterReputationsSummary), header, err
-}
-
-// WoWCharacterSoulbinds returns a character's soulbinds.
-func (c *Client) WoWCharacterSoulbinds(ctx context.Context, realmSlug,
- characterName string) (*wowp.CharacterSoulbinds, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/soulbinds", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterSoulbinds{},
- )
- return dat.(*wowp.CharacterSoulbinds), header, err
-}
-
-// WoWCharacterSpecializationsSummary returns a summary of a character's specializations.
-func (c *Client) WoWCharacterSpecializationsSummary(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterSpecializationsSummary, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/specializations", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterSpecializationsSummary{},
- )
- return dat.(*wowp.CharacterSpecializationsSummary), header, err
-}
-
-// WoWCharacterStatisticsSummary returns a statistics summary for a character.
-func (c *Client) WoWCharacterStatisticsSummary(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterStatisticsSummary, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/statistics", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterStatisticsSummary{},
- )
- return dat.(*wowp.CharacterStatisticsSummary), header, err
-}
-
-// WoWCharacterTitlesSummary returns a summary of titles a character has obtained.
-func (c *Client) WoWCharacterTitlesSummary(ctx context.Context,
- realmSlug, characterName string) (*wowp.CharacterTitlesSummary, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/profile/wow/character/%s/%s/titles", realmSlug, strings.ToLower(characterName)),
- c.GetProfileNamespace(),
- &wowp.CharacterTitlesSummary{},
- )
- return dat.(*wowp.CharacterTitlesSummary), header, err
-}
-
-// WoWGuild returns a single guild by its name and realm.
-func (c *Client) WoWGuild(ctx context.Context, realmSlug, nameSlug string) (*wowp.Guild, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/guild/%s/%s", realmSlug, formatNameSlug(nameSlug)),
- c.GetProfileNamespace(),
- &wowp.Guild{},
- )
- return dat.(*wowp.Guild), header, err
-}
-
-// WoWGuildActivity returns a single guild's activity by name and realm.
-func (c *Client) WoWGuildActivity(ctx context.Context, realmSlug, nameSlug string) (*wowp.GuildActivity, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/guild/%s/%s/activity", realmSlug, formatNameSlug(nameSlug)),
- c.GetProfileNamespace(),
- &wowp.GuildActivity{},
- )
- return dat.(*wowp.GuildActivity), header, err
-}
-
-// WoWGuildAchievements returns a single guild's achievements by name and realm.
-func (c *Client) WoWGuildAchievements(ctx context.Context, realmSlug, nameSlug string) (*wowp.GuildAchievements, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/guild/%s/%s/achievements", realmSlug, formatNameSlug(nameSlug)),
- c.GetProfileNamespace(),
- &wowp.GuildAchievements{},
- )
- return dat.(*wowp.GuildAchievements), header, err
-}
-
-// WoWGuildRoster returns a single guild's roster by its name and realm.
-func (c *Client) WoWGuildRoster(ctx context.Context, realmSlug, nameSlug string) (*wowp.GuildRoster, *Header, error) {
- dat, header, err := c.getStructData(ctx,
- fmt.Sprintf("/data/wow/guild/%s/%s/roster", realmSlug, formatNameSlug(nameSlug)),
- c.GetProfileNamespace(),
- &wowp.GuildRoster{},
- )
- return dat.(*wowp.GuildRoster), header, err
-}
-
-func formatNameSlug(nameSlug string) string {
- return strings.Replace(strings.ToLower(nameSlug), " ", "-", -1)
-}
diff --git a/v2/wowp/accountProfileSummary.go b/v2/wowp/accountProfileSummary.go
deleted file mode 100644
index a290531..0000000
--- a/v2/wowp/accountProfileSummary.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package wowp
-
-// AccountProfileSummary structure
-type AccountProfileSummary struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- User struct {
- Href string `json:"href"`
- } `json:"user"`
- Profile struct {
- Href string `json:"href"`
- } `json:"profile"`
- } `json:"_links"`
- ID int `json:"id"`
- WowAccounts []struct {
- ID int `json:"id"`
- Characters []struct {
- Character struct {
- Href string `json:"href"`
- } `json:"character"`
- ProtectedCharacter struct {
- Href string `json:"href"`
- } `json:"protected_character"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- PlayableClass struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"playable_class"`
- PlayableRace struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"playable_race"`
- Gender struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"gender"`
- Faction struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"faction"`
- Level int `json:"level"`
- } `json:"characters"`
- } `json:"wow_accounts"`
- Collections struct {
- Href string `json:"href"`
- } `json:"collections"`
-}
diff --git a/v2/wowp/characterAchievements.go b/v2/wowp/characterAchievements.go
deleted file mode 100644
index 9125347..0000000
--- a/v2/wowp/characterAchievements.go
+++ /dev/null
@@ -1,116 +0,0 @@
-package wowp
-
-// ChildCriteria struct used for representing nested Achievement criteria
-type ChildCriteria []struct {
- ID int `json:"id"`
- Amount float64 `json:"amount"`
- IsCompleted bool `json:"is_completed"`
- ChildCriteria ChildCriteria `json:"child_criteria,omitempty"`
-}
-
-// CharacterAchievementsSummary structure
-type CharacterAchievementsSummary struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- TotalQuantity int `json:"total_quantity"`
- TotalPoints int `json:"total_points"`
- Achievements []struct {
- ID int `json:"id,omitempty"`
- Achievement struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"achievement"`
- Criteria struct {
- ID int `json:"id"`
- Amount float64 `json:"amount"`
- IsCompleted bool `json:"is_completed"`
- ChildCriteria ChildCriteria `json:"child_criteria,omitempty"`
- } `json:"criteria,omitempty"`
- CompleteTimestamp int64 `json:"completed_timestamp"`
- } `json:"achievements"`
- CategoryProgress []struct {
- Category struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"category"`
- Quantity int `json:"quantity"`
- Points int `json:"points"`
- } `json:"category_progress"`
- RecentEvents []struct {
- Achievement struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"achievement"`
- Timestamp int64 `json:"timestamp"`
- } `json:"recent_events"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
-}
-
-// Statistics struct used for representing nested Statistics
-type Statistics []struct {
- ID int `json:"id"`
- Name string `json:"name"`
- LastUpdatedTimestamp int64 `json:"last_updated_timestamp"`
- Quantity float64 `json:"quantity"`
- Description string `json:"description,omitempty"`
-}
-
-// CharacterAchievementsStatistics structure
-type CharacterAchievementsStatistics struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- Categories []struct {
- ID int `json:"id"`
- Name string `json:"name"`
- SubCategories []struct {
- ID int `json:"id"`
- Name string `json:"name"`
- Statistics Statistics `json:"statistics"`
- } `json:"sub_categories,omitempty"`
- Statistics Statistics `json:"statistics,omitempty"`
- } `json:"categories"`
-}
diff --git a/v2/wowp/characterAppearance.go b/v2/wowp/characterAppearance.go
deleted file mode 100644
index c5ef10a..0000000
--- a/v2/wowp/characterAppearance.go
+++ /dev/null
@@ -1,120 +0,0 @@
-package wowp
-
-// CharacterAppearanceSummary structure
-type CharacterAppearanceSummary struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- PlayableRace struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"playable_race"`
- PlayableClass struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"playable_class"`
- ActiveSpec struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"active_spec"`
- Gender struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"gender"`
- Faction struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"faction"`
- GuildCrest struct {
- Emblem struct {
- ID int `json:"id"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- } `json:"media"`
- Color struct {
- ID int `json:"id"`
- Rgba struct {
- R int `json:"r"`
- G int `json:"g"`
- B int `json:"b"`
- A float64 `json:"a"`
- } `json:"rgba"`
- } `json:"color"`
- } `json:"emblem"`
- Border struct {
- ID int `json:"id"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- } `json:"media"`
- Color struct {
- ID int `json:"id"`
- Rgba struct {
- R int `json:"r"`
- G int `json:"g"`
- B int `json:"b"`
- A float64 `json:"a"`
- } `json:"rgba"`
- } `json:"color"`
- } `json:"border"`
- Background struct {
- Color struct {
- ID int `json:"id"`
- Rgba struct {
- R int `json:"r"`
- G int `json:"g"`
- B int `json:"b"`
- A float64 `json:"a"`
- } `json:"rgba"`
- } `json:"color"`
- } `json:"background"`
- } `json:"guild_crest"`
- Appearance struct {
- FaceVariation int `json:"face_variation"`
- SkinColor int `json:"skin_color"`
- HairVariation int `json:"hair_variation"`
- HairColor int `json:"hair_color"`
- FeatureVariation int `json:"feature_variation"`
- CustomDisplayOptions []int `json:"custom_display_options"`
- } `json:"appearance"`
- Items []struct {
- ID int `json:"id"`
- Slot struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"slot"`
- Enchant int `json:"enchant"`
- ItemAppearanceModifierID int `json:"item_appearance_modifier_id"`
- InternalSlotID int `json:"internal_slot_id"`
- Subclass int `json:"subclass"`
- } `json:"items"`
-}
diff --git a/v2/wowp/characterCollections.go b/v2/wowp/characterCollections.go
deleted file mode 100644
index 44f9c11..0000000
--- a/v2/wowp/characterCollections.go
+++ /dev/null
@@ -1,66 +0,0 @@
-package wowp
-
-// CharacterCollectionsIndex structure
-type CharacterCollectionsIndex struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Pets struct {
- Href string `json:"href"`
- } `json:"pets"`
- Mounts struct {
- Href string `json:"href"`
- } `json:"mounts"`
-}
-
-// CharacterMountsCollectionSummary structure
-type CharacterMountsCollectionSummary struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Mounts []struct {
- Mount struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"mount"`
- IsFavorite bool `json:"is_favorite,omitempty"`
- } `json:"mounts"`
-}
-
-// CharacterPetsCollectionSummary structure
-type CharacterPetsCollectionSummary struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Pets []struct {
- Species struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"species"`
- Level int `json:"level"`
- Quality struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"quality"`
- Stats struct {
- BreedID int `json:"breed_id"`
- Health int `json:"health"`
- Power int `json:"power"`
- Speed int `json:"speed"`
- } `json:"stats"`
- IsFavorite bool `json:"is_favorite,omitempty"`
- } `json:"pets"`
- UnlockedBattlePetSlots int `json:"unlocked_battle_pet_slots"`
-}
diff --git a/v2/wowp/characterEncounters.go b/v2/wowp/characterEncounters.go
deleted file mode 100644
index 988182c..0000000
--- a/v2/wowp/characterEncounters.go
+++ /dev/null
@@ -1,150 +0,0 @@
-package wowp
-
-// CharacterEncountersSummary structure
-type CharacterEncountersSummary struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- Dungeons struct {
- Href string `json:"href"`
- } `json:"dungeons"`
- Raids struct {
- Href string `json:"href"`
- } `json:"raids"`
-}
-
-// CharacterDungeons structure
-type CharacterDungeons struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Expansions []struct {
- Expansion struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"expansion"`
- Instances []struct {
- Instance struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"instance"`
- Modes []struct {
- Difficulty struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"difficulty"`
- Status struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"status"`
- Progress struct {
- CompletedCount int `json:"completed_count"`
- TotalCount int `json:"total_count"`
- Encounters []struct {
- Encounter struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"encounter"`
- CompletedCount int `json:"completed_count"`
- LastKillTimestamp int64 `json:"last_kill_timestamp"`
- } `json:"encounters"`
- } `json:"progress"`
- } `json:"modes"`
- } `json:"instances"`
- } `json:"expansions"`
-}
-
-// CharacterRaids structure
-type CharacterRaids struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- Expansions []struct {
- Expansion struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"expansion"`
- Instances []struct {
- Instance struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"instance"`
- Modes []struct {
- Difficulty struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"difficulty"`
- Status struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"status"`
- Progress struct {
- CompletedCount int `json:"completed_count"`
- TotalCount int `json:"total_count"`
- Encounters []struct {
- Encounter struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"encounter"`
- CompletedCount int `json:"completed_count"`
- LastKillTimestamp int64 `json:"last_kill_timestamp"`
- } `json:"encounters"`
- } `json:"progress"`
- } `json:"modes"`
- } `json:"instances"`
- } `json:"expansions"`
-}
diff --git a/v2/wowp/characterEquipment.go b/v2/wowp/characterEquipment.go
deleted file mode 100644
index 80b6a82..0000000
--- a/v2/wowp/characterEquipment.go
+++ /dev/null
@@ -1,303 +0,0 @@
-package wowp
-
-// CharacterEquipmentSummary structure
-type CharacterEquipmentSummary struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- EquippedItems []struct {
- Item struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"item"`
- Slot struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"slot"`
- Quantity int `json:"quantity"`
- Context int `json:"context"`
- BonusList []int `json:"bonus_list"`
- Quality struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"quality"`
- Name string `json:"name"`
- ModifiedAppearanceID int `json:"modified_appearance_id,omitempty"`
- AzeriteDetails struct {
- SelectedPowers []struct {
- ID int `json:"id"`
- Tier int `json:"tier"`
- SpellTooltip struct {
- Spell struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"spell"`
- Description string `json:"description"`
- CastTime string `json:"cast_time"`
- } `json:"spell_tooltip"`
- IsDisplayHidden bool `json:"is_display_hidden,omitempty"`
- } `json:"selected_powers"`
- SelectedPowersString string `json:"selected_powers_string"`
- PercentageToNextLevel float64 `json:"percentage_to_next_level"`
- SelectedEssences []struct {
- Slot int `json:"slot"`
- Rank int `json:"rank"`
- MainSpellTooltip struct {
- Spell struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"spell"`
- Description string `json:"description"`
- CastTime string `json:"cast_time"`
- Range string `json:"range"`
- } `json:"main_spell_tooltip,omitempty"`
- PassiveSpellTooltip struct {
- Spell struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"spell"`
- Description string `json:"description"`
- CastTime string `json:"cast_time"`
- } `json:"passive_spell_tooltip"`
- Essence struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"essence"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
- } `json:"selected_essences"`
- Level struct {
- Value int `json:"value"`
- DisplayString string `json:"display_string"`
- } `json:"level"`
- } `json:"azerite_details,omitempty"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
- ItemClass struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"item_class"`
- ItemSubclass struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"item_subclass"`
- InventoryType struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"inventory_type"`
- Binding struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"binding"`
- Armor struct {
- Value int `json:"value"`
- Display struct {
- DisplayString string `json:"display_string"`
- Color struct {
- R int `json:"r"`
- G int `json:"g"`
- B int `json:"b"`
- A float64 `json:"a"`
- } `json:"color"`
- } `json:"display"`
- } `json:"armor,omitempty"`
- Stats []struct {
- Type struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"type"`
- Value int `json:"value"`
- Display struct {
- DisplayString string `json:"display_string"`
- Color struct {
- R int `json:"r"`
- G int `json:"g"`
- B int `json:"b"`
- A float64 `json:"a"`
- } `json:"color"`
- } `json:"display"`
- IsNegated bool `json:"is_negated,omitempty"`
- } `json:"stats"`
- Level struct {
- Value int `json:"value"`
- DisplayString string `json:"display_string"`
- } `json:"level"`
- Transmog struct {
- Item struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"item"`
- DisplayString string `json:"display_string"`
- ItemModifiedAppearanceID int `json:"item_modified_appearance_id"`
- } `json:"transmog,omitempty"`
- Durability struct {
- Value int `json:"value"`
- DisplayString string `json:"display_string"`
- } `json:"durability,omitempty"`
- NameDescription struct {
- DisplayString string `json:"display_string"`
- Color struct {
- R int `json:"r"`
- G int `json:"g"`
- B int `json:"b"`
- A float64 `json:"a"`
- } `json:"color"`
- } `json:"name_description,omitempty"`
- UniqueEquipped string `json:"unique_equipped,omitempty"`
- Spells []struct {
- Spell struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"spell"`
- Description string `json:"description"`
- DisplayColor struct {
- R int `json:"r"`
- G int `json:"g"`
- B int `json:"b"`
- A float64 `json:"a"`
- } `json:"display_color"`
- } `json:"spells,omitempty"`
- Description string `json:"description,omitempty"`
- IsSubclassHidden bool `json:"is_subclass_hidden,omitempty"`
- Sockets []struct {
- SocketType struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"socket_type"`
- Item struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"item"`
- DisplayString string `json:"display_string"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
- } `json:"sockets,omitempty"`
- SellPrice struct {
- Value int `json:"value"`
- DisplayStrings struct {
- Header string `json:"header"`
- Gold string `json:"gold"`
- Silver string `json:"silver"`
- Copper string `json:"copper"`
- } `json:"display_strings"`
- } `json:"sell_price,omitempty"`
- IsCorrupted bool `json:"is_corrupted,omitempty"`
- Enchantments []struct {
- DisplayString string `json:"display_string"`
- SourceItem struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"source_item"`
- EnchantmentID int `json:"enchantment_id"`
- EnchantmentSlot struct {
- ID int `json:"id"`
- Type string `json:"type"`
- } `json:"enchantment_slot"`
- } `json:"enchantments,omitempty"`
- LimitCategory string `json:"limit_category,omitempty"`
- Requirements struct {
- Level struct {
- Value int `json:"value"`
- DisplayString string `json:"display_string"`
- } `json:"level"`
- Faction struct {
- Value struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"value"`
- DisplayString string `json:"display_string"`
- } `json:"faction"`
- Skill struct {
- Profession struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"profession"`
- Level int `json:"level"`
- DisplayString string `json:"display_string"`
- } `json:"skill"`
- } `json:"requirements,omitempty"`
- Weapon struct {
- Damage struct {
- MinValue int `json:"min_value"`
- MaxValue int `json:"max_value"`
- DisplayString string `json:"display_string"`
- DamageClass struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"damage_class"`
- } `json:"damage"`
- AttackSpeed struct {
- Value int `json:"value"`
- DisplayString string `json:"display_string"`
- } `json:"attack_speed"`
- Dps struct {
- Value float64 `json:"value"`
- DisplayString string `json:"display_string"`
- } `json:"dps"`
- } `json:"weapon,omitempty"`
- } `json:"equipped_items"`
-}
diff --git a/v2/wowp/characterHunterPets.go b/v2/wowp/characterHunterPets.go
deleted file mode 100644
index 23110f9..0000000
--- a/v2/wowp/characterHunterPets.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package wowp
-
-// CharacterHunterPetsSummary structure
-type CharacterHunterPetsSummary struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- HunterPets []struct {
- Name string `json:"name"`
- Level int `json:"level"`
- Creature struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"creature"`
- Slot int `json:"slot"`
- IsActive bool `json:"is_active"`
- CreatureDisplay struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- } `json:"creature_display"`
- } `json:"hunter_pets"`
-}
diff --git a/v2/wowp/characterMedia.go b/v2/wowp/characterMedia.go
deleted file mode 100644
index 87aedee..0000000
--- a/v2/wowp/characterMedia.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package wowp
-
-// CharacterMediaSummary structure
-type CharacterMediaSummary struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- Assets []struct {
- Key string `json:"key"`
- Value string `json:"value"`
- } `json:"assets"`
-}
diff --git a/v2/wowp/characterMythicKeystoneProfile.go b/v2/wowp/characterMythicKeystoneProfile.go
deleted file mode 100644
index c1a00b4..0000000
--- a/v2/wowp/characterMythicKeystoneProfile.go
+++ /dev/null
@@ -1,141 +0,0 @@
-package wowp
-
-// CharacterMythicKeystoneProfile structure
-type CharacterMythicKeystoneProfile struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Character struct {
- Href string `json:"href"`
- } `json:"character"`
- CurrentPeriod struct {
- Period struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"period"`
- BestRuns []struct {
- CompletedTimestamp int64 `json:"completed_timestamp"`
- Duration int `json:"duration"`
- KeystoneLevel int `json:"keystone_level"`
- KeystoneAffixes []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"keystone_affixes"`
- Members []struct {
- Character struct {
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- Specialization struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"specialization"`
- Race struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"race"`
- EquippedItemLevel int `json:"equipped_item_level"`
- } `json:"members"`
- Dungeon struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"dungeon"`
- IsCompletedWithinTime bool `json:"is_completed_within_time"`
- } `json:"best_runs"`
- } `json:"current_period"`
- Seasons []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"seasons"`
-}
-
-// CharacterMythicKeystoneProfileSeason structure
-type CharacterMythicKeystoneProfileSeason struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Season struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"season"`
- BestRuns []struct {
- CompletedTimestamp int64 `json:"completed_timestamp"`
- Duration int `json:"duration"`
- KeystoneLevel int `json:"keystone_level"`
- KeystoneAffixes []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"keystone_affixes"`
- Members []struct {
- Character struct {
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- Specialization struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"specialization"`
- Race struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"race"`
- EquippedItemLevel int `json:"equipped_item_level"`
- } `json:"members"`
- Dungeon struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"dungeon"`
- IsCompletedWithinTime bool `json:"is_completed_within_time"`
- } `json:"best_runs"`
- Character struct {
- Href string `json:"href"`
- } `json:"character"`
-}
diff --git a/v2/wowp/characterProfessions.go b/v2/wowp/characterProfessions.go
deleted file mode 100644
index 127dc38..0000000
--- a/v2/wowp/characterProfessions.go
+++ /dev/null
@@ -1,73 +0,0 @@
-package wowp
-
-// CharacterProfessionsSummary structure
-type CharacterProfessionsSummary struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- Primaries []struct {
- Profession struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"profession"`
- Tiers []struct {
- SkillPoints int `json:"skill_points"`
- MaxSkillPoints int `json:"max_skill_points"`
- Tier struct {
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"tier"`
- KnownRecipes []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"known_recipes"`
- } `json:"tiers"`
- } `json:"primaries"`
- Secondaries []struct {
- Profession struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"profession"`
- Tiers []struct {
- SkillPoints int `json:"skill_points"`
- MaxSkillPoints int `json:"max_skill_points"`
- Tier struct {
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"tier"`
- KnownRecipes []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"known_recipes"`
- } `json:"tiers"`
- } `json:"secondaries"`
-}
diff --git a/v2/wowp/characterProfile.go b/v2/wowp/characterProfile.go
deleted file mode 100644
index a7c0686..0000000
--- a/v2/wowp/characterProfile.go
+++ /dev/null
@@ -1,271 +0,0 @@
-package wowp
-
-// CharacterProfileSummary structure
-type CharacterProfileSummary struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Gender struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"gender"`
- Faction struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"faction"`
- Race struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"race"`
- CharacterClass struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"character_class"`
- ActiveSpec struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"active_spec"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- Guild struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"guild"`
- Level int `json:"level"`
- Experience int `json:"experience"`
- AchievementPoints int `json:"achievement_points"`
- Achievements struct {
- Href string `json:"href"`
- } `json:"achievements"`
- Titles struct {
- Href string `json:"href"`
- } `json:"titles"`
- PvpSummary struct {
- Href string `json:"href"`
- } `json:"pvp_summary"`
- RaidProgression struct {
- Href string `json:"href"`
- } `json:"raid_progression"`
- Media struct {
- Href string `json:"href"`
- } `json:"media"`
- LastLoginTimestamp int64 `json:"last_login_timestamp"`
- AverageItemLevel int `json:"average_item_level"`
- EquippedItemLevel int `json:"equipped_item_level"`
- Specializations struct {
- Href string `json:"href"`
- } `json:"specializations"`
- Statistics struct {
- Href string `json:"href"`
- } `json:"statistics"`
- MythicKeystoneProfile struct {
- Href string `json:"href"`
- } `json:"mythic_keystone_profile"`
- Equipment struct {
- Href string `json:"href"`
- } `json:"equipment"`
- Appearance struct {
- Href string `json:"href"`
- } `json:"appearance"`
- Collections struct {
- Href string `json:"href"`
- } `json:"collections"`
- ActiveTitle ActiveTitle `json:"active_title"`
- Reputations struct {
- Href string `json:"href"`
- } `json:"reputations"`
-}
-
-// ActiveTitle structure
-type ActiveTitle struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- DisplayString string `json:"display_string"`
-}
-
-// CharacterProfileSummaryPreRev24 structure
-type CharacterProfileSummaryPreRev24 struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Gender struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"gender"`
- Faction struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"faction"`
- Race struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"race"`
- CharacterClass struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"character_class"`
- ActiveSpec struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"active_spec"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- Guild struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"guild"`
- Level int `json:"level"`
- Experience int `json:"experience"`
- AchievementPoints int `json:"achievement_points"`
- Achievements struct {
- Href string `json:"href"`
- } `json:"achievements"`
- Titles struct {
- Href string `json:"href"`
- } `json:"titles"`
- PvpSummary struct {
- Href string `json:"href"`
- } `json:"pvp_summary"`
- RaidProgression struct {
- Href string `json:"href"`
- } `json:"raid_progression"`
- Media struct {
- Href string `json:"href"`
- } `json:"media"`
- LastLoginTimestamp int64 `json:"last_login_timestamp"`
- AverageItemLevel int `json:"average_item_level"`
- EquippedItemLevel int `json:"equipped_item_level"`
- Specializations struct {
- Href string `json:"href"`
- } `json:"specializations"`
- Statistics struct {
- Href string `json:"href"`
- } `json:"statistics"`
- MythicKeystoneProfile struct {
- Href string `json:"href"`
- } `json:"mythic_keystone_profile"`
- Equipment struct {
- Href string `json:"href"`
- } `json:"equipment"`
- Appearance struct {
- Href string `json:"href"`
- } `json:"appearance"`
- Collections struct {
- Href string `json:"href"`
- } `json:"collections"`
- Reputations struct {
- Href string `json:"href"`
- } `json:"reputations"`
-}
-
-// ActiveTitlePreRev24 structure
-type ActiveTitlePreRev24 struct {
- ActiveTitle string `json:"active_title"`
-}
-
-// CharacterProfileStatus structure
-type CharacterProfileStatus struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- IsValid bool `json:"is_valid"`
-}
-
-func ConvertCharacterProfileSummaryPreRev24(activeTitle string,
- cpspr *CharacterProfileSummaryPreRev24, cps *CharacterProfileSummary) {
- cps.Links = cpspr.Links
- cps.ID = cpspr.ID
- cps.Name = cpspr.Name
- cps.Gender = cpspr.Gender
- cps.Faction = cpspr.Faction
- cps.Race = cpspr.Race
- cps.CharacterClass = cpspr.CharacterClass
- cps.ActiveSpec = cpspr.ActiveSpec
- cps.Realm = cpspr.Realm
- cps.Guild = cpspr.Guild
- cps.Level = cpspr.Level
- cps.Experience = cpspr.Experience
- cps.AchievementPoints = cpspr.AchievementPoints
- cps.Achievements = cpspr.Achievements
- cps.Titles = cpspr.Titles
- cps.PvpSummary = cpspr.PvpSummary
- cps.RaidProgression = cpspr.RaidProgression
- cps.Media = cpspr.Media
- cps.LastLoginTimestamp = cpspr.LastLoginTimestamp
- cps.AverageItemLevel = cpspr.AverageItemLevel
- cps.EquippedItemLevel = cpspr.EquippedItemLevel
- cps.Specializations = cpspr.Specializations
- cps.Statistics = cpspr.Statistics
- cps.MythicKeystoneProfile = cpspr.MythicKeystoneProfile
- cps.Equipment = cpspr.Equipment
- cps.Appearance = cpspr.Appearance
- cps.Collections = cpspr.Collections
- cps.ActiveTitle.Name = activeTitle
- cps.Reputations = cpspr.Reputations
-}
diff --git a/v2/wowp/characterPvP.go b/v2/wowp/characterPvP.go
deleted file mode 100644
index 6931e80..0000000
--- a/v2/wowp/characterPvP.go
+++ /dev/null
@@ -1,96 +0,0 @@
-package wowp
-
-// CharacterPvPBracketStatistics structure
-type CharacterPvPBracketStatistics struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- Faction struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"faction"`
- Bracket struct {
- ID int `json:"id"`
- Type string `json:"type"`
- } `json:"bracket"`
- Rating int `json:"rating"`
- Season struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"season"`
- Tier struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"tier"`
- SeasonMatchStatistics struct {
- Played int `json:"played"`
- Won int `json:"won"`
- Lost int `json:"lost"`
- } `json:"season_match_statistics"`
- WeeklyMatchStatistics struct {
- Played int `json:"played"`
- Won int `json:"won"`
- Lost int `json:"lost"`
- } `json:"weekly_match_statistics"`
-}
-
-// CharacterPvPSummary structure
-type CharacterPvPSummary struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Brackets []struct {
- Href string `json:"href"`
- } `json:"brackets"`
- HonorLevel int `json:"honor_level"`
- PvpMapStatistics []struct {
- WorldMap struct {
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"world_map"`
- MatchStatistics struct {
- Played int `json:"played"`
- Won int `json:"won"`
- Lost int `json:"lost"`
- } `json:"match_statistics"`
- } `json:"pvp_map_statistics"`
- HonorableKills int `json:"honorable_kills"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
-}
diff --git a/v2/wowp/characterQuests.go b/v2/wowp/characterQuests.go
deleted file mode 100644
index 42c878b..0000000
--- a/v2/wowp/characterQuests.go
+++ /dev/null
@@ -1,66 +0,0 @@
-package wowp
-
-// CharacterQuests structure
-type CharacterQuests struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- InProgress []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"in_progress"`
- Completed struct {
- Href string `json:"href"`
- } `json:"completed"`
-}
-
-// CharacterCompletedQuests structure
-type CharacterCompletedQuests struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- Quests []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"quests"`
-}
diff --git a/v2/wowp/characterReputations.go b/v2/wowp/characterReputations.go
deleted file mode 100644
index 4bba0f6..0000000
--- a/v2/wowp/characterReputations.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package wowp
-
-// CharacterReputationsSummary structure
-type CharacterReputationsSummary struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- Reputations []struct {
- Faction struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"faction"`
- Standing struct {
- Raw int `json:"raw"`
- Value int `json:"value"`
- Max int `json:"max"`
- Tier int `json:"tier"`
- Name string `json:"name"`
- } `json:"standing"`
- Paragon struct {
- Raw int `json:"raw"`
- Value int `json:"value"`
- Max int `json:"max"`
- } `json:"paragon,omitempty"`
- } `json:"reputations"`
-}
diff --git a/v2/wowp/characterSoulbinds.go b/v2/wowp/characterSoulbinds.go
deleted file mode 100644
index 2d84030..0000000
--- a/v2/wowp/characterSoulbinds.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package wowp
-
-// CharacterSoulbinds structure
-type CharacterSoulbinds struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- ChosenCovenant struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"chosen_covenant"`
- RenownLevel int `json:"renown_level"`
- Soulbinds []struct {
- Soulbind struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"soulbind"`
- Traits []struct {
- Trait struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"trait,omitempty"`
- Tier int `json:"tier"`
- DisplayOrder int `json:"display_order"`
- ConduitSocket struct {
- Type struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"type"`
- Socket struct {
- Conduit struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"conduit"`
- Rank int `json:"rank"`
- } `json:"socket"`
- } `json:"conduit_socket,omitempty"`
- } `json:"traits"`
- IsActive bool `json:"is_active,omitempty"`
- } `json:"soulbinds"`
-}
diff --git a/v2/wowp/characterSpecializations.go b/v2/wowp/characterSpecializations.go
deleted file mode 100644
index 9b60dfc..0000000
--- a/v2/wowp/characterSpecializations.go
+++ /dev/null
@@ -1,95 +0,0 @@
-package wowp
-
-// CharacterSpecializationsSummary structure
-type CharacterSpecializationsSummary struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Specializations []struct {
- Specialization struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"specialization"`
- Talents []struct {
- Talent struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"talent"`
- SpellTooltip struct {
- Spell struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"spell"`
- Description string `json:"description"`
- CastTime string `json:"cast_time"`
- PowerCost interface{} `json:"power_cost"`
- Range string `json:"range"`
- Cooldown string `json:"cooldown"`
- } `json:"spell_tooltip,omitempty"`
- } `json:"talents"`
- Glyphs []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"glyphs,omitempty"`
- PvpTalentSlots []struct {
- Selected struct {
- Talent struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"talent"`
- SpellTooltip struct {
- Spell struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"spell"`
- Description string `json:"description"`
- CastTime string `json:"cast_time"`
- Cooldown string `json:"cooldown"`
- } `json:"spell_tooltip"`
- } `json:"selected"`
- SlotNumber int `json:"slot_number"`
- } `json:"pvp_talent_slots,omitempty"`
- } `json:"specializations"`
- ActiveSpecialization struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"active_specialization"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
-}
diff --git a/v2/wowp/characterStatistics.go b/v2/wowp/characterStatistics.go
deleted file mode 100644
index a937eea..0000000
--- a/v2/wowp/characterStatistics.go
+++ /dev/null
@@ -1,135 +0,0 @@
-package wowp
-
-// CharacterStatisticsSummary structure
-type CharacterStatisticsSummary struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Health int `json:"health"`
- Power int `json:"power"`
- PowerType struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"power_type"`
- Speed struct {
- Rating int `json:"rating"`
- RatingBonus float64 `json:"rating_bonus"`
- } `json:"speed"`
- Strength struct {
- Base int `json:"base"`
- Effective int `json:"effective"`
- } `json:"strength"`
- Agility struct {
- Base int `json:"base"`
- Effective int `json:"effective"`
- } `json:"agility"`
- Intellect struct {
- Base int `json:"base"`
- Effective int `json:"effective"`
- } `json:"intellect"`
- Stamina struct {
- Base int `json:"base"`
- Effective int `json:"effective"`
- } `json:"stamina"`
- MeleeCrit struct {
- Rating int `json:"rating"`
- RatingBonus float64 `json:"rating_bonus"`
- Value float64 `json:"value"`
- } `json:"melee_crit"`
- MeleeHaste struct {
- Rating int `json:"rating"`
- RatingBonus float64 `json:"rating_bonus"`
- Value float64 `json:"value"`
- } `json:"melee_haste"`
- Mastery struct {
- Rating int `json:"rating"`
- RatingBonus float64 `json:"rating_bonus"`
- Value float64 `json:"value"`
- } `json:"mastery"`
- BonusArmor int `json:"bonus_armor"`
- Lifesteal struct {
- Rating int `json:"rating"`
- RatingBonus float64 `json:"rating_bonus"`
- Value float64 `json:"value"`
- } `json:"lifesteal"`
- Versatility float64 `json:"versatility"`
- VersatilityDamageDoneBonus float64 `json:"versatility_damage_done_bonus"`
- VersatilityHealingDoneBonus float64 `json:"versatility_healing_done_bonus"`
- VersatilityDamageTakenBonus float64 `json:"versatility_damage_taken_bonus"`
- Avoidance struct {
- Rating int `json:"rating"`
- RatingBonus float64 `json:"rating_bonus"`
- } `json:"avoidance"`
- AttackPower int `json:"attack_power"`
- MainHandDamageMin float64 `json:"main_hand_damage_min"`
- MainHandDamageMax float64 `json:"main_hand_damage_max"`
- MainHandSpeed float64 `json:"main_hand_speed"`
- MainHandDps float64 `json:"main_hand_dps"`
- OffHandDamageMin float64 `json:"off_hand_damage_min"`
- OffHandDamageMax float64 `json:"off_hand_damage_max"`
- OffHandSpeed float64 `json:"off_hand_speed"`
- OffHandDps float64 `json:"off_hand_dps"`
- SpellPower int `json:"spell_power"`
- SpellPenetration int `json:"spell_penetration"`
- SpellCrit struct {
- Rating int `json:"rating"`
- RatingBonus float64 `json:"rating_bonus"`
- Value float64 `json:"value"`
- } `json:"spell_crit"`
- ManaRegen float64 `json:"mana_regen"`
- ManaRegenCombat float64 `json:"mana_regen_combat"`
- Armor struct {
- Base int `json:"base"`
- Effective int `json:"effective"`
- } `json:"armor"`
- Dodge struct {
- Rating int `json:"rating"`
- RatingBonus float64 `json:"rating_bonus"`
- Value float64 `json:"value"`
- } `json:"dodge"`
- Parry struct {
- Rating int `json:"rating"`
- RatingBonus float64 `json:"rating_bonus"`
- Value float64 `json:"value"`
- } `json:"parry"`
- Block struct {
- Rating int `json:"rating"`
- RatingBonus float64 `json:"rating_bonus"`
- Value float64 `json:"value"`
- } `json:"block"`
- RangedCrit struct {
- Rating int `json:"rating"`
- RatingBonus float64 `json:"rating_bonus"`
- Value float64 `json:"value"`
- } `json:"ranged_crit"`
- RangedHaste struct {
- Rating int `json:"rating"`
- RatingBonus float64 `json:"rating_bonus"`
- Value float64 `json:"value"`
- } `json:"ranged_haste"`
- SpellHaste struct {
- Rating int `json:"rating"`
- RatingBonus float64 `json:"rating_bonus"`
- Value float64 `json:"value"`
- } `json:"spell_haste"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
-}
diff --git a/v2/wowp/characterTitles.go b/v2/wowp/characterTitles.go
deleted file mode 100644
index 3b11477..0000000
--- a/v2/wowp/characterTitles.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package wowp
-
-// CharacterTitlesSummary structure
-type CharacterTitlesSummary struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- ActiveTitle struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- DisplayString string `json:"display_string"`
- } `json:"active_title"`
- Titles []struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"titles"`
-}
diff --git a/v2/wowp/guild.go b/v2/wowp/guild.go
deleted file mode 100644
index 89f931c..0000000
--- a/v2/wowp/guild.go
+++ /dev/null
@@ -1,270 +0,0 @@
-package wowp
-
-// Guild structure
-type Guild struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- ID int `json:"id"`
- Name string `json:"name"`
- Faction struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"faction"`
- AchievementPoints int `json:"achievement_points"`
- MemberCount int `json:"member_count"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- Crest struct {
- Emblem struct {
- ID int `json:"id"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- } `json:"media"`
- Color struct {
- ID int `json:"id"`
- Rgba struct {
- R int `json:"r"`
- G int `json:"g"`
- B int `json:"b"`
- A float64 `json:"a"`
- } `json:"rgba"`
- } `json:"color"`
- } `json:"emblem"`
- Border struct {
- ID int `json:"id"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- } `json:"media"`
- Color struct {
- ID int `json:"id"`
- Rgba struct {
- R int `json:"r"`
- G int `json:"g"`
- B int `json:"b"`
- A float64 `json:"a"`
- } `json:"rgba"`
- } `json:"color"`
- } `json:"border"`
- Background struct {
- Color struct {
- ID int `json:"id"`
- Rgba struct {
- R int `json:"r"`
- G int `json:"g"`
- B int `json:"b"`
- A float64 `json:"a"`
- } `json:"rgba"`
- } `json:"color"`
- } `json:"background"`
- } `json:"crest"`
- Roster struct {
- Href string `json:"href"`
- } `json:"roster"`
- Achievements struct {
- Href string `json:"href"`
- } `json:"achievements"`
- CreatedTimestamp int64 `json:"created_timestamp"`
-}
-
-// GuildActivity structure
-type GuildActivity struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Guild struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- Faction struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"faction"`
- } `json:"guild"`
- Activities []struct {
- CharacterAchievement struct {
- Character struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"character"`
- Achievement struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"achievement"`
- } `json:"character_achievement,omitempty"`
- Activity struct {
- Type string `json:"type"`
- } `json:"activity"`
- Timestamp int64 `json:"timestamp"`
- EncounterCompleted struct {
- Encounter struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"encounter"`
- Mode struct {
- Type string `json:"type"`
- Name string `json:"name"`
- } `json:"mode"`
- } `json:"encounter_completed,omitempty"`
- } `json:"activities"`
-}
-
-// GuildAchievements structure
-type GuildAchievements struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Guild struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"guild"`
- TotalQuantity int `json:"total_quantity"`
- TotalPoints int `json:"total_points"`
- Achievements []struct {
- ID int `json:"id"`
- Achievement struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"achievement"`
- Criteria struct {
- ID int `json:"id"`
- Amount float64 `json:"amount"`
- IsCompleted bool `json:"is_completed"`
- ChildCriteria []struct {
- ID int `json:"id"`
- Amount float64 `json:"amount"`
- IsCompleted bool `json:"is_completed"`
- } `json:"child_criteria"`
- } `json:"criteria,omitempty"`
- CompletedTimestamp int64 `json:"completed_timestamp,omitempty"`
- } `json:"achievements"`
- CategoryProgress []struct {
- Category struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"category"`
- Quantity int `json:"quantity"`
- Points int `json:"points"`
- } `json:"category_progress"`
- RecentEvents []struct {
- Achievement struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- } `json:"achievement"`
- Timestamp int64 `json:"timestamp"`
- } `json:"recent_events"`
-}
-
-// GuildRoster structure
-type GuildRoster struct {
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- } `json:"_links"`
- Guild struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- Name string `json:"name"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- } `json:"guild"`
- Members []struct {
- Character struct {
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- Level int `json:"level"`
- PlayableClass struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"playable_class"`
- PlayableRace struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"playable_race"`
- } `json:"character"`
- Rank int `json:"rank"`
- } `json:"members"`
-}
diff --git a/v2/wowp/wowp.go b/v2/wowp/wowp.go
deleted file mode 100644
index 659cd0a..0000000
--- a/v2/wowp/wowp.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Package wowp contains types for the World of Warcraft Profile APIs
-package wowp
-
-// Bracket type
-type Bracket string
-
-// Bracket field for PVP API calls
-const (
- Bracket2v2 Bracket = "2v2"
- Bracket3v3 Bracket = "3v3"
- BracketRBG Bracket = "rbg"
-)
diff --git a/v2/wowp_test.go b/v2/wowp_test.go
deleted file mode 100644
index 4db3e9d..0000000
--- a/v2/wowp_test.go
+++ /dev/null
@@ -1,401 +0,0 @@
-package blizzard
-
-import (
- "context"
- "fmt"
- "testing"
-
- "github.com/FuzzyStatic/blizzard/v2/wowp"
-)
-
-func TestWoWCharacterAchievementsSummary(t *testing.T) {
- dat, _, err := c.WoWCharacterAchievementsSummary(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterAchievementsStatistics(t *testing.T) {
- dat, _, err := c.WoWCharacterAchievementsStatistics(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterAppearanceSummary(t *testing.T) {
- dat, _, err := c.WoWCharacterAppearanceSummary(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterCollectionsIndex(t *testing.T) {
- dat, _, err := c.WoWCharacterCollectionsIndex(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterMountsCollectionSummary(t *testing.T) {
- dat, _, err := c.WoWCharacterMountsCollectionSummary(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterPetsCollectionSummary(t *testing.T) {
- dat, _, err := c.WoWCharacterPetsCollectionSummary(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterEncountersSummary(t *testing.T) {
- dat, _, err := c.WoWCharacterEncountersSummary(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterDungeons(t *testing.T) {
- dat, _, err := c.WoWCharacterDungeons(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterRaids(t *testing.T) {
- dat, _, err := c.WoWCharacterRaids(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterEquipmentSummary(t *testing.T) {
- dat, _, err := c.WoWCharacterEquipmentSummary(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterHunterPetsSummary(t *testing.T) {
- dat, _, err := c.WoWCharacterHunterPetsSummary(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterMediaSummary(t *testing.T) {
- dat, _, err := c.WoWCharacterMediaSummary(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestMythicKeystoneProfileIndex(t *testing.T) {
- dat, _, err := c.WoWMythicKeystoneProfileIndex(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWMythicKeystoneSeasonDetails(t *testing.T) {
- dat, _, err := c.WoWMythicKeystoneSeasonDetails(context.Background(), "illidan", "covlol", 3)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterProfileSummary(t *testing.T) {
- dat, _, err := c.WoWCharacterProfileSummary(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterProfileStatus(t *testing.T) {
- dat, _, err := c.WoWCharacterProfileStatus(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterMythicKeystoneProfile(t *testing.T) {
- dat, _, err := c.WoWCharacterMythicKeystoneProfile(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterMythicKeystoneProfileSeason(t *testing.T) {
- dat, _, err := c.WoWCharacterMythicKeystoneProfileSeason(context.Background(), "illidan", "covlol", 3)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterPvPBracketStatistics(t *testing.T) {
- dat, _, err := c.WoWCharacterPvPBracketStatistics(context.Background(), "tichondrius", "tmpikaboo", wowp.Bracket2v2)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-
- dat, _, err = c.WoWCharacterPvPBracketStatistics(context.Background(), "tichondrius", "tmpikaboo", wowp.Bracket3v3)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-
- dat, _, err = c.WoWCharacterPvPBracketStatistics(context.Background(), "icecrown", "soballer", wowp.BracketRBG)
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterPvPSummary(t *testing.T) {
- dat, _, err := c.WoWCharacterPvPSummary(context.Background(), "tichondrius", "tmpikaboo")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterQuests(t *testing.T) {
- dat, _, err := c.WoWCharacterQuests(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterCompletedQuests(t *testing.T) {
- dat, _, err := c.WoWCharacterCompletedQuests(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterReputationsSummary(t *testing.T) {
- dat, _, err := c.WoWCharacterReputationsSummary(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterSoulbinds(t *testing.T) {
- dat, _, err := c.WoWCharacterSoulbinds(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterSpecializationsSummary(t *testing.T) {
- dat, _, err := c.WoWCharacterSpecializationsSummary(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterStatisticsSummary(t *testing.T) {
- dat, _, err := c.WoWCharacterStatisticsSummary(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWCharacterTitlesSummary(t *testing.T) {
- dat, _, err := c.WoWCharacterTitlesSummary(context.Background(), "illidan", "covlol")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWGuild(t *testing.T) {
- dat, _, err := c.WoWGuild(context.Background(), "illidan", "Complexity Limit")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWGuildActivity(t *testing.T) {
- dat, _, err := c.WoWGuildActivity(context.Background(), "illidan", "Complexity Limit")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWGuildAchievements(t *testing.T) {
- dat, _, err := c.WoWGuildAchievements(context.Background(), "illidan", "Complexity Limit")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
-
-func TestWoWGuildRoster(t *testing.T) {
- dat, _, err := c.WoWGuildRoster(context.Background(), "illidan", "Complexity Limit")
- if err != nil {
- fmt.Println(err)
- t.Fail()
- }
-
- if printOutput != "" {
- fmt.Printf("%+v\n", dat)
- }
-}
diff --git a/v2/wowsearch/search.go b/v2/wowsearch/search.go
deleted file mode 100644
index 19cb8dd..0000000
--- a/v2/wowsearch/search.go
+++ /dev/null
@@ -1,208 +0,0 @@
-package wowsearch
-
-import (
- "fmt"
- "net/url"
- "strings"
-)
-
-// Opt is the interface for options passed to the search functions
-type Opt interface {
- Apply(*[]string)
-}
-
-// Field specifies what fields to filter the search results on
-//
-// Example:
-//
-// wowsearch.Field().AND("timezone","Europe/Paris").AND("locale", "enGB").NOT("type.type", "PVP")
-func Field() *FieldSelector {
- return &FieldSelector{}
-}
-
-type FieldSelector struct {
- parts []string
-}
-
-// An implicit AND operation is performed by chaining multiple AND's
-//
-// Example:
-//
-// wowsearch.Field().AND("id","123").AND("type","PVP")
-func (s *FieldSelector) AND(field, value string) *FieldSelector {
- s.parts = append(s.parts, fmt.Sprintf("%s=%s", uqe(field), uqe(value)))
- return s
-}
-
-// An OR operation is performed, you can specify multiple alternatives
-//
-// Example:
-//
-// wowsearch.Field().OR("str","5","10")
-// wowsearch.Field().OR("type","man","bear","pig")
-func (s *FieldSelector) OR(field string, values ...string) *FieldSelector {
- for i, val := range values {
- values[i] = uqe(val)
- }
- s.parts = append(s.parts, fmt.Sprintf("%s=%s", uqe(field), strings.Join(values, "||")))
- return s
-}
-
-// A NOT operation, multiple NOT's can be added by chaining
-//
-// Example:
-//
-// wowsearch.NOT("race","orc")
-// wowsearch.NOT("race","human")
-func (s *FieldSelector) NOT(field, value string) *FieldSelector {
- s.parts = append(s.parts, fmt.Sprintf("%s!=%s", uqe(field), uqe(value)))
- return s
-}
-
-// A RANGE operation is performed only on numeric field values
-//
-// Example:
-//
-// wowsearch.RANGE("str",2,99)
-func (s *FieldSelector) RANGE(field string, start, stop int) *FieldSelector {
- s.parts = append(s.parts, fmt.Sprintf("%s=[%d,%d]", uqe(field), start, stop))
- return s
-}
-
-// A MIN operation performs a minimum value check
-//
-// Example:
-//
-// wowsearch.MIN("str",10)
-func (s *FieldSelector) MIN(field string, value int) *FieldSelector {
- s.parts = append(s.parts, fmt.Sprintf("%s=[%d,]", uqe(field), value))
- return s
-}
-
-// A MAX operation performs a maximum value check
-//
-// Example:
-//
-// wowsearch.MAX("str",100)
-func (s *FieldSelector) MAX(field string, value int) *FieldSelector {
- s.parts = append(s.parts, fmt.Sprintf("%s=[,%d]", uqe(field), value))
- return s
-}
-
-func (s *FieldSelector) Apply(v *[]string) {
- *v = append(*v, strings.Join(s.parts, "&"))
-}
-
-// Page specifies which page of search results to return. The default page is 1 if not specified
-//
-// Example:
-//
-// wowsearch.Page(10)
-func Page(page int) Opt {
- if page < 1 {
- page = 1
- }
- return &PageSelector{page: page}
-}
-
-type PageSelector struct {
- page int
-}
-
-func (s *PageSelector) Apply(v *[]string) {
- *v = append(*v, fmt.Sprintf("_page=%d", s.page))
-}
-
-// PageSize specifies the size of each page in the result. The default value is 100 and can support a minimum of 1 or a maximum of 1000.
-// If size provided is < 1 it will be set to 1, if it's > 1000 it will be set to 1000
-//
-// Example:
-//
-// wowsearch.PageSize(20) // Will return 20 items
-// wowsearch.PageSize(1337) // Size will be set to 1000
-// wowsearch.PageSize(-2) // Size will be set to 1
-func PageSize(size int) *PageSizeSelector {
- switch {
- case size < 1:
- size = 1
- case size > 1000:
- size = 1000
- }
- return &PageSizeSelector{size: size}
-}
-
-type PageSizeSelector struct {
- size int
-}
-
-func (s *PageSizeSelector) Apply(v *[]string) {
- *v = append(*v, fmt.Sprintf("_pageSize=%d", s.size))
-}
-
-// OrderBy accepts a list of fields and sorts the result in order of those fields. :asc and :desc can be appended to each field to instruct the search endpoint to sort in ascending or descending order.
-//
-// Example:
-//
-// wowsearch.OrderBy("field1")
-// wowsearch.OrderBy("field1:asc")
-// wowsearch.OrderBy("field1:desc")
-// wowsearch.OrderBy("field1", "field2")
-// wowsearch.OrderBy("field1:desc", "field2:asc")
-func OrderBy(fields ...string) *OrderBySelector {
- return &OrderBySelector{fields: fields}
-}
-
-type OrderBySelector struct {
- fields []string
-}
-
-func (s *OrderBySelector) Apply(v *[]string) {
- for i, val := range s.fields {
- s.fields[i] = uqe(val)
- }
- *v = append(*v, fmt.Sprintf("orderby=%s", strings.Join(s.fields, ",")))
-}
-
-// Used only for media documents.
-// Specifies the type of media document (item, spell, creature-display, etc) to query.
-//
-// Example:
-//
-// wowsearch.Tag("item")
-func Tag(value string) *TagSelector {
- return &TagSelector{value: value}
-}
-
-type TagSelector struct {
- value string
-}
-
-func (s *TagSelector) Apply(v *[]string) {
- *v = append(*v, fmt.Sprintf("_tag=%s", uqe(s.value)))
-}
-
-// Used only for media documents.
-// Specifies the type of media document (item, spell, creature-display, etc) to query.
-//
-// Example:
-//
-// wowsearch.Tag("item")
-func Tags(value ...string) *TagsSelector {
- return &TagsSelector{values: value}
-}
-
-type TagsSelector struct {
- values []string
-}
-
-func (s *TagsSelector) Apply(v *[]string) {
- for i, val := range s.values {
- s.values[i] = uqe(val)
- }
- *v = append(*v, fmt.Sprintf("_tags=%s", strings.Join(s.values, ",")))
-}
-
-// uqe is just a shorter name for url.QueryEscape
-func uqe(val string) string {
- return url.QueryEscape(val)
-}
diff --git a/v2/wowsearch/search_test.go b/v2/wowsearch/search_test.go
deleted file mode 100644
index f64ade5..0000000
--- a/v2/wowsearch/search_test.go
+++ /dev/null
@@ -1,642 +0,0 @@
-package wowsearch
-
-import (
- "reflect"
- "testing"
-)
-
-func TestField(t *testing.T) {
- tests := []struct {
- name string
- want *FieldSelector
- }{
- {
- name: "test field",
- want: &FieldSelector{},
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if got := Field(); !reflect.DeepEqual(got, tt.want) {
- t.Errorf("Field() = %v, want %v", got, tt.want)
- }
- })
- }
-}
-
-func TestFieldSelector_AND(t *testing.T) {
- type fields struct {
- parts []string
- }
- type args struct {
- field string
- value string
- }
- tests := []struct {
- name string
- fields fields
- args args
- want *FieldSelector
- }{
- {
- name: "AND test",
- args: args{
- field: "a",
- value: "b",
- },
- want: &FieldSelector{
- parts: []string{"a=b"},
- },
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- s := &FieldSelector{
- parts: tt.fields.parts,
- }
- if got := s.AND(tt.args.field, tt.args.value); !reflect.DeepEqual(got, tt.want) {
- t.Errorf("FieldSelector.AND() = %v, want %v", got, tt.want)
- }
- })
- }
-}
-
-func TestFieldSelector_OR(t *testing.T) {
- type fields struct {
- parts []string
- }
- type args struct {
- field string
- values []string
- }
- tests := []struct {
- name string
- fields fields
- args args
- want *FieldSelector
- }{
- {
- name: "test OR",
- args: args{
- field: "a",
- values: []string{"foo", "bar"},
- },
- want: &FieldSelector{parts: []string{"a=foo||bar"}},
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- s := &FieldSelector{
- parts: tt.fields.parts,
- }
- if got := s.OR(tt.args.field, tt.args.values...); !reflect.DeepEqual(got, tt.want) {
- t.Errorf("FieldSelector.OR() = %v, want %v", got, tt.want)
- }
- })
- }
-}
-
-func TestFieldSelector_NOT(t *testing.T) {
- type fields struct {
- parts []string
- }
- type args struct {
- field string
- value string
- }
- tests := []struct {
- name string
- fields fields
- args args
- want *FieldSelector
- }{
- {
- name: "test NOT",
- args: args{
- field: "foo",
- value: "bar",
- },
- want: &FieldSelector{parts: []string{"foo!=bar"}},
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- s := &FieldSelector{
- parts: tt.fields.parts,
- }
- if got := s.NOT(tt.args.field, tt.args.value); !reflect.DeepEqual(got, tt.want) {
- t.Errorf("FieldSelector.NOT() = %v, want %v", got, tt.want)
- }
- })
- }
-}
-
-func TestFieldSelector_RANGE(t *testing.T) {
- type fields struct {
- parts []string
- }
- type args struct {
- field string
- start int
- stop int
- }
- tests := []struct {
- name string
- fields fields
- args args
- want *FieldSelector
- }{
- {
- name: "test RANGE",
- args: args{
- field: "bar",
- start: 1,
- stop: 10,
- },
- want: &FieldSelector{parts: []string{"bar=[1,10]"}},
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- s := &FieldSelector{
- parts: tt.fields.parts,
- }
- if got := s.RANGE(tt.args.field, tt.args.start, tt.args.stop); !reflect.DeepEqual(got, tt.want) {
- t.Errorf("FieldSelector.RANGE() = %v, want %v", got, tt.want)
- }
- })
- }
-}
-
-func TestFieldSelector_MIN(t *testing.T) {
- type fields struct {
- parts []string
- }
- type args struct {
- field string
- value int
- }
- tests := []struct {
- name string
- fields fields
- args args
- want *FieldSelector
- }{
- {
- name: "test MIN",
- args: args{
- field: "foo",
- value: 10,
- },
- want: &FieldSelector{parts: []string{"foo=[10,]"}},
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- s := &FieldSelector{
- parts: tt.fields.parts,
- }
- if got := s.MIN(tt.args.field, tt.args.value); !reflect.DeepEqual(got, tt.want) {
- t.Errorf("FieldSelector.MIN() = %v, want %v", got, tt.want)
- }
- })
- }
-}
-
-func TestFieldSelector_MAX(t *testing.T) {
- type fields struct {
- parts []string
- }
- type args struct {
- field string
- value int
- }
- tests := []struct {
- name string
- fields fields
- args args
- want *FieldSelector
- }{
- {
- name: "test MAX",
- args: args{
- field: "bar",
- value: 420,
- },
- want: &FieldSelector{parts: []string{"bar=[,420]"}},
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- s := &FieldSelector{
- parts: tt.fields.parts,
- }
- if got := s.MAX(tt.args.field, tt.args.value); !reflect.DeepEqual(got, tt.want) {
- t.Errorf("FieldSelector.MAX() = %v, want %v", got, tt.want)
- }
- })
- }
-}
-
-func TestPage(t *testing.T) {
- type args struct {
- page int
- }
- tests := []struct {
- name string
- args args
- want Opt
- }{
- {
- name: "test PAGE",
- args: args{
- page: 10,
- },
- want: &PageSelector{
- page: 10,
- },
- },
- {
- name: "test PAGE under 1",
- args: args{
- page: -4,
- },
- want: &PageSelector{
- page: 1,
- },
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if got := Page(tt.args.page); !reflect.DeepEqual(got, tt.want) {
- t.Errorf("Page() = %v, want %v", got, tt.want)
- }
- })
- }
-}
-
-func TestPageSize(t *testing.T) {
- type args struct {
- size int
- }
- tests := []struct {
- name string
- args args
- want *PageSizeSelector
- }{
- {
- name: "test PageSize",
- args: args{
- size: 69,
- },
- want: &PageSizeSelector{size: 69},
- },
- {
- name: "test PageSize over 1000",
- args: args{
- size: 1337,
- },
- want: &PageSizeSelector{size: 1000},
- },
- {
- name: "test PageSize under 1",
- args: args{
- size: -4,
- },
- want: &PageSizeSelector{size: 1},
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if got := PageSize(tt.args.size); !reflect.DeepEqual(got, tt.want) {
- t.Errorf("PageSize() = %v, want %v", got, tt.want)
- }
- })
- }
-}
-
-func TestOrderBy(t *testing.T) {
- type args struct {
- fields []string
- }
- tests := []struct {
- name string
- args args
- want *OrderBySelector
- }{
- {
- name: "test OrderBy",
- args: args{
- fields: []string{
- "field1:desc",
- },
- },
- want: &OrderBySelector{fields: []string{"field1:desc"}},
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if got := OrderBy(tt.args.fields...); !reflect.DeepEqual(got, tt.want) {
- t.Errorf("OrderBy() = %v, want %v", got, tt.want)
- }
- })
- }
-}
-
-func TestTag(t *testing.T) {
- type args struct {
- value string
- }
- tests := []struct {
- name string
- args args
- want *TagSelector
- }{
- {
- name: "test Tag",
- args: args{value: "image"},
- want: &TagSelector{value: "image"},
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if got := Tag(tt.args.value); !reflect.DeepEqual(got, tt.want) {
- t.Errorf("Tag() = %v, want %v", got, tt.want)
- }
- })
- }
-}
-
-func TestTags(t *testing.T) {
- type args struct {
- value []string
- }
- tests := []struct {
- name string
- args args
- want *TagsSelector
- }{
- {
- name: "test Tags",
- args: args{value: []string{"image", "item"}},
- want: &TagsSelector{values: []string{"image", "item"}},
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if got := Tags(tt.args.value...); !reflect.DeepEqual(got, tt.want) {
- t.Errorf("Tags() = %v, want %v", got, tt.want)
- }
- })
- }
-}
-
-func Test_uqe(t *testing.T) {
- type args struct {
- val string
- }
- tests := []struct {
- name string
- args args
- want string
- }{
- {
- name: "test uqe",
- args: args{
- val: "!%#escaped",
- },
- want: "%21%25%23escaped",
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if got := uqe(tt.args.val); got != tt.want {
- t.Errorf("uqe() = %v, want %v", got, tt.want)
- }
- })
- }
-}
-
-func TestFieldSelector_Apply(t *testing.T) {
-
- type fields struct {
- parts []string
- }
- type args struct {
- v *[]string
- }
- tests := []struct {
- name string
- fields fields
- args args
- want *[]string
- }{
- {
- name: "test field apply",
- fields: fields{
- parts: []string{"a=b", "c=d"},
- },
- args: args{
- v: &[]string{},
- },
- want: &[]string{"a=b&c=d"},
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- s := &FieldSelector{
- parts: tt.fields.parts,
- }
- s.Apply(tt.args.v)
- if !reflect.DeepEqual(tt.args.v, tt.want) {
- t.Errorf("Apply() = %v, want %v", tt.args.v, tt.want)
- }
- })
- }
-}
-
-func TestPageSelector_Apply(t *testing.T) {
- type fields struct {
- page int
- }
- type args struct {
- v *[]string
- }
- tests := []struct {
- name string
- fields fields
- args args
- want *[]string
- }{
- {
- name: "test Page Apply",
- fields: fields{
- page: 1,
- },
- args: args{
- v: &[]string{},
- },
- want: &[]string{"_page=1"},
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- s := &PageSelector{
- page: tt.fields.page,
- }
- s.Apply(tt.args.v)
- if !reflect.DeepEqual(tt.args.v, tt.want) {
- t.Errorf("Apply() = %v, want %v", tt.args.v, tt.want)
- }
- })
-
- }
-}
-
-func TestPageSizeSelector_Apply(t *testing.T) {
- type fields struct {
- size int
- }
- type args struct {
- v *[]string
- }
- tests := []struct {
- name string
- fields fields
- args args
- want *[]string
- }{
- {
- name: "test PageSize Apply",
- fields: fields{
- size: 1,
- },
- args: args{
- v: &[]string{},
- },
- want: &[]string{"_pageSize=1"},
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- s := &PageSizeSelector{
- size: tt.fields.size,
- }
- s.Apply(tt.args.v)
- if !reflect.DeepEqual(tt.args.v, tt.want) {
- t.Errorf("Apply() = %v, want %v", tt.args.v, tt.want)
- }
- })
- }
-}
-
-func TestOrderBySelector_Apply(t *testing.T) {
- type fields struct {
- fields []string
- }
- type args struct {
- v *[]string
- }
- tests := []struct {
- name string
- fields fields
- args args
- want *[]string
- }{
- {
- name: "test OrderBy Apply",
- fields: fields{
- fields: []string{"field1:asc", "field2:desc"},
- },
- args: args{
- v: &[]string{},
- },
- want: &[]string{"orderby=field1%3Aasc,field2%3Adesc"},
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- s := &OrderBySelector{
- fields: tt.fields.fields,
- }
- s.Apply(tt.args.v)
- if !reflect.DeepEqual(tt.args.v, tt.want) {
- t.Errorf("Apply() = %v, want %v", tt.args.v, tt.want)
- }
- })
- }
-}
-
-func TestTagSelector_Apply(t *testing.T) {
- type fields struct {
- value string
- }
- type args struct {
- v *[]string
- }
- tests := []struct {
- name string
- fields fields
- args args
- want *[]string
- }{
- {
- name: "test Tag Apply",
- fields: fields{
- value: "spell",
- },
- args: args{
- v: &[]string{},
- },
- want: &[]string{"_tag=spell"},
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- s := &TagSelector{
- value: tt.fields.value,
- }
- s.Apply(tt.args.v)
- if !reflect.DeepEqual(tt.args.v, tt.want) {
- t.Errorf("Apply() = %v, want %v", tt.args.v, tt.want)
- }
- })
- }
-}
-
-func TestTagsSelector_Apply(t *testing.T) {
- type fields struct {
- values []string
- }
- type args struct {
- v *[]string
- }
- tests := []struct {
- name string
- fields fields
- args args
- want *[]string
- }{
- {
- name: "test TagsApply",
- fields: fields{
- values: []string{"spell", "item"},
- },
- args: args{
- v: &[]string{},
- },
- want: &[]string{"_tags=spell,item"},
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- s := &TagsSelector{
- values: tt.fields.values,
- }
- s.Apply(tt.args.v)
- if !reflect.DeepEqual(tt.args.v, tt.want) {
- t.Errorf("Apply() = %v, want %v", tt.args.v, tt.want)
- }
- })
- }
-}
diff --git a/vendor/github.com/go-playground/locales/README.md b/vendor/github.com/go-playground/locales/README.md
index 5b0694f..7b6be2c 100644
--- a/vendor/github.com/go-playground/locales/README.md
+++ b/vendor/github.com/go-playground/locales/README.md
@@ -1,10 +1,8 @@
## locales
-![Project status](https://img.shields.io/badge/version-0.14.0-green.svg)
+![Project status](https://img.shields.io/badge/version-0.14.1-green.svg)
[![Build Status](https://travis-ci.org/go-playground/locales.svg?branch=master)](https://travis-ci.org/go-playground/locales)
-[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/locales)](https://goreportcard.com/report/github.com/go-playground/locales)
[![GoDoc](https://godoc.org/github.com/go-playground/locales?status.svg)](https://godoc.org/github.com/go-playground/locales)
![License](https://img.shields.io/dub/l/vibe-d.svg)
-[![Gitter](https://badges.gitter.im/go-playground/locales.svg)](https://gitter.im/go-playground/locales?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
Locales is a set of locales generated from the [Unicode CLDR Project](http://cldr.unicode.org/) which can be used independently or within
an i18n package; these were built for use with, but not exclusive to, [Universal Translator](https://github.com/go-playground/universal-translator).
diff --git a/vendor/github.com/go-playground/universal-translator/README.md b/vendor/github.com/go-playground/universal-translator/README.md
index 46dec6d..d9b6654 100644
--- a/vendor/github.com/go-playground/universal-translator/README.md
+++ b/vendor/github.com/go-playground/universal-translator/README.md
@@ -1,11 +1,9 @@
## universal-translator
-![Project status](https://img.shields.io/badge/version-0.18.0-green.svg)
-[![Build Status](https://travis-ci.org/go-playground/universal-translator.svg?branch=master)](https://travis-ci.org/go-playground/universal-translator)
+![Project status](https://img.shields.io/badge/version-0.18.1-green.svg)
[![Coverage Status](https://coveralls.io/repos/github/go-playground/universal-translator/badge.svg)](https://coveralls.io/github/go-playground/universal-translator)
[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/universal-translator)](https://goreportcard.com/report/github.com/go-playground/universal-translator)
[![GoDoc](https://godoc.org/github.com/go-playground/universal-translator?status.svg)](https://godoc.org/github.com/go-playground/universal-translator)
![License](https://img.shields.io/dub/l/vibe-d.svg)
-[![Gitter](https://badges.gitter.im/go-playground/universal-translator.svg)](https://gitter.im/go-playground/universal-translator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
Universal Translator is an i18n Translator for Go/Golang using CLDR data + pluralization rules
diff --git a/vendor/github.com/go-playground/universal-translator/import_export.go b/vendor/github.com/go-playground/universal-translator/import_export.go
index 1216f19..87a1b46 100644
--- a/vendor/github.com/go-playground/universal-translator/import_export.go
+++ b/vendor/github.com/go-playground/universal-translator/import_export.go
@@ -3,7 +3,6 @@ package ut
import (
"encoding/json"
"fmt"
- "io/ioutil"
"os"
"path/filepath"
@@ -41,7 +40,6 @@ const (
func (t *UniversalTranslator) Export(format ImportExportFormat, dirname string) error {
_, err := os.Stat(dirname)
- fmt.Println(dirname, err, os.IsNotExist(err))
if err != nil {
if !os.IsNotExist(err) {
@@ -138,7 +136,7 @@ func (t *UniversalTranslator) Export(format ImportExportFormat, dirname string)
return err
}
- err = ioutil.WriteFile(filepath.Join(dirname, fmt.Sprintf("%s%s", locale.Locale(), ext)), b, 0644)
+ err = os.WriteFile(filepath.Join(dirname, fmt.Sprintf("%s%s", locale.Locale(), ext)), b, 0644)
if err != nil {
return err
}
@@ -200,7 +198,7 @@ func (t *UniversalTranslator) Import(format ImportExportFormat, dirnameOrFilenam
// NOTE: generally used when assets have been embedded into the binary and are already in memory.
func (t *UniversalTranslator) ImportByReader(format ImportExportFormat, reader io.Reader) error {
- b, err := ioutil.ReadAll(reader)
+ b, err := io.ReadAll(reader)
if err != nil {
return err
}
diff --git a/vendor/github.com/go-playground/validator/v10/.gitignore b/vendor/github.com/go-playground/validator/v10/.gitignore
index 6e43fac..2410a91 100644
--- a/vendor/github.com/go-playground/validator/v10/.gitignore
+++ b/vendor/github.com/go-playground/validator/v10/.gitignore
@@ -28,3 +28,4 @@ _testmain.go
*.txt
cover.html
README.html
+.idea
diff --git a/vendor/github.com/go-playground/validator/v10/README.md b/vendor/github.com/go-playground/validator/v10/README.md
index 9d0a79e..5f8878d 100644
--- a/vendor/github.com/go-playground/validator/v10/README.md
+++ b/vendor/github.com/go-playground/validator/v10/README.md
@@ -1,7 +1,7 @@
Package validator
=================
[![Join the chat at https://gitter.im/go-playground/validator](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-playground/validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-![Project status](https://img.shields.io/badge/version-10.11.1-green.svg)
+![Project status](https://img.shields.io/badge/version-10.11.2-green.svg)
[![Build Status](https://travis-ci.org/go-playground/validator.svg?branch=master)](https://travis-ci.org/go-playground/validator)
[![Coverage Status](https://coveralls.io/repos/go-playground/validator/badge.svg?branch=master&service=github)](https://coveralls.io/github/go-playground/validator?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/validator)](https://goreportcard.com/report/github.com/go-playground/validator)
diff --git a/vendor/golang.org/x/crypto/sha3/keccakf.go b/vendor/golang.org/x/crypto/sha3/keccakf.go
index 0f4ae8b..e5faa37 100644
--- a/vendor/golang.org/x/crypto/sha3/keccakf.go
+++ b/vendor/golang.org/x/crypto/sha3/keccakf.go
@@ -7,6 +7,8 @@
package sha3
+import "math/bits"
+
// rc stores the round constants for use in the ι step.
var rc = [24]uint64{
0x0000000000000001,
@@ -60,13 +62,13 @@ func keccakF1600(a *[25]uint64) {
bc0 = a[0] ^ d0
t = a[6] ^ d1
- bc1 = t<<44 | t>>(64-44)
+ bc1 = bits.RotateLeft64(t, 44)
t = a[12] ^ d2
- bc2 = t<<43 | t>>(64-43)
+ bc2 = bits.RotateLeft64(t, 43)
t = a[18] ^ d3
- bc3 = t<<21 | t>>(64-21)
+ bc3 = bits.RotateLeft64(t, 21)
t = a[24] ^ d4
- bc4 = t<<14 | t>>(64-14)
+ bc4 = bits.RotateLeft64(t, 14)
a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i]
a[6] = bc1 ^ (bc3 &^ bc2)
a[12] = bc2 ^ (bc4 &^ bc3)
@@ -74,15 +76,15 @@ func keccakF1600(a *[25]uint64) {
a[24] = bc4 ^ (bc1 &^ bc0)
t = a[10] ^ d0
- bc2 = t<<3 | t>>(64-3)
+ bc2 = bits.RotateLeft64(t, 3)
t = a[16] ^ d1
- bc3 = t<<45 | t>>(64-45)
+ bc3 = bits.RotateLeft64(t, 45)
t = a[22] ^ d2
- bc4 = t<<61 | t>>(64-61)
+ bc4 = bits.RotateLeft64(t, 61)
t = a[3] ^ d3
- bc0 = t<<28 | t>>(64-28)
+ bc0 = bits.RotateLeft64(t, 28)
t = a[9] ^ d4
- bc1 = t<<20 | t>>(64-20)
+ bc1 = bits.RotateLeft64(t, 20)
a[10] = bc0 ^ (bc2 &^ bc1)
a[16] = bc1 ^ (bc3 &^ bc2)
a[22] = bc2 ^ (bc4 &^ bc3)
@@ -90,15 +92,15 @@ func keccakF1600(a *[25]uint64) {
a[9] = bc4 ^ (bc1 &^ bc0)
t = a[20] ^ d0
- bc4 = t<<18 | t>>(64-18)
+ bc4 = bits.RotateLeft64(t, 18)
t = a[1] ^ d1
- bc0 = t<<1 | t>>(64-1)
+ bc0 = bits.RotateLeft64(t, 1)
t = a[7] ^ d2
- bc1 = t<<6 | t>>(64-6)
+ bc1 = bits.RotateLeft64(t, 6)
t = a[13] ^ d3
- bc2 = t<<25 | t>>(64-25)
+ bc2 = bits.RotateLeft64(t, 25)
t = a[19] ^ d4
- bc3 = t<<8 | t>>(64-8)
+ bc3 = bits.RotateLeft64(t, 8)
a[20] = bc0 ^ (bc2 &^ bc1)
a[1] = bc1 ^ (bc3 &^ bc2)
a[7] = bc2 ^ (bc4 &^ bc3)
@@ -106,15 +108,15 @@ func keccakF1600(a *[25]uint64) {
a[19] = bc4 ^ (bc1 &^ bc0)
t = a[5] ^ d0
- bc1 = t<<36 | t>>(64-36)
+ bc1 = bits.RotateLeft64(t, 36)
t = a[11] ^ d1
- bc2 = t<<10 | t>>(64-10)
+ bc2 = bits.RotateLeft64(t, 10)
t = a[17] ^ d2
- bc3 = t<<15 | t>>(64-15)
+ bc3 = bits.RotateLeft64(t, 15)
t = a[23] ^ d3
- bc4 = t<<56 | t>>(64-56)
+ bc4 = bits.RotateLeft64(t, 56)
t = a[4] ^ d4
- bc0 = t<<27 | t>>(64-27)
+ bc0 = bits.RotateLeft64(t, 27)
a[5] = bc0 ^ (bc2 &^ bc1)
a[11] = bc1 ^ (bc3 &^ bc2)
a[17] = bc2 ^ (bc4 &^ bc3)
@@ -122,15 +124,15 @@ func keccakF1600(a *[25]uint64) {
a[4] = bc4 ^ (bc1 &^ bc0)
t = a[15] ^ d0
- bc3 = t<<41 | t>>(64-41)
+ bc3 = bits.RotateLeft64(t, 41)
t = a[21] ^ d1
- bc4 = t<<2 | t>>(64-2)
+ bc4 = bits.RotateLeft64(t, 2)
t = a[2] ^ d2
- bc0 = t<<62 | t>>(64-62)
+ bc0 = bits.RotateLeft64(t, 62)
t = a[8] ^ d3
- bc1 = t<<55 | t>>(64-55)
+ bc1 = bits.RotateLeft64(t, 55)
t = a[14] ^ d4
- bc2 = t<<39 | t>>(64-39)
+ bc2 = bits.RotateLeft64(t, 39)
a[15] = bc0 ^ (bc2 &^ bc1)
a[21] = bc1 ^ (bc3 &^ bc2)
a[2] = bc2 ^ (bc4 &^ bc3)
@@ -151,13 +153,13 @@ func keccakF1600(a *[25]uint64) {
bc0 = a[0] ^ d0
t = a[16] ^ d1
- bc1 = t<<44 | t>>(64-44)
+ bc1 = bits.RotateLeft64(t, 44)
t = a[7] ^ d2
- bc2 = t<<43 | t>>(64-43)
+ bc2 = bits.RotateLeft64(t, 43)
t = a[23] ^ d3
- bc3 = t<<21 | t>>(64-21)
+ bc3 = bits.RotateLeft64(t, 21)
t = a[14] ^ d4
- bc4 = t<<14 | t>>(64-14)
+ bc4 = bits.RotateLeft64(t, 14)
a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+1]
a[16] = bc1 ^ (bc3 &^ bc2)
a[7] = bc2 ^ (bc4 &^ bc3)
@@ -165,15 +167,15 @@ func keccakF1600(a *[25]uint64) {
a[14] = bc4 ^ (bc1 &^ bc0)
t = a[20] ^ d0
- bc2 = t<<3 | t>>(64-3)
+ bc2 = bits.RotateLeft64(t, 3)
t = a[11] ^ d1
- bc3 = t<<45 | t>>(64-45)
+ bc3 = bits.RotateLeft64(t, 45)
t = a[2] ^ d2
- bc4 = t<<61 | t>>(64-61)
+ bc4 = bits.RotateLeft64(t, 61)
t = a[18] ^ d3
- bc0 = t<<28 | t>>(64-28)
+ bc0 = bits.RotateLeft64(t, 28)
t = a[9] ^ d4
- bc1 = t<<20 | t>>(64-20)
+ bc1 = bits.RotateLeft64(t, 20)
a[20] = bc0 ^ (bc2 &^ bc1)
a[11] = bc1 ^ (bc3 &^ bc2)
a[2] = bc2 ^ (bc4 &^ bc3)
@@ -181,15 +183,15 @@ func keccakF1600(a *[25]uint64) {
a[9] = bc4 ^ (bc1 &^ bc0)
t = a[15] ^ d0
- bc4 = t<<18 | t>>(64-18)
+ bc4 = bits.RotateLeft64(t, 18)
t = a[6] ^ d1
- bc0 = t<<1 | t>>(64-1)
+ bc0 = bits.RotateLeft64(t, 1)
t = a[22] ^ d2
- bc1 = t<<6 | t>>(64-6)
+ bc1 = bits.RotateLeft64(t, 6)
t = a[13] ^ d3
- bc2 = t<<25 | t>>(64-25)
+ bc2 = bits.RotateLeft64(t, 25)
t = a[4] ^ d4
- bc3 = t<<8 | t>>(64-8)
+ bc3 = bits.RotateLeft64(t, 8)
a[15] = bc0 ^ (bc2 &^ bc1)
a[6] = bc1 ^ (bc3 &^ bc2)
a[22] = bc2 ^ (bc4 &^ bc3)
@@ -197,15 +199,15 @@ func keccakF1600(a *[25]uint64) {
a[4] = bc4 ^ (bc1 &^ bc0)
t = a[10] ^ d0
- bc1 = t<<36 | t>>(64-36)
+ bc1 = bits.RotateLeft64(t, 36)
t = a[1] ^ d1
- bc2 = t<<10 | t>>(64-10)
+ bc2 = bits.RotateLeft64(t, 10)
t = a[17] ^ d2
- bc3 = t<<15 | t>>(64-15)
+ bc3 = bits.RotateLeft64(t, 15)
t = a[8] ^ d3
- bc4 = t<<56 | t>>(64-56)
+ bc4 = bits.RotateLeft64(t, 56)
t = a[24] ^ d4
- bc0 = t<<27 | t>>(64-27)
+ bc0 = bits.RotateLeft64(t, 27)
a[10] = bc0 ^ (bc2 &^ bc1)
a[1] = bc1 ^ (bc3 &^ bc2)
a[17] = bc2 ^ (bc4 &^ bc3)
@@ -213,15 +215,15 @@ func keccakF1600(a *[25]uint64) {
a[24] = bc4 ^ (bc1 &^ bc0)
t = a[5] ^ d0
- bc3 = t<<41 | t>>(64-41)
+ bc3 = bits.RotateLeft64(t, 41)
t = a[21] ^ d1
- bc4 = t<<2 | t>>(64-2)
+ bc4 = bits.RotateLeft64(t, 2)
t = a[12] ^ d2
- bc0 = t<<62 | t>>(64-62)
+ bc0 = bits.RotateLeft64(t, 62)
t = a[3] ^ d3
- bc1 = t<<55 | t>>(64-55)
+ bc1 = bits.RotateLeft64(t, 55)
t = a[19] ^ d4
- bc2 = t<<39 | t>>(64-39)
+ bc2 = bits.RotateLeft64(t, 39)
a[5] = bc0 ^ (bc2 &^ bc1)
a[21] = bc1 ^ (bc3 &^ bc2)
a[12] = bc2 ^ (bc4 &^ bc3)
@@ -242,13 +244,13 @@ func keccakF1600(a *[25]uint64) {
bc0 = a[0] ^ d0
t = a[11] ^ d1
- bc1 = t<<44 | t>>(64-44)
+ bc1 = bits.RotateLeft64(t, 44)
t = a[22] ^ d2
- bc2 = t<<43 | t>>(64-43)
+ bc2 = bits.RotateLeft64(t, 43)
t = a[8] ^ d3
- bc3 = t<<21 | t>>(64-21)
+ bc3 = bits.RotateLeft64(t, 21)
t = a[19] ^ d4
- bc4 = t<<14 | t>>(64-14)
+ bc4 = bits.RotateLeft64(t, 14)
a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+2]
a[11] = bc1 ^ (bc3 &^ bc2)
a[22] = bc2 ^ (bc4 &^ bc3)
@@ -256,15 +258,15 @@ func keccakF1600(a *[25]uint64) {
a[19] = bc4 ^ (bc1 &^ bc0)
t = a[15] ^ d0
- bc2 = t<<3 | t>>(64-3)
+ bc2 = bits.RotateLeft64(t, 3)
t = a[1] ^ d1
- bc3 = t<<45 | t>>(64-45)
+ bc3 = bits.RotateLeft64(t, 45)
t = a[12] ^ d2
- bc4 = t<<61 | t>>(64-61)
+ bc4 = bits.RotateLeft64(t, 61)
t = a[23] ^ d3
- bc0 = t<<28 | t>>(64-28)
+ bc0 = bits.RotateLeft64(t, 28)
t = a[9] ^ d4
- bc1 = t<<20 | t>>(64-20)
+ bc1 = bits.RotateLeft64(t, 20)
a[15] = bc0 ^ (bc2 &^ bc1)
a[1] = bc1 ^ (bc3 &^ bc2)
a[12] = bc2 ^ (bc4 &^ bc3)
@@ -272,15 +274,15 @@ func keccakF1600(a *[25]uint64) {
a[9] = bc4 ^ (bc1 &^ bc0)
t = a[5] ^ d0
- bc4 = t<<18 | t>>(64-18)
+ bc4 = bits.RotateLeft64(t, 18)
t = a[16] ^ d1
- bc0 = t<<1 | t>>(64-1)
+ bc0 = bits.RotateLeft64(t, 1)
t = a[2] ^ d2
- bc1 = t<<6 | t>>(64-6)
+ bc1 = bits.RotateLeft64(t, 6)
t = a[13] ^ d3
- bc2 = t<<25 | t>>(64-25)
+ bc2 = bits.RotateLeft64(t, 25)
t = a[24] ^ d4
- bc3 = t<<8 | t>>(64-8)
+ bc3 = bits.RotateLeft64(t, 8)
a[5] = bc0 ^ (bc2 &^ bc1)
a[16] = bc1 ^ (bc3 &^ bc2)
a[2] = bc2 ^ (bc4 &^ bc3)
@@ -288,15 +290,15 @@ func keccakF1600(a *[25]uint64) {
a[24] = bc4 ^ (bc1 &^ bc0)
t = a[20] ^ d0
- bc1 = t<<36 | t>>(64-36)
+ bc1 = bits.RotateLeft64(t, 36)
t = a[6] ^ d1
- bc2 = t<<10 | t>>(64-10)
+ bc2 = bits.RotateLeft64(t, 10)
t = a[17] ^ d2
- bc3 = t<<15 | t>>(64-15)
+ bc3 = bits.RotateLeft64(t, 15)
t = a[3] ^ d3
- bc4 = t<<56 | t>>(64-56)
+ bc4 = bits.RotateLeft64(t, 56)
t = a[14] ^ d4
- bc0 = t<<27 | t>>(64-27)
+ bc0 = bits.RotateLeft64(t, 27)
a[20] = bc0 ^ (bc2 &^ bc1)
a[6] = bc1 ^ (bc3 &^ bc2)
a[17] = bc2 ^ (bc4 &^ bc3)
@@ -304,15 +306,15 @@ func keccakF1600(a *[25]uint64) {
a[14] = bc4 ^ (bc1 &^ bc0)
t = a[10] ^ d0
- bc3 = t<<41 | t>>(64-41)
+ bc3 = bits.RotateLeft64(t, 41)
t = a[21] ^ d1
- bc4 = t<<2 | t>>(64-2)
+ bc4 = bits.RotateLeft64(t, 2)
t = a[7] ^ d2
- bc0 = t<<62 | t>>(64-62)
+ bc0 = bits.RotateLeft64(t, 62)
t = a[18] ^ d3
- bc1 = t<<55 | t>>(64-55)
+ bc1 = bits.RotateLeft64(t, 55)
t = a[4] ^ d4
- bc2 = t<<39 | t>>(64-39)
+ bc2 = bits.RotateLeft64(t, 39)
a[10] = bc0 ^ (bc2 &^ bc1)
a[21] = bc1 ^ (bc3 &^ bc2)
a[7] = bc2 ^ (bc4 &^ bc3)
@@ -333,13 +335,13 @@ func keccakF1600(a *[25]uint64) {
bc0 = a[0] ^ d0
t = a[1] ^ d1
- bc1 = t<<44 | t>>(64-44)
+ bc1 = bits.RotateLeft64(t, 44)
t = a[2] ^ d2
- bc2 = t<<43 | t>>(64-43)
+ bc2 = bits.RotateLeft64(t, 43)
t = a[3] ^ d3
- bc3 = t<<21 | t>>(64-21)
+ bc3 = bits.RotateLeft64(t, 21)
t = a[4] ^ d4
- bc4 = t<<14 | t>>(64-14)
+ bc4 = bits.RotateLeft64(t, 14)
a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+3]
a[1] = bc1 ^ (bc3 &^ bc2)
a[2] = bc2 ^ (bc4 &^ bc3)
@@ -347,15 +349,15 @@ func keccakF1600(a *[25]uint64) {
a[4] = bc4 ^ (bc1 &^ bc0)
t = a[5] ^ d0
- bc2 = t<<3 | t>>(64-3)
+ bc2 = bits.RotateLeft64(t, 3)
t = a[6] ^ d1
- bc3 = t<<45 | t>>(64-45)
+ bc3 = bits.RotateLeft64(t, 45)
t = a[7] ^ d2
- bc4 = t<<61 | t>>(64-61)
+ bc4 = bits.RotateLeft64(t, 61)
t = a[8] ^ d3
- bc0 = t<<28 | t>>(64-28)
+ bc0 = bits.RotateLeft64(t, 28)
t = a[9] ^ d4
- bc1 = t<<20 | t>>(64-20)
+ bc1 = bits.RotateLeft64(t, 20)
a[5] = bc0 ^ (bc2 &^ bc1)
a[6] = bc1 ^ (bc3 &^ bc2)
a[7] = bc2 ^ (bc4 &^ bc3)
@@ -363,15 +365,15 @@ func keccakF1600(a *[25]uint64) {
a[9] = bc4 ^ (bc1 &^ bc0)
t = a[10] ^ d0
- bc4 = t<<18 | t>>(64-18)
+ bc4 = bits.RotateLeft64(t, 18)
t = a[11] ^ d1
- bc0 = t<<1 | t>>(64-1)
+ bc0 = bits.RotateLeft64(t, 1)
t = a[12] ^ d2
- bc1 = t<<6 | t>>(64-6)
+ bc1 = bits.RotateLeft64(t, 6)
t = a[13] ^ d3
- bc2 = t<<25 | t>>(64-25)
+ bc2 = bits.RotateLeft64(t, 25)
t = a[14] ^ d4
- bc3 = t<<8 | t>>(64-8)
+ bc3 = bits.RotateLeft64(t, 8)
a[10] = bc0 ^ (bc2 &^ bc1)
a[11] = bc1 ^ (bc3 &^ bc2)
a[12] = bc2 ^ (bc4 &^ bc3)
@@ -379,15 +381,15 @@ func keccakF1600(a *[25]uint64) {
a[14] = bc4 ^ (bc1 &^ bc0)
t = a[15] ^ d0
- bc1 = t<<36 | t>>(64-36)
+ bc1 = bits.RotateLeft64(t, 36)
t = a[16] ^ d1
- bc2 = t<<10 | t>>(64-10)
+ bc2 = bits.RotateLeft64(t, 10)
t = a[17] ^ d2
- bc3 = t<<15 | t>>(64-15)
+ bc3 = bits.RotateLeft64(t, 15)
t = a[18] ^ d3
- bc4 = t<<56 | t>>(64-56)
+ bc4 = bits.RotateLeft64(t, 56)
t = a[19] ^ d4
- bc0 = t<<27 | t>>(64-27)
+ bc0 = bits.RotateLeft64(t, 27)
a[15] = bc0 ^ (bc2 &^ bc1)
a[16] = bc1 ^ (bc3 &^ bc2)
a[17] = bc2 ^ (bc4 &^ bc3)
@@ -395,15 +397,15 @@ func keccakF1600(a *[25]uint64) {
a[19] = bc4 ^ (bc1 &^ bc0)
t = a[20] ^ d0
- bc3 = t<<41 | t>>(64-41)
+ bc3 = bits.RotateLeft64(t, 41)
t = a[21] ^ d1
- bc4 = t<<2 | t>>(64-2)
+ bc4 = bits.RotateLeft64(t, 2)
t = a[22] ^ d2
- bc0 = t<<62 | t>>(64-62)
+ bc0 = bits.RotateLeft64(t, 62)
t = a[23] ^ d3
- bc1 = t<<55 | t>>(64-55)
+ bc1 = bits.RotateLeft64(t, 55)
t = a[24] ^ d4
- bc2 = t<<39 | t>>(64-39)
+ bc2 = bits.RotateLeft64(t, 39)
a[20] = bc0 ^ (bc2 &^ bc1)
a[21] = bc1 ^ (bc3 &^ bc2)
a[22] = bc2 ^ (bc4 &^ bc3)
diff --git a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go
deleted file mode 100644
index 37dc0cf..0000000
--- a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package ctxhttp provides helper functions for performing context-aware HTTP requests.
-package ctxhttp // import "golang.org/x/net/context/ctxhttp"
-
-import (
- "context"
- "io"
- "net/http"
- "net/url"
- "strings"
-)
-
-// Do sends an HTTP request with the provided http.Client and returns
-// an HTTP response.
-//
-// If the client is nil, http.DefaultClient is used.
-//
-// The provided ctx must be non-nil. If it is canceled or times out,
-// ctx.Err() will be returned.
-func Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) {
- if client == nil {
- client = http.DefaultClient
- }
- resp, err := client.Do(req.WithContext(ctx))
- // If we got an error, and the context has been canceled,
- // the context's error is probably more useful.
- if err != nil {
- select {
- case <-ctx.Done():
- err = ctx.Err()
- default:
- }
- }
- return resp, err
-}
-
-// Get issues a GET request via the Do function.
-func Get(ctx context.Context, client *http.Client, url string) (*http.Response, error) {
- req, err := http.NewRequest("GET", url, nil)
- if err != nil {
- return nil, err
- }
- return Do(ctx, client, req)
-}
-
-// Head issues a HEAD request via the Do function.
-func Head(ctx context.Context, client *http.Client, url string) (*http.Response, error) {
- req, err := http.NewRequest("HEAD", url, nil)
- if err != nil {
- return nil, err
- }
- return Do(ctx, client, req)
-}
-
-// Post issues a POST request via the Do function.
-func Post(ctx context.Context, client *http.Client, url string, bodyType string, body io.Reader) (*http.Response, error) {
- req, err := http.NewRequest("POST", url, body)
- if err != nil {
- return nil, err
- }
- req.Header.Set("Content-Type", bodyType)
- return Do(ctx, client, req)
-}
-
-// PostForm issues a POST request via the Do function.
-func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) {
- return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode()))
-}
diff --git a/vendor/golang.org/x/oauth2/internal/token.go b/vendor/golang.org/x/oauth2/internal/token.go
index 355c386..b4723fc 100644
--- a/vendor/golang.org/x/oauth2/internal/token.go
+++ b/vendor/golang.org/x/oauth2/internal/token.go
@@ -19,8 +19,6 @@ import (
"strings"
"sync"
"time"
-
- "golang.org/x/net/context/ctxhttp"
)
// Token represents the credentials used to authorize
@@ -229,7 +227,7 @@ func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string,
}
func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {
- r, err := ctxhttp.Do(ctx, ContextClient(ctx), req)
+ r, err := ContextClient(ctx).Do(req.WithContext(ctx))
if err != nil {
return nil, err
}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 172c738..39a098f 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1,12 +1,12 @@
-# github.com/go-playground/locales v0.14.0
-## explicit; go 1.13
+# github.com/go-playground/locales v0.14.1
+## explicit; go 1.17
github.com/go-playground/locales
github.com/go-playground/locales/currency
-# github.com/go-playground/universal-translator v0.18.0
-## explicit; go 1.13
+# github.com/go-playground/universal-translator v0.18.1
+## explicit; go 1.18
github.com/go-playground/universal-translator
-# github.com/go-playground/validator/v10 v10.11.1
-## explicit; go 1.13
+# github.com/go-playground/validator/v10 v10.11.2
+## explicit; go 1.18
github.com/go-playground/validator/v10
# github.com/golang/protobuf v1.5.2
## explicit; go 1.9
@@ -14,14 +14,13 @@ github.com/golang/protobuf/proto
# github.com/leodido/go-urn v1.2.1
## explicit; go 1.13
github.com/leodido/go-urn
-# golang.org/x/crypto v0.1.0
+# golang.org/x/crypto v0.5.0
## explicit; go 1.17
golang.org/x/crypto/sha3
-# golang.org/x/net v0.7.0
+# golang.org/x/net v0.6.0
## explicit; go 1.17
golang.org/x/net/context
-golang.org/x/net/context/ctxhttp
-# golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1
+# golang.org/x/oauth2 v0.5.0
## explicit; go 1.17
golang.org/x/oauth2
golang.org/x/oauth2/clientcredentials
diff --git a/v3/wowcgd.go b/wowcgd.go
similarity index 100%
rename from v3/wowcgd.go
rename to wowcgd.go
diff --git a/wowcgd/pvpSeason.go b/wowcgd/pvpSeason.go
index c6f0bb9..052c2c4 100644
--- a/wowcgd/pvpSeason.go
+++ b/wowcgd/pvpSeason.go
@@ -122,6 +122,17 @@ type PvPLeaderboards struct {
Type string `json:"type"`
} `json:"bracket"`
Entries []struct {
+ Character struct {
+ Name string `json:"name"`
+ ID int `json:"id"`
+ Realm struct {
+ Key struct {
+ Href string `json:"href"`
+ } `json:"key"`
+ ID int `json:"id"`
+ Slug string `json:"slug"`
+ } `json:"realm"`
+ } `json:"character"`
Faction struct {
Type string `json:"type"`
} `json:"faction,omitempty"`
@@ -132,94 +143,12 @@ type PvPLeaderboards struct {
Won int `json:"won"`
Lost int `json:"lost"`
} `json:"season_match_statistics"`
- Team struct {
- Name string `json:"name"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- Crest struct {
- Emblem struct {
- ID int `json:"id"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
- Color struct {
- Rgba struct {
- R int `json:"r"`
- G int `json:"g"`
- B int `json:"b"`
- A float32 `json:"a"`
- } `json:"rgba"`
- } `json:"color"`
- } `json:"emblem"`
- Border struct {
- ID int `json:"id"`
- Media struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"media"`
- Color struct {
- Rgba struct {
- R int `json:"r"`
- G int `json:"g"`
- B int `json:"b"`
- A float32 `json:"a"`
- } `json:"rgba"`
- } `json:"color"`
- } `json:"border"`
- Background struct {
- Color struct {
- Rgba struct {
- R int `json:"r"`
- G int `json:"g"`
- B int `json:"b"`
- A float32 `json:"a"`
- } `json:"rgba"`
- } `json:"color"`
- } `json:"background"`
- } `json:"crest"`
- Members []struct {
- Character struct {
- Name string `json:"name"`
- ID int `json:"id"`
- Realm struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- Slug string `json:"slug"`
- } `json:"realm"`
- PlayableClass struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"playable_class"`
- PlayableRace struct {
- Key struct {
- Href string `json:"href"`
- } `json:"key"`
- ID int `json:"id"`
- } `json:"playable_race"`
- } `json:"character"`
- SeasonMatchStatistics struct {
- Played int `json:"played"`
- Won int `json:"won"`
- Lost int `json:"lost"`
- } `json:"season_match_statistics"`
- Rating int `json:"rating"`
- } `json:"members"`
+ Tier struct {
+ Key struct {
+ Href string `json:"href"`
+ } `json:"key"`
ID int `json:"id"`
- } `json:"team,omitempty"`
+ } `json:"tier,omitempty"`
} `json:"entries"`
}
diff --git a/v3/wowcgd_test.go b/wowcgd_test.go
similarity index 100%
rename from v3/wowcgd_test.go
rename to wowcgd_test.go
diff --git a/v3/wowgd.go b/wowgd.go
similarity index 99%
rename from v3/wowgd.go
rename to wowgd.go
index 1aa948a..f1e8a26 100644
--- a/v3/wowgd.go
+++ b/wowgd.go
@@ -1165,6 +1165,18 @@ func (c *Client) WoWSpellMedia(ctx context.Context, spellID int) (*wowgd.SpellMe
return dat.(*wowgd.SpellMedia), header, err
}
+// WoWSpellSearch spell search data.
+func (c *Client) WoWSpellSearch(ctx context.Context, opts ...wowsearch.Opt) (*wowgd.SpellSearch, *Header, error) {
+ dat, header, err := c.getStructData(
+ ctx,
+ fmt.Sprintf("/data/wow/search/spell%s", buildSearchParams(opts...)),
+ c.GetStaticNamespace(),
+ &wowgd.SpellSearch{},
+ )
+
+ return dat.(*wowgd.SpellSearch), header, err
+}
+
// WoWTalentsIndex returns an index of talents.
func (c *Client) WoWTalentsIndex(ctx context.Context) (*wowgd.TalentsIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
diff --git a/v3/wowgd_test.go b/wowgd_test.go
similarity index 98%
rename from v3/wowgd_test.go
rename to wowgd_test.go
index 2822fe3..969bd82 100644
--- a/v3/wowgd_test.go
+++ b/wowgd_test.go
@@ -433,7 +433,7 @@ func TestWoWItemSearch(t *testing.T) {
}
if printOutput != "" {
- t.Logf("%+v\n", dat)
+ fmt.Printf("%+v\n", dat)
}
}
@@ -1373,6 +1373,24 @@ func TestWoWSpellMedia(t *testing.T) {
}
}
+func TestWoWSpellSearch(t *testing.T) {
+ dat, _, err := usClient.WoWSpellSearch(context.Background(),
+ wowsearch.Page(1),
+ wowsearch.PageSize(100),
+ wowsearch.OrderBy("id"),
+ wowsearch.Field().
+ AND("name.en_US", "Holy Shield"))
+
+ if err != nil {
+ fmt.Println(err)
+ t.Fail()
+ }
+
+ if printOutput != "" {
+ fmt.Printf("%+v\n", dat)
+ }
+}
+
func TestWoWTalentsIndex(t *testing.T) {
dat, _, err := usClient.WoWTalentsIndex(context.Background())
if err != nil {
diff --git a/v3/wowp.go b/wowp.go
similarity index 100%
rename from v3/wowp.go
rename to wowp.go
diff --git a/v3/wowp_test.go b/wowp_test.go
similarity index 100%
rename from v3/wowp_test.go
rename to wowp_test.go