first relase of C# library

100 Undead Mage
10350
my first release of the library.

http://code.google.com/p/n-battle-net-api/downloads/list

Supports:
authentication (not tested because i never got an email back from bliz yet)
icons
thumbnails
caching
realm status
character
guilds
data
items (as documented)


please let me know what you think.
Reply Quote
85 Tauren Druid
8320
Nice job, I'm going to try it out and I'll give you some feedback on it
Reply Quote
100 Undead Mage
10350
I'm about to push another release out with some fixes and speed improvements. Got any feedback that you would like me to add before I make another release?
Reply Quote
85 Tauren Druid
8320
I haven't had time this past week to check it out :(
Reply Quote
100 Undead Mage
10350
Just put up version 0.2.0.0

New features:
Faster and slimmer memory usage. Using direct json parsing instead of converting to XML first.
Support for locale. Defaults to your system one if not specified
Correctly encodes special characters in names (using %)
Better caching of data
Additional missing fields added to some objects (ie, tinker for tooltips)
Initial untested support for Auction data.
Reply Quote
85 Tauren Druid
4135
Awesome, Femor! I've added this to the languages thread at http://us.battle.net/wow/en/forum/topic/2369882588#1.
Reply Quote
85 Tauren Druid
8320
Femor,
So as to not clutter up support of your DLL here, I have submitted an issue on your Google Code page, please check it out.
Reply Quote
85 Human Paladin
6775
I was looking over the cache code, and I was wondering... is there any point where the cache files get deleted, like when an individual item expires, or when the cache is cleared? Unless I missed something, it looks like the cache files hang around forever.
Reply Quote
100 Undead Mage
10350
The cache stays around forever. There is code to clear it if needed. If a cache item 'expires' a new one will/should be fetched from the server and the old one replaced.

The caching code is very simple. Nothing implemented for max disk space or pruning of least used items. I put it together for the initial release with plans to improve it or replace it with something else when needed.
Reply Quote
85 Human Paladin
6775
Definitely not a huge issue for desktops/laptops, with giant HDDs, but you might want to consider adding some pruning code later on if you plan to support WP7. Also, there's some libraries you reference in this version that aren't available to WP7 (or Silverlight).

Have you considered grabbing the Silverlight for WP SDK and trying to run a build against that?
Reply Quote
100 Undead Mage
10350
I believe the libraries it references have to do with the json parsing. I actualy support 2 different parses at the moment. The slower one "should" work with WP7. I just need to restructure my code so that it does not require both parser libraries to be present. IF nothing else, I could write my own small json parser :D

I'm also updating the code to work in earlier versions (pre v4.0) of the .net framework
Reply Quote
85 Human Paladin
6775
Your cache code uses BinaryFormatter, which isn't available in SL/WP7 :) It's okay though, BinaryReader/BinaryWriter should still handle it okay... you just lose DateTime.FromBinary. Also your file mechanism will need to be updated to support IsolatedStorageFile :) No worries for any of that, really, though.
Reply Quote
100 Undead Mage
10350
08/02/2011 04:25 PMPosted by Chalyss
Your cache code uses BinaryFormatter, which isn't available in SL/WP7 :) It's okay though, BinaryReader/BinaryWriter should still handle it okay... you just lose DateTime.FromBinary. Also your file mechanism will need to be updated to support IsolatedStorageFile :) No worries for any of that, really, though.


Im not using BinaryReader/Writer, and what do you mean lose FromBinary?
Reply Quote
85 Human Paladin
6775
DateTime abs = DateTime.FromBinary(r.ReadInt64());

This statement won't compile in a project targetting Windows Phone.

Also you most definitely are using BinaryReader:

BinaryReader r = new BinaryReader(st); :)
Reply Quote
100 Undead Mage
10350
I meant to say BinaryFormatter :D. Anyway, I'm busy trying to make the lib compatible.
Reply Quote
90 Tauren Druid
7555
You have miss-spelled "character" in your c# for when looping on guild members API. Its "charcater" some place and all the names return NULL

foreach (Member member in guild.Members)
{
TestingLiteral.Text += "Member: " + member.Charcater.Name + "<br/>";
}
Reply Quote
100 Undead Mage
10350
You have miss-spelled "character" in your c# for when looping on guild members API. Its "charcater" some place and all the names return NULL

foreach (Member member in guild.Members)
{
TestingLiteral.Text += "Member: " + member.Charcater.Name + "<br/>";
}


So i did. The next release will have the correct spelling

Please submit issues at http://code.google.com/p/n-battle-net-api/issues/list instead of in this forum so that I can better keep track of them
Reply Quote
100 Undead Mage
10350
Version 0.4.0.0 released with a number of fixes and speed improvements
Reply Quote
100 Undead Mage
10350
version 0.5.0.0 is out

Adds pvp data and a number of fixes
Reply Quote
90 Undead Priest
7975
Very nice. Are you concerned at all that when you store the code on Google that they technically own the code you write and can re-use anywhere they want? That's why I don't store my libraries in places like that because I don't want to give my code to anyone unless it's a true open source repository. Pretty much like giving free rein to China on anything I write that they can hack into.

Either way, thanks for posting this.

Bob
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)

Reported!

[Close]