Beispiel #1
0
        public CCPAPIResult <SerializableAPIStandings> Invoke(Dictionary <string, string> legacyPostData, string dataSource, string accessToken)
        {
            var characterId = int.Parse(legacyPostData["characterID"]);

            var result = new CCPAPIResult <SerializableAPIStandings>
            {
                Result = new SerializableAPIStandings
                {
                    CharacterNPCStandings = new SerializableStandings()
                }
            };

            var standings = _characterApi.GetCharactersCharacterIdStandings(characterId, dataSource, accessToken);

            result.Result.CharacterNPCStandings.AgentStandings          = GetAgentStandings(standings, dataSource);
            result.Result.CharacterNPCStandings.NPCCorporationStandings = GetNpcCorpStandings(standings, dataSource);
            result.Result.CharacterNPCStandings.FactionStandings        = GetFactionStandings(standings, dataSource);

            return(result);
        }