how to get LastModifiedValue

Aug 21, 2011 at 12:58 AM

Hi I was wondering:

Acording to blizzards API, geting AH data should be a two step process.

 

1. use the api to get the url and LastModified

2. use the last modified to see if there is any new data for that realm. (compare to last lastmodified for that server)

3. if their is new data use the url to download the file.

4. do stuff with it

 

Curently my program is:

1. downloading the AH data

2. doing stuff with it

 

So my question is how to get LastModified without downloading the AH dump?

 

Very nice API btw :D

Coordinator
Aug 21, 2011 at 10:52 AM
Edited Aug 21, 2011 at 10:52 AM

Thanks a lot for the feedback. The GetAuctionDump method was implemented to encapsulate the two step process, so I fixed this issue as follows:

- Now the AuctionDump class LastModifiedUtc property will contain the value returned from the Last-Modified header returned from battle.net API. So your program can store this value in order to avoid redownloading AH data.

- I added a new overload for the GetAuctionDump that has an ifModifiedSince parameter. You can pass the value returned from the LastModified you have from the previous call, and if there is no new data, the method will not perform the second step (i.e. it will return null instead of re-downloading the auction house dump).

This change is implemented in the latest release version 0.5 :)