【发布时间】:2017-02-25 00:44:44
【问题描述】:
我正在开发 Youtube API。
基本网址是<https://www.googleapis.com/youtube/v3/search/>
请求:获取
https://www.googleapis.com/youtube/v3/search?part=snippet&q={search_keyword}&key={API_KEY}
ApiService接口代码-
public interface ApiService {
@GET("")
Call<YoutubeResponse> searchVideos(@Query("part") String part,
@Query("q") String q,@Query("key") String apiKey);
}
错误:java.lang.IllegalArgumentException:缺少@GET URL 或@Url 参数。 在代码行中
Call<YoutubeResponse> call=service.searchVideos("snippet",s, URLConstants.Youtube_API_KEY);
我是初学者。请帮忙!
【问题讨论】:
标签: android retrofit retrofit2