public async Task <UseItemRequest> UseItem(ItemId itemId) { var customRequest = new UseItemRequest { ItemId = itemId, }; PokemonGo.RocketAPI.Enums.RequestType type = RequestType.METHOD_UNSET; switch (itemId) { case ItemId.ItemLuckyEgg: type = RequestType.USE_ITEM_XP_BOOST; break; case ItemId.ItemIncenseOrdinary: type = RequestType.USE_INCENSE; break; } var useItemRequest = RequestBuilder.GetRequest(_unknownAuth, _currentLat, _currentLng, 30, new Request.Types.Requests { Type = (int)type, Message = customRequest.ToByteString() }); return (await _httpClient.PostProtoPayload <Request, UseItemRequest>($"https://{_apiUrl}/rpc", useItemRequest)); }
public async Task <UseItemRequest> UseItemXpBoost(ItemId itemId) { var customRequest = new UseItemRequest { ItemId = itemId, }; var useItemRequest = RequestBuilder.GetRequest(_unknownAuth, _currentLat, _currentLng, 30, new Request.Types.Requests { Type = (int)RequestType.USE_ITEM_XP_BOOST, Message = customRequest.ToByteString() }); return (await _httpClient.PostProtoPayload <Request, UseItemRequest>($"https://{_apiUrl}/rpc", useItemRequest)); }
public async Task <UseItemRequest> UseItemIncense(ItemId itemId) //changed from UseItem to UseItemXpBoost because of the RequestType { var customRequest = new UseItemRequest { ItemId = itemId, }; var useItemRequest = RequestBuilder.GetRequest(_unknownAuth, CurrentLat, CurrentLng, CurrentAltitude, new Request.Types.Requests { Type = (int)RequestType.USE_INCENSE, Message = customRequest.ToByteString() }); return (await _httpClient.PostProtoPayload <Request, UseItemRequest>($"https://{_apiUrl}/rpc", useItemRequest)); }
public async Task<UseItemRequest> UseXpBoostItem(ItemId itemId) { var customRequest = new UseItemRequest { ItemId = itemId, }; var useItemRequest = RequestBuilder.GetRequest(_unknownAuth, CurrentLat, CurrentLng, CurrentAltitude, new Request.Types.Requests { Type = (int)RequestType.USE_ITEM_XP_BOOST, Message = customRequest.ToByteString() }); return await _httpClient.PostProtoPayload<Request, UseItemRequest>($"https://{_apiUrl}/rpc", useItemRequest); }
public async Task<UseItemRequest> UseItemIncense(ItemId itemId) //changed from UseItem to UseItemXpBoost because of the RequestType { var customRequest = new UseItemRequest { ItemId = itemId, }; var useItemRequest = RequestBuilder.GetRequest(_unknownAuth, CurrentLat, CurrentLng, CurrentAltitude, new Request.Types.Requests { Type = (int)RequestType.USE_INCENSE, Message = customRequest.ToByteString() }); return await _httpClient.PostProtoPayload<Request, UseItemRequest>($"https://{_apiUrl}/rpc", useItemRequest); }