예제 #1
0
 public CharacterInfoEsiProvider()
 {
     _characterApi   = new CharacterApi();
     _corporationApi = new CorporationApi();
     _locationApi    = new LocationApi();
     _universeApi    = new UniverseApi();
 }
예제 #2
0
 public CharacterSheetEsiProvider()
 {
     _characterApi   = new CharacterApi();
     _corporationApi = new CorporationApi();
     _locationApi    = new LocationApi();
     _universeApi    = new UniverseApi();
     _walletApi      = new WalletApi();
     _skillsApi      = new SkillsApi();
     _clonesApi      = new ClonesApi();
     _allianceApi    = new AllianceApi();
 }
예제 #3
0
 public CharacterService(EveVoidContext context,
                         ICorporationService corporationService,
                         ILocationApi locationApi,
                         ICharacterApi characterApi,
                         ITokenService tokenService,
                         ISolarSystemService solarSystemService,
                         IItemTypeService itemTypeService,
                         ISignatureService signatureService,
                         IStargateService stargateService,
                         IRouteService routeService,
                         IPilotService pilotService)
 {
     _context            = context;
     _corporationService = corporationService;
     _locationApi        = locationApi;
     _characterApi       = characterApi;
     _tokenService       = tokenService;
     _solarSystemService = solarSystemService;
     _itemTypeService    = itemTypeService;
     _signatureService   = signatureService;
     _stargateService    = stargateService;
     _routeService       = routeService;
     _pilotService       = pilotService;
 }
예제 #4
0
        public static async Task <IEnumerable <Location> > GetNearbyLocations(ILocationApi api, WayPoint userLocation)
        {
            List <Location> locationResults = new List <Location>();

            locationResults = (await api.GetItems(userLocation)).ToList();

            foreach (Location l in locationResults)
            {
                WayPoint destinationLocation = new WayPoint
                {
                    Latitude  = l.Point.Coordinates[0],
                    Longitude = l.Point.Coordinates[1]
                };

                string mapUri = await api.GetMapImageUrl(userLocation, destinationLocation);

                string routeDistance = await api.GetRouteDistance(userLocation, destinationLocation);

                l.MapUri   = mapUri;
                l.Distance = routeDistance;
            }

            return(locationResults);
        }
예제 #5
0
 public LocationService()
 {
     Location = RestClient.For <ILocationApi>(MapApi);
 }
예제 #6
0
 public ApiKeyInfoEsiProvider()
 {
     _characterApi = new CharacterApi();
     _locationApi  = new LocationApi();
 }