diff --git a/LibWowAPI/Auction/Schema/auctionHouse.vb b/LibWowAPI/Auction/Schema/auctionHouse.vb deleted file mode 100644 index 92350f0..0000000 --- a/LibWowAPI/Auction/Schema/auctionHouse.vb +++ /dev/null @@ -1,16 +0,0 @@ -' LibWowAPI -' by Ronald M. Clifford (roncli@roncli.com) -' -' This source code is released under the GNU Lesser General Public License (LGPL) Version 3.0. - -Imports System.Runtime.Serialization - -Namespace roncliProductions.LibWowAPI.Auction.Schema - - Friend Class auctionHouse - - Public Property auctions As auction() - - End Class - -End Namespace diff --git a/LibWowAPI/Auction/Schema/auctions.vb b/LibWowAPI/Auction/Schema/auctions.vb index d32c787..b933b64 100644 --- a/LibWowAPI/Auction/Schema/auctions.vb +++ b/LibWowAPI/Auction/Schema/auctions.vb @@ -10,8 +10,8 @@ Namespace roncliProductions.LibWowAPI.Auction.Schema Friend Class auctions - Public Property realm As realmName - Public Property auctions As auctionHouse + Public Property realms As realmName() + Public Property auctions As auction() End Class diff --git a/LibWowAPI/Auction/clsAuctionData.vb b/LibWowAPI/Auction/clsAuctionData.vb index 44a6fd6..e3c5199 100644 --- a/LibWowAPI/Auction/clsAuctionData.vb +++ b/LibWowAPI/Auction/clsAuctionData.vb @@ -134,11 +134,17 @@ Namespace roncliProductions.LibWowAPI.Auction colAuctions.Add( New Auctions( - New RealmName(aAuctions.realm.name, aAuctions.realm.slug), + ( + From r In aAuctions.realms + Select New RealmName( + r.name, + r.slug + ) + ).ToCollection(), fFile.LastModified, New AuctionHouse( ( - From a In aAuctions.auctions.auctions + From a In aAuctions.auctions Select New Auction( a.auc, a.item, diff --git a/LibWowAPI/Auction/clsAuctions.vb b/LibWowAPI/Auction/clsAuctions.vb index 11e56c6..3a35945 100644 --- a/LibWowAPI/Auction/clsAuctions.vb +++ b/LibWowAPI/Auction/clsAuctions.vb @@ -3,6 +3,7 @@ ' ' This source code is released under the GNU Lesser General Public License (LGPL) Version 3.0. +Imports System.Collections.ObjectModel Imports roncliProductions.LibWowAPI.Realm Namespace roncliProductions.LibWowAPI.Auction @@ -13,13 +14,18 @@ Namespace roncliProductions.LibWowAPI.Auction ''' This class contains a snapshot of auctions for all auctions on a single realm. Public Class Auctions + Private colRealms As Collection(Of RealmName) ''' - ''' The realm the auctions are on. + ''' The realms the auctions are on. ''' - ''' This property gets or sets the Realm field. - ''' Returns the realm the auctions are on. - ''' This is a object that defines the realm the auctions are on. - Public Property Realm As RealmName + ''' This property gets or sets the Realms field. + ''' Returns the realms the auctions are on. + ''' This is a of objects that defines the realm the auctions are on. + Public ReadOnly Property Realms As Collection(Of RealmName) + Get + Return colRealms + End Get + End Property ''' ''' The date the auctions were last updated. @@ -37,8 +43,8 @@ Namespace roncliProductions.LibWowAPI.Auction ''' This is an object that lists all of the auctions currently available on the auction house for this realm. Public Property Auctions As AuctionHouse - Friend Sub New(rnRealm As RealmName, dtLastUpdated As Date, ahAuctions As AuctionHouse) - Realm = rnRealm + Friend Sub New(rnRealms As Collection(Of RealmName), dtLastUpdated As Date, ahAuctions As AuctionHouse) + colRealms = rnRealms LastUpdated = dtLastUpdated Auctions = ahAuctions End Sub diff --git a/LibWowAPI/LibWowAPI.vbproj b/LibWowAPI/LibWowAPI.vbproj index f1a2760..d7cd05e 100644 --- a/LibWowAPI/LibWowAPI.vbproj +++ b/LibWowAPI/LibWowAPI.vbproj @@ -82,7 +82,6 @@ - diff --git a/LibWowAPI/My Project/AssemblyInfo.vb b/LibWowAPI/My Project/AssemblyInfo.vb index 289ec44..68e883e 100644 --- a/LibWowAPI/My Project/AssemblyInfo.vb +++ b/LibWowAPI/My Project/AssemblyInfo.vb @@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices - + diff --git a/LibWowAPIDemo/My Project/AssemblyInfo.vb b/LibWowAPIDemo/My Project/AssemblyInfo.vb index fb18ae6..acd6057 100644 --- a/LibWowAPIDemo/My Project/AssemblyInfo.vb +++ b/LibWowAPIDemo/My Project/AssemblyInfo.vb @@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices - + diff --git a/LibWowAPIDemo/modMain.vb b/LibWowAPIDemo/modMain.vb index d22f6e0..7b72343 100644 --- a/LibWowAPIDemo/modMain.vb +++ b/LibWowAPIDemo/modMain.vb @@ -372,7 +372,10 @@ Namespace roncliProductions.LibWowAPIDemo End If For Each aAuctions In adAuctions.Auctions - Console.WriteLine("Auctions for {0} - Slug {1}", aAuctions.Realm.Name, aAuctions.Realm.Slug) + Console.WriteLine("Auctions for:") + For Each rnRealm In aAuctions.Realms + Console.WriteLine("{0} - Slug {1}", rnRealm.Name, rnRealm.Slug) + Next For Each aAuction In aAuctions.Auctions.Auctions Console.WriteLine(" {0}) Item {1} ({2}:{3}) x{4} - {5}", aAuction.AuctionID, aAuction.ItemID, aAuction.SuffixID, aAuction.UniqueID, aAuction.Quantity, aAuction.TimeLeft) Console.WriteLine(" Seller: {0}-{1} Bid: {2}g{3}s{4}c Buyout: {5}g{6}s{7}c", aAuction.Owner, aAuction.OwnerRealm, Math.Floor(aAuction.Bid / 10000), Math.Floor((aAuction.Bid / 100) Mod 100), aAuction.Bid Mod 100, Math.Floor(aAuction.Buyout / 10000), Math.Floor((aAuction.Buyout / 100) Mod 100), aAuction.Buyout Mod 100) diff --git a/LibWowAPITest/My Project/AssemblyInfo.vb b/LibWowAPITest/My Project/AssemblyInfo.vb index 1f879d9..d2f7456 100644 --- a/LibWowAPITest/My Project/AssemblyInfo.vb +++ b/LibWowAPITest/My Project/AssemblyInfo.vb @@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices - + diff --git a/LibWowAPITest/Tests/clsAuctionDataTest.vb b/LibWowAPITest/Tests/clsAuctionDataTest.vb index acb1f48..9dd3c1c 100644 --- a/LibWowAPITest/Tests/clsAuctionDataTest.vb +++ b/LibWowAPITest/Tests/clsAuctionDataTest.vb @@ -23,6 +23,7 @@ Namespace roncliProductions.LibWowAPITest.Tests Dim aAuctions = adData.Auctions Assert.IsTrue(aAuctions.Count > 0) + Assert.IsTrue(aAuctions.First().Realms.Count > 0) Assert.IsTrue(aAuctions.First().Auctions.Auctions.Count > 0) End Sub @@ -32,6 +33,7 @@ Namespace roncliProductions.LibWowAPITest.Tests Dim aAuctions = adData.Auctions Assert.IsTrue(aAuctions.Count > 0) + Assert.IsTrue(aAuctions.First().Realms.Count > 0) Assert.IsTrue(aAuctions.First().Auctions.Auctions.Count > 0) End Sub diff --git a/README.markdown b/README.markdown index 1e53b7a..d40f7a8 100644 --- a/README.markdown +++ b/README.markdown @@ -1,9 +1,9 @@ # LibWowAPI -### Version 2.0 - Release 11/12/2014 +### Version 2.0.1 - Released 10/11/2015 LibWowAPI is a library for the .NET framework that interfaces with the Blizzard World of Warcraft API. The [Blizzard World of Warcraft API](http://blizzard.github.com/api-wow-docs) is an online API that interfaces with World of Warcraft. -(c)2008-2014 [Ronald M. Clifford](mailto:roncli@roncli.com) +(c)2008-2015 [Ronald M. Clifford](mailto:roncli@roncli.com) Licensed under the [LGPL 3.0](http://www.gnu.org/licenses/lgpl.html). @@ -12,6 +12,10 @@ See the [Documentation](https://github.com/roncli/LibWowAPI/wiki/LibWowAPI) for ## Version History +### 2.0.1 - 10/11/2015 +* Fixed a bug with the auctions that was introduced when Blizzard changed the realm list to incorporate connected realms. Note that this is considered a breaking change: Auctions.Realm is now Auctions.Realms, and is now a collection of RealmName. +* Fixed a bug with the auctions that was introduced after Blizzard consolidated the auction houses into one realm and restructured the JSON so that auctions is no longer a collection of auction houses, but a collection of auctions. This is not a breaking change. + ### 2.0 - 11/12/2014 * Summary: * This is a large update, upgrading to the .NET Framework v4.5.1, keeping up with Blizzard's latest API changes, refactorization and disambiguation of many classes, and a new unit testing project. Hence, the major version number increment. @@ -203,7 +207,7 @@ See the [Documentation](https://github.com/roncli/LibWowAPI/wiki/LibWowAPI) for ## Planned versions -### 2.0.1 +### 2.0.2 * gzip support. ## Classes diff --git a/README.txt b/README.txt index dee90e0..80fbac0 100644 --- a/README.txt +++ b/README.txt @@ -1,5 +1,5 @@ LibWowAPI -Version 2.0 +Version 2.0.1 by Ronald M. Clifford (roncli@roncli.com) This source code is released under the GNU Lesser General Public License (LGPL) Version 3.0.