Topic C# Library for the Community Platform API
Briandek
Skullcrusher
Briandek
85 Human Warrior
6905
Following Cyaga's initial steps - I thought I'd contribute and build a C# library to access the Community Platform API.

I will continue to update the library as changes occur to the API and as we get access to other areas of the platform (characters,etc)

You can find the code at https://github.com/briandek/WowDotNetAPI

Please feel free to jump in and push changes where you see fit. Any feedback is more than welcome :)
Sixen
Black Dragonflight
Sixen
MVP
58 Blood Elf Death Knight
500
A C# lib, now this will be interesting. Thanks for sharing, Brian.
________________________________________________
The Chat Gem Lives!
Domanji
Scarlet Crusade
Domanji
4 Worgen Rogue
0
Edited by Domanji on 5/4/11 12:50 PM (PDT)
This is something I'll more than likely contribute to when I get the time. First thing I notice, though, is the non-PascalCase public identifiers (as per Microsoft's guidelines for library developers http://msdn.microsoft.com/en-us/library/ms229042.aspx). I guess that'll be my first submission ;)
Korkran
Lightninghoof
Korkran
80 Tauren Paladin
2290
Briandek... that does ring a bell...
Aren't you that guy from TrinityCore (World of Warcraft emulator) trying to get packets with your illegal sniffers?
If you are, sorry, but you are retarded and I felt like saying this.
If not, then wrong person and have a nice day! >.<
Bröoks
Nathrezim
Bröoks
85 Troll Mage
3185
Edited by Bröoks on 6/1/11 4:59 PM (PDT)
*cracks fingers*

ps - test driven design for video game api? awesome.
Briandek
Skullcrusher
Briandek
85 Human Warrior
6905
Edited by Briandek on 6/2/11 1:03 PM (PDT)
Briandek... that does ring a bell...
Aren't you that guy from TrinityCore (World of Warcraft emulator) trying to get packets with your illegal sniffers?
If you are, sorry, but you are retarded and I felt like saying this.
If not, then wrong person and have a nice day! >.<


I think my nickname is pretty unique, but nope I'm not the person you're thinking of. Hope you have a nice day too :)

*cracks fingers*

ps - test driven design for video game api? awesome.


haha I should be mocking the tests, they're not really "unit tests", they're more like sanity tests if anything :P - I'll take some time over the weekend to clean that up as it's been bugging me for a bit.
Dresden
Destromath
Dresden
85 Human Mage
12855
Edited by Dresden on 7/5/11 7:05 PM (PDT)
Removed.
Straton
Straton
Web & Mobile Team
Do not dump raw output here. Granted this is a developer forum, but use some common sense and link to a gist.github.com or pastie.org blob.
Dresden
Destromath
Dresden
85 Human Mage
12855
I'd thank you for the instruction, but telling me to use common sense is rude, considering the many times I've seen giant tracert dumps in your support forums along with dxdiag dumps.

I'll edit my post and remove the contents, and go back to lurking.

Alvraen
Destromath
Alvraen
86 Blood Elf Death Knight
10345
That's a completely different thing. dxdiag/tracerts are almost always pertinent for troubleshooting.
Ferbmcgiggin
Crushridge
Ferbmcgiggin
85 Undead Priest
5960
Edited by Ferbmcgiggin on 7/6/11 6:21 PM (PDT)
@Briandek: Had you considered a higher level abstraction around the whole thing? Given some relinq and dynamic proxy mojo it would be pretty easy. I was looking at writing a wrapper so you could write something like:

var servers = new[]{ "Thrall", "Cho'gall"}
using(var api = new Linq2Wow(ServerRegion.US))
{
var totalAchievementPointsForLevel85CharactersInGuildsStartingWithBobOnServers =
api.Servers.Where(s=>servers.Contains(s.Name))
.SelectMany(s=>s.Guilds.Where(g=>g.Name.StartsWith("Bob")))
.SelectMany(g=>g.Characters.Where(c=>c.Level == 85))
.Select(c=>c.AchievementPoints)
.Sum();
}


Let me know if you're interested.
Kx
Sargeras
Kx
55 Dwarf Warlock
210
Worth noting I shouldn't be worried about the absolute performance of these wrappers since (a) the bottleneck is going to be network and (b) you shouldn't be making so many requests.

That in mind, the above implementation as a C# wrapper would be super sexy. Minus that 74-character variable name. Also, I prefer full CamelCase in C#.
Muffìn
Skywall
Muffìn
85 Night Elf Warrior
3695
Briandek has kindly accepted my partnership offer in working on this C# Library
(tehmuffinman on GitHub)

Keep the suggestions coming!

Ferbmcgiggin's suggestion is definitely schmexy :)
Ferbmcgiggin
Crushridge
Ferbmcgiggin
85 Undead Priest
5960
1) I don't believe the posted code would need to preform an unreasonable number of requests. Given appropriate caching and query optimization it could be done in a number of requests equal to the number of realms + the total number of guilds starting with "bob". Remember the power of Linq lies in deferring execution until absolutely the last possible second.

2) While you might prefer camel cased member names they are most definitely outside the framework design guidelines see http://msdn.microsoft.com/en-us/library/ms229043.aspx. I for one don't want to be the corpse that inflicts a library with non-standard style on the world. I've used such libraries and the style differences are painful.
Muffìn
Skywall
Muffìn
85 Night Elf Warrior
3695
Brian and I forked the main branch to better facilitate co-development on this library.

For bleeding edge updates (experimental until they are pulled into the main branch) you can check out my fork here:

https://github.com/tehmufifnman/WowDotNetAPI
Muffìn
Skywall
Muffìn
85 Night Elf Warrior
3695
The master branch (https://github.com/briandek/WowDotNetAPI) has been updated!

See updated sample for new usage.

We are looking for feature suggestions from people who will use this library, so please post anything/everything that you would like to potentially see!

We look forward to seeing some awesome feature ideas. =)
Fleas
Skullcrusher
Fleas
90 Night Elf Druid
14980
Posting for Briandek as he can't atm:

"the library has been recently updated, you can access AH data now"
Fleas
Skullcrusher
Fleas
90 Night Elf Druid
14980
Briandek: "the library has been updated, now supports authentication and item data".
Xandrir
Cairne
Xandrir
85 Night Elf Death Knight
4475
Edited by Xandrir on 9/2/11 1:06 PM (PDT)
EDIT: Nothing to see here, move along. Asked a very long question that I was able to answer on my own and I can't seem to delete said post.
Xandrir
Cairne
Xandrir
85 Night Elf Death Knight
4475
Is there anyone still active on this project? Haven't seen any action on the github site for about a month now, and I have some ideas on implementing some error handling for the different response codes that could come back. If so, please email me at james.p.mcconnell AT gmail DOT com. I'm also Github as interneth3ro. Thanks.

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.

Click here to view the Forums Code of Conduct.

Report Post # written by
Reason
Explain (256 characters max)

Reported!

[Close]