-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* auctionHouseIndex struct & function to call the api * added function for retrieving auctions data * added comments to auction related types
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package wowcgd | ||
|
||
// AuctionHouseIndex structure | ||
type AuctionHouseIndex struct { | ||
Links struct { | ||
Self struct { | ||
Href string `json:"href"` | ||
} `json:"self"` | ||
} `json:"_links"` | ||
Auctions []struct { | ||
Key struct { | ||
Href string `json:"href"` | ||
} `json:"key"` | ||
Name string `json:"name"` | ||
ID int `json:"id"` | ||
} `json:"auctions"` | ||
} | ||
|
||
// Auctions structure | ||
type Auctions struct { | ||
Linkds struct { | ||
Self struct { | ||
Href string `json:"href"` | ||
} `json:"self"` | ||
} `json:"_links"` | ||
ConnectedRealm struct { | ||
Href string `json:"href"` | ||
} `json:"connected_realm"` | ||
Auctions []Auction `json:"auctions"` | ||
ID int `json:"id"` | ||
Name string `json:"name"` | ||
} | ||
|
||
// Auction structure | ||
type Auction struct { | ||
ID int `json:"id"` | ||
Item struct { | ||
ID int `json:"id"` | ||
} `json:"item"` | ||
Bid int `json:"bid"` | ||
Buyout int `json:"buyout"` | ||
Quantity int `json:"quantity"` | ||
TimeLeft string `json:"time_left"` | ||
} |