Couple Questions.

Oct 7, 2010 at 9:42 PM

Hi, I have here a few questions.

First off I would like to say thank you for releasing such a great library. I for one know nothing about "HTML, JSON, SOAP" and all those other web type languages so I find this to be of great help.

1) would you consider releasing more examples?

2) Would you allow users to edit your source code? (Unless it would break "TOS")

-Mike

 

 

Coordinator
Oct 8, 2010 at 10:02 PM

Hi Mike,

I'm hoping to get some time to put more examples together over the weekend.  I'll update the source when that happens.

As for editing my source, everyone is free to download the source and make any edits they want.  This code is licensed under the MS-PL which gives pretty much free reign on what you make with it use it for as long as you attribute.  

The latest source is available from the Source Code tab, edit to your hearts content.

Good Luck,

Jacob

Oct 11, 2010 at 12:59 AM

how would i access playlist data using "StatisticsByPlaylist"

Coordinator
Oct 11, 2010 at 4:29 AM

I haven't had a lot of experience with that service.  Have you tried calling it in the same manner as the other services?  What kind of response data are you getting back?  Is there something wrong with the response data?

Oct 12, 2010 at 1:06 AM

Hi, You can disregard my previous post. I was trying to do something (get map information) using the wrong function. So what I was trying to do was get map information using some code (code below). the code below gets commendation meta information via an "id" it then returns commendation data for that supplied "id" (name, description......so on). I tried doing the same with "AllMapsById" and it doesn't return anything.

        public void GetCommendationDetails()
        {

            var Game_Meta_Service = new GameMetadataService(Key);

            Game_Meta_Service.GotError += (s, e) =>
                {
                };
            Game_Meta_Service.GotResult += (s, e) =>
                {

                    var Details = e.Argument;

                    for (int i = 0; i <= Details.Data.AllCommendationsById.Count - 1; i++)
                    {
                        MessageBox.Show(string.Format("Name: {0}", Details.Data.AllCommendationsById[i].Name) + "\r" +
                                        string.Format("Description: {0}", Details.Data.AllCommendationsById[i].Description) + "\r" +
                                        string.Format("Iron Required: {0}", Details.Data.AllCommendationsById[i].Iron) + "\r" +
                                        string.Format("Bronze Required: {0}", Details.Data.AllCommendationsById[i].Bronze) + "\r" +
                                        string.Format("Silver Required: {0}", Details.Data.AllCommendationsById[i].Silver) + "\r" +
                                        string.Format("Gold Required: {0}", Details.Data.AllCommendationsById[i].Gold) + "\r" +
                                        string.Format("Max Required: {0}", Details.Data.AllCommendationsById[i].Max) + "\r" +
                                        string.Format("Id: {0}", Details.Data.AllCommendationsById[i].Id), "Commendation Viewer");
                    }

                };

            Game_Details_Service.GetGameDataAsync();

        }

 

how would I go about getting map information? Do I have to input the maps "Id" for it to return something?

Coordinator
Oct 12, 2010 at 1:35 AM
Edited Oct 12, 2010 at 1:38 AM

Check out the GameMetadata.AllMapsById collection.  It's a dictionary of map information by id.  You'll need to get the Id of the map you are looking for (usually you get this through a GetPlayerDetailsByMap call).

Jacob
EDIt: sorry, didn't RTFOP.  So is the AllMapsById collection always null?  
Oct 12, 2010 at 3:39 AM
Edited Oct 12, 2010 at 4:19 AM

I'm not sure, I'll have to check that out. I'll post my findings and the code.

 

        public void GetMapDetails()
        {

            var Map_Details_Service = new GameMetadataService(Key);

            Map_Details_Service.GotError += (s, e) =>
                { 
                };
            Map_Details_Service.GotResult += (s, e) =>
                {

                    var Details = e.Argument.Data;

                    MessageBox.Show(string.Format("Map Name: {0}", Details.AllMapsById[1080]));

                };

            Map_Details_Service.GetGameDataAsync();

        }

(Taken from your source code)
    public class Map
    {
        uint Id { get; set; }
        string ImageName { get; set; }
        string MapType { get; set; }
        string Name { get; set; }
    }

 

After going through your code I noticed that "AllMapsById" point to the above code. therefore i should have access to them via "intelisense" (yes?)

well I dont have access to those properties. so i cannot get the map name for "1080" (my code:

"Details.AllMapsById[1080]"


EDIT:
After doing a step through debug, I noticed that yes, all values (except "AllCommendationById") are Null.