originally posted in:BungieNetPlatform
https://github.com/dazarobbo/BungieNetPlatform-CSharp
- C#
- Visual Studio ([url=http://michaelcrump.net/setting-up-github-to-work-with-visual-studio-2013-step-by-step]Git for VS tutorial[/url])
- JSON.NET via NuGet
- Scope: all methods/endpoints provided by the bungie.net platform
- Current code is migrated just from what I already had been working with, so it's very much incomplete and might have some odd things still in there
I would really like to have this developed up to a point where it can be used for any bungie.net purpose (ie. forums, user accounts, etc...) and not just Destiny-related stuff. So if you have any C# experience and would like to contribute, please post below and we'll try to work out the logistics of it.
-
Am I missing something... Thought this was a .net library but it's actually php?
-
Very cool dazarobbo, been looking for something like this
-
Edited by shizknowz: 12/17/2014 1:05:36 PMIs there an example of how to use the library? I have it all set up in visual studio and would like to have a simple example of how to get a return from Bungie. I may be asking for something that is already present in the GIT repository, if so I apologize.
-
Since there are some people here, I'll give a quick overview of how it currently works. - Responses from bungie.net are JSON encoded, so that's why JSON.NET is included - Currently, class constructors take JObjects which are those parsed by JSON.NET from the response from bungie.net. Those constructors then do the conversion into C# and .NET types. [url=https://github.com/dazarobbo/BungieNetPlatform/blob/master/BungieNetPlatform/BungieNetPlatform/User.cs#L82]Example[/url]. The current code to do a lot of this is woefully incomplete though. - The classes do try to mimic the serialised objects from bungie.net as closely as possible (which I think it probably what we should aim for at the very least), but do and probably should also include any additional functionality that can be provided. [url=https://github.com/dazarobbo/BungieNetPlatform/blob/master/BungieNetPlatform/BungieNetPlatform/Tag.cs]Example[/url]. - Making requests to the Platform requires you pass a [url=https://github.com/dazarobbo/BungieNetPlatform/blob/master/BungieNetPlatform/BungieNetPlatform/RequestingUser.cs]RequestingUser[/url] object to each exposed service method in the [url=https://github.com/dazarobbo/BungieNetPlatform/blob/master/BungieNetPlatform/BungieNetPlatform/Platform.cs]Platform[/url] class. The reason for this is to manage any cookie values and other little bits of information you might need to send, although it's admittedly not the best design. This is also the mechanism I'm using to make authorised requests using an authenticated Google account, although you won't find [i]that[/i] code in there ;) - Since the Platform class is essentially a series of IO bound methods, they should all return a Task<T> from an async method. That's my view anyway. but obviously they shouldn't if for whatever reason it needs to be synchronous.. - The IPlatform interface Platform implements probably doesn't need to exist. I was just using it for WCF stuff with pipes. // What I would like to do is divide and conquer; split up implementing the classes into separate groups: forums, users, destiny, etc... and anyone willing to write up the code for a particular group or sub group can take it on board (assigned via GitHub to keep track of things though).
-
I would like to help contribute. C# programmer here.
-
Edited by Burnwulf: 11/6/2014 9:00:37 AMI am currently a college game programming student using C# and would be interested in what I could do with this API. I have a few idea's, but I want to see what others would like to see happen. If you would like any help with the API, feel free to message me on PS4 or here. (Overloaded_Wolf)
-
I'd be very willing to help with this. I've had a fair bit of C# experience in my time. Let me know exactly how you would like to proceed, it'll be good fun :)
-
I'd like to help out if I can. C# developer here, though I do more business apps with not really "new" tech, but am willing to learn if there's anything I can be of assistance with. Kritner on ps4 or message me
-
I'm at a complete loss on how to use BungieNetPlatform. For my project I need to get the characters of a user by PSN or XBox ID. Could someone be of assistance as to how? If I requested my own info (PSN ID: LostLogic) I'd get a responce back saying : 1 character, Warlock level 23. Or an object where I can grab said info.
-
This is great! Do you currently have authentication support in here for making authenticated requests? Thanks.
-
Excellent. Once vendors are available I may take a look at this--I'm mainly interested in like an eBay "watch list" type app for my phone. I don't have a lot of time between all my own apps and stuff to work on a fully fleshed out Destiny app, which is why I was happy to see Vivek do it.
-
Are you working out how the Bungie REST API works just by inspection? They don't publish any details right? All I'm getting at is that it could change to require some authentication token, or there could be other unannounced API changes, right? Hopefully that won't happen! :-)
-
Unfortunately I only have mediocre C++ experience, and extremely basic C#, but I'm really curious as to what exactly you're doing here.
-
Nice. I'll definitely have to take a look at this.
-
I'll have to look into this when I'm off mobile. Nice.
-
Awesome man :) Was looking for something like that to start up with the Bungie.Net platform (esp. Destiny stats).