Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Commit

Permalink
- Version 2.0.1
Browse files Browse the repository at this point in the history
- Fixed various bugs causing auction data to crash.
- Fixes #2
  • Loading branch information
roncli committed Oct 11, 2015
1 parent fdd2a77 commit 3923ff3
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 36 deletions.
16 changes: 0 additions & 16 deletions LibWowAPI/Auction/Schema/auctionHouse.vb

This file was deleted.

4 changes: 2 additions & 2 deletions LibWowAPI/Auction/Schema/auctions.vb
Expand Up @@ -10,8 +10,8 @@ Namespace roncliProductions.LibWowAPI.Auction.Schema

<DataContract()> Friend Class auctions

<DataMember()> Public Property realm As realmName
<DataMember()> Public Property auctions As auctionHouse
<DataMember()> Public Property realms As realmName()
<DataMember()> Public Property auctions As auction()

End Class

Expand Down
10 changes: 8 additions & 2 deletions LibWowAPI/Auction/clsAuctionData.vb
Expand Up @@ -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,
Expand Down
20 changes: 13 additions & 7 deletions LibWowAPI/Auction/clsAuctions.vb
Expand Up @@ -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
Expand All @@ -13,13 +14,18 @@ Namespace roncliProductions.LibWowAPI.Auction
''' <remarks>This class contains a snapshot of auctions for all auctions on a single realm.</remarks>
Public Class Auctions

Private colRealms As Collection(Of RealmName)
''' <summary>
''' The realm the auctions are on.
''' The realms the auctions are on.
''' </summary>
''' <value>This property gets or sets the Realm field.</value>
''' <returns>Returns the realm the auctions are on.</returns>
''' <remarks>This is a <see cref="RealmName" /> object that defines the realm the auctions are on.</remarks>
Public Property Realm As RealmName
''' <value>This property gets or sets the Realms field.</value>
''' <returns>Returns the realms the auctions are on.</returns>
''' <remarks>This is a <see cref="Collection(Of RealmName)" /> of <see cref="RealmName" /> objects that defines the realm the auctions are on.</remarks>
Public ReadOnly Property Realms As Collection(Of RealmName)
Get
Return colRealms
End Get
End Property

''' <summary>
''' The date the auctions were last updated.
Expand All @@ -37,8 +43,8 @@ Namespace roncliProductions.LibWowAPI.Auction
''' <remarks>This is an <see cref="AuctionHouse" /> object that lists all of the auctions currently available on the auction house for this realm.</remarks>
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
Expand Down
1 change: 0 additions & 1 deletion LibWowAPI/LibWowAPI.vbproj
Expand Up @@ -82,7 +82,6 @@
<Compile Include="Auction\clsAuctionDataOptions.vb" />
<Compile Include="Auction\clsFile.vb" />
<Compile Include="Auction\Schema\auction.vb" />
<Compile Include="Auction\Schema\auctionHouse.vb" />
<Compile Include="Auction\Schema\auctions.vb" />
<Compile Include="Auction\Schema\file.vb" />
<Compile Include="Auction\Schema\files.vb" />
Expand Down
2 changes: 1 addition & 1 deletion LibWowAPI/My Project/AssemblyInfo.vb
Expand Up @@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyDescription("A library to easily access information from the Blizzard World of Warcraft API")>
<Assembly: AssemblyCompany("roncli Productions")>
<Assembly: AssemblyProduct("LibWowAPI")>
<Assembly: AssemblyCopyright("©2008-2014 roncli Productions")>
<Assembly: AssemblyCopyright("©2008-2015 roncli Productions")>
<Assembly: AssemblyTrademark("")>

<Assembly: ComVisible(False)>
Expand Down
2 changes: 1 addition & 1 deletion LibWowAPIDemo/My Project/AssemblyInfo.vb
Expand Up @@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyDescription("An app that demonstrates the features of LibWowAPI")>
<Assembly: AssemblyCompany("roncli Productions")>
<Assembly: AssemblyProduct("LibWowAPIDemo")>
<Assembly: AssemblyCopyright("©2009-2014 roncli Productions")>
<Assembly: AssemblyCopyright("©2009-2015 roncli Productions")>
<Assembly: AssemblyTrademark("")>

<Assembly: ComVisible(False)>
Expand Down
5 changes: 4 additions & 1 deletion LibWowAPIDemo/modMain.vb
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion LibWowAPITest/My Project/AssemblyInfo.vb
Expand Up @@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyDescription("A test suite for LibWowAPI")>
<Assembly: AssemblyCompany("roncli Productions")>
<Assembly: AssemblyProduct("LibWowAPITest")>
<Assembly: AssemblyCopyright("©2014 roncli Productions")>
<Assembly: AssemblyCopyright("©2014-2015 roncli Productions")>
<Assembly: AssemblyTrademark("")>

<Assembly: ComVisible(False)>
Expand Down
2 changes: 2 additions & 0 deletions LibWowAPITest/Tests/clsAuctionDataTest.vb
Expand Up @@ -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

Expand All @@ -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

Expand Down
10 changes: 7 additions & 3 deletions 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).

Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 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.
Expand Down

0 comments on commit 3923ff3

Please sign in to comment.