コード例 #1
0
ファイル: Client.cs プロジェクト: LibezFeed/GO-Bot
        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));
        }
コード例 #2
0
ファイル: Client.cs プロジェクト: C-Sto/Pokemon-Go-Rocket-API
        public async Task<RecycleInventoryItemResponse> RecycleItem(ItemId itemId, int amount)
        {
            var customRequest = new RecycleInventoryItem
            {
                ItemId = (ItemId)Enum.Parse(typeof(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);
        }