Skip to content

Commit

Permalink
Remove deprecated spec levels from inside character entity (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
man90es authored Sep 1, 2024
1 parent 83cf8aa commit bb43da8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 68 deletions.
61 changes: 0 additions & 61 deletions docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,67 221,6 @@
"nullable": true,
"type": "number",
"example": 56
},
"specLevels": {
"deprecated": true,
"nullable": true,
"properties": {
"gathering": {
"nullable": false,
"type": "string",
"example": "Beginner 6"
},
"fishing": {
"nullable": false,
"type": "string",
"example": "Master 18"
},
"hunting": {
"nullable": false,
"type": "string",
"example": "Beginner 1"
},
"cooking": {
"nullable": false,
"type": "string",
"example": "Beginner 4"
},
"alchemy": {
"nullable": false,
"type": "string",
"example": "Beginner 1"
},
"processing": {
"nullable": false,
"type": "string",
"example": "Beginner 9"
},
"training": {
"nullable": false,
"type": "string",
"example": "Apprentice 1"
},
"trading": {
"nullable": false,
"type": "string",
"example": "Apprentice 3"
},
"farming": {
"nullable": false,
"type": "string",
"example": "Beginner 1"
},
"sailing": {
"nullable": false,
"type": "string",
"example": "Beginner 1"
},
"barter": {
"nullable": false,
"type": "string",
"example": "Beginner 1"
}
}
}
}
}
Expand Down
9 changes: 4 additions & 5 deletions models/Character.go
Original file line number Diff line number Diff line change
@@ -1,9 1,8 @@
package models

type Character struct {
Name string `json:"name"`
Class string `json:"class"`
Main bool `json:"main,omitempty"`
Level uint8 `json:"level,omitempty"`
SpecLevels *Specs `json:"specLevels,omitempty"` // Deprecated, will be removed on 1 September 2024
Name string `json:"name"`
Class string `json:"class"`
Main bool `json:"main,omitempty"`
Level uint8 `json:"level,omitempty"`
}
3 changes: 1 addition & 2 deletions scrapers/ScrapeAdventurer.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 97,7 @@ func ScrapeAdventurer(region string, profileTarget string) (profile models.Profi

c.OnHTML(`.character_desc_area`, func(e *colly.HTMLElement) {
character := models.Character{
Class: e.ChildText(".character_info .character_symbol em:last-child"),
SpecLevels: profile.SpecLevels, // Deprecated, will be removed on 1 September 2024
Class: e.ChildText(".character_info .character_symbol em:last-child"),
}

if region != "EU" && region != "NA" {
Expand Down

0 comments on commit bb43da8

Please sign in to comment.