Beispiel #1
0
        public async Task <RecycleInventoryItemResponse> RecycleItem(AllEnum.ItemId itemId, int amount)
        {
            var customRequest = new RecycleInventoryItem
            {
                ItemId = (AllEnum.ItemId)Enum.Parse(typeof(AllEnum.ItemId), itemId.ToString()),
                Count  = amount
            };

            var releasePokemonRequest = RequestBuilder.GetRequest(_unknownAuth, CurrentLat, CurrentLng, CurrentAltitude,
                                                                  new Request.Types.Requests()
            {
                Type    = (int)RequestType.RECYCLE_INVENTORY_ITEM,
                Message = customRequest.ToByteString()
            });

            return(await _httpClient.PostProtoPayload <Request, RecycleInventoryItemResponse>($"https://{_apiUrl}/rpc", releasePokemonRequest));
        }
Beispiel #2
0
        public async Task <UseItemCaptureRequest> UseCaptureItem(ulong encounterId, AllEnum.ItemId itemId, string spawnPointGuid)
        {
            var customRequest = new UseItemCaptureRequest
            {
                EncounterId    = encounterId,
                ItemId         = itemId,
                SpawnPointGuid = spawnPointGuid
            };

            var useItemRequest = RequestBuilder.GetRequest(_unknownAuth, CurrentLat, CurrentLng, CurrentAltitude,
                                                           new Request.Types.Requests()
            {
                Type    = (int)RequestType.USE_ITEM_CAPTURE,
                Message = customRequest.ToByteString()
            });

            return(await _httpClient.PostProtoPayload <Request, UseItemCaptureRequest>($"https://{_apiUrl}/rpc", useItemRequest));
        }