Beispiel #1
0
        public async Task <EncounterResponse> EncounterPokemon(ulong encounterId, string spawnPointGuid)
        {
            var customRequest = new Request.Types.EncounterRequest()
            {
                EncounterId      = encounterId,
                SpawnpointId     = spawnPointGuid,
                PlayerLatDegrees = Utils.FloatAsUlong(_currentLat),
                PlayerLngDegrees = Utils.FloatAsUlong(_currentLng)
            };

            var encounterResponse = RequestBuilder.GetRequest(_unknownAuth, _currentLat, _currentLng, 30,
                                                              new Request.Types.Requests()
            {
                Type    = (int)RequestType.ENCOUNTER,
                Message = customRequest.ToByteString()
            });

            return(await _httpClient.PostProto <Request, EncounterResponse>($"https://{_apiUrl}/rpc", encounterResponse));
        }
Beispiel #2
0
        public async Task <EncounterResponse> EncounterPokemon(HttpClient client, string _apiUrl, ulong encounterId, string spawnPointGuid, Request.Types.UnknownAuth _unknownAuth, double _currentLat, double _currentLng)
        {
            var customRequest = new Request.Types.EncounterRequest
            {
                EncounterId      = encounterId,
                SpawnpointId     = spawnPointGuid,
                PlayerLatDegrees = Helpers.Extensions.FloatAsUlong(_currentLat),
                PlayerLngDegrees = Helpers.Extensions.FloatAsUlong(_currentLng)
            };

            var encounterResponse = RequestBuilder.GetRequest(_unknownAuth, _currentLat, _currentLng, 30,
                                                              new Request.Types.Requests
            {
                Type    = (int)RequestType.ENCOUNTER,
                Message = customRequest.ToByteString()
            });

            return
                (await
                 client.PostProtoPayload <Request, EncounterResponse>($"https://{_apiUrl}/rpc", encounterResponse));
        }
Beispiel #3
0
        public async Task<EncounterResponse> EncounterPokemon(ulong encounterId, string spawnPointGuid)
        {
            var customRequest = new Request.Types.EncounterRequest
            {
                EncounterId = encounterId,
                SpawnpointId = spawnPointGuid,
                PlayerLatDegrees = Utils.FloatAsUlong(CurrentLat),
                PlayerLngDegrees = Utils.FloatAsUlong(CurrentLng)
            };

            var encounterResponse = RequestBuilder.GetRequest(_unknownAuth, CurrentLat, CurrentLng, CurrentAltitude,
                new Request.Types.Requests
                {
                    Type = (int)RequestType.ENCOUNTER,
                    Message = customRequest.ToByteString()
                });
            return await _httpClient.PostProtoPayload<Request, EncounterResponse>($"https://{_apiUrl}/rpc", encounterResponse);
        }