我想对电报API进行改造。但是它给出了
“由以下原因引起:java.lang.IllegalArgumentException:格式错误的URL。基址:https://api.telegram.org/,相对:botXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXX / getUpdates”错误
public interface telegramService {
@GET ("{botKey}/getUpdates")
Call<telegramModel> getValue (@Path("botKey") String botKey);
}
Retrofit.Builder builder = new Retrofit.Builder()
.baseUrl("https://api.telegram.org/")
.addConverterFactory(GsonConverterFactory.create());
OkHttpClient client = new OkHttpClient.Builder()
.build();
Retrofit retrofit = builder.client(client).build();
telegramService mTelegram =retrofit.create(telegramService.class);
Call<telegramModel> mTelegramModel= mTelegram.getValue("botXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXX");