Exemplo n.º 1
0
        public async Task <Response.Types.Unknown6> RecycleItem(AllEnum.ItemId itemId, int amount)
        {
            var customRequest = new InventoryItemData.RecycleInventoryItem
            {
                ItemId = (AllEnum.ItemId)Enum.Parse(typeof(AllEnum.ItemId), itemId.ToString()),
                Count  = amount
            };

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

            return(await _httpClient.PostProtoPayload <Request, Response.Types.Unknown6>($"https://{_apiUrl}/rpc", releasePokemonRequest));
        }
Exemplo n.º 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, 30,
                                                           new Request.Types.Requests()
            {
                Type    = (int)RequestType.USE_ITEM_CAPTURE,
                Message = customRequest.ToByteString()
            });

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