JavaScript is required to use Bungie.net

Forums

originally posted in:BungieNetPlatform
9/7/2014 2:05:12 PM
2
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).
English

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • HI mate, Thanks a lot for contributing into that, I went quickly through the code and can improve it quite in a good better reusable way, is your Git allowing me to commit changes, or you have to give me permissions explicitly? Also I would split into sub projects to separate business layer from representation data, would be nice to have something like that: BungieNetPlatform.Data - representing for Models, Enums and all data to be used by services BungieNetPlatform.Business - mainly would contain services to use rest api, I would write with IoC approach and write some units tests in - different utils, customized helpers like generic method extensions, parsers and etc. BungieNetPlatform.Tests - this is vital to write tests for all rest api calls, making sure that when everyone collaborate into project, before comitting doesn't break the code, that already written. BungieNetPlatform.Web - would be useful to create several pages for testing purposes in order to display it and see how it looks and how the data is parsed There is a lot things we can do I'll let you know more about this, after I'll look into this more in detail this Saturday or Sunday. Cheers, Serge.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • i'd love to build this out i decided to add a readme file for those accessing the github repo directly. i'll see what I can do and look over the code.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

You are not allowed to view this content.
;
preload icon
preload icon
preload icon