本文整理汇总了Java中retrofit.http.GET类的典型用法代码示例。如果您正苦于以下问题:Java GET类的具体用法?Java GET怎么用?Java GET使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GET类属于retrofit.http包,在下文中一共展示了GET类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: popular
import retrofit.http.GET; //导入依赖的package包/类
/**
* Returns the most popular movies. Popularity is calculated using the rating percentage and the number of ratings.
*
* @param page Number of page of results to be returned. If {@code null} defaults to 1.
* @param limit Number of results to return per page. If {@code null} defaults to 10.
*/
@GET("/movies/popular")
List<Movie> popular(
@Query("page") Integer page,
@Query("limit") Integer limit,
@EncodedQuery("extended") Extended extended
);
示例2: idLookup
import retrofit.http.GET; //导入依赖的package包/类
/**
* ID lookups are helpful if you have an external ID and want to get the trakt ID and info. This method will search
* for movies, shows, episodes, people, users, and lists.
*
* @param idType Set to any of {@link com.uwetrottmann.trakt.v2.enums.IdType}.
* @param id ID that matches with the type.
*/
@GET("/search")
List<SearchResult> idLookup(
@EncodedQuery("id_type") IdType idType,
@EncodedQuery("id") String id,
@Query("page") Integer page,
@Query("limit") Integer limit
);
示例3: getMessages
import retrofit.http.GET; //导入依赖的package包/类
@GET("/v1.0/me/mailfolders/{folderid}/messages")
Response getMessages(
@Path("folderid") String folderId,
@Query("$orderby") String orderBy,
@Query("$select") String select,
@Query("$filter") String filter,
@Query("$top") Integer maxResults
);
示例4: textQuery
import retrofit.http.GET; //导入依赖的package包/类
/**
* Queries will search fields like the title and description.
*
* @param query Searches titles and descriptions.
* @param type (optional) Narrow down search by element type.
*/
@GET("/search")
List<SearchResult> textQuery(
@Query("query") String query,
@Query("type") Type type,
@Query("page") Integer page,
@Query("limit") Integer limit
);
示例5: trending
import retrofit.http.GET; //导入依赖的package包/类
/**
* Returns all movies being watched right now. Movies with the most users are returned first.
*
* @param page Number of page of results to be returned. If {@code null} defaults to 1.
* @param limit Number of results to return per page. If {@code null} defaults to 10.
*/
@GET("/movies/trending")
List<TrendingMovie> trending(
@Query("page") Integer page,
@Query("limit") Integer limit,
@EncodedQuery("extended") Extended extended
);
示例6: trending
import retrofit.http.GET; //导入依赖的package包/类
/**
* Returns all shows being watched right now. Shows with the most users are returned first.
*
* @param page Number of page of results to be returned. If {@code null} defaults to 1.
* @param limit Number of results to return per page. If {@code null} defaults to 10.
*/
@GET("/shows/trending")
List<TrendingShow> trending(
@Query("page") Integer page,
@Query("limit") Integer limit,
@EncodedQuery("extended") Extended extended
);
示例7: comments
import retrofit.http.GET; //导入依赖的package包/类
/**
* Returns all top level comments for an episode. Most recent comments returned first.
*
* @param showId trakt ID, trakt slug, or IMDB ID. Example: "game-of-thrones".
* @param season Season number.
* @param episode Episode number.
*/
@GET("/shows/{id}/seasons/{season}/episodes/{episode}/comments")
List<Comment> comments(
@Path("id") String showId,
@Path("season") int season,
@Path("episode") int episode,
@Query("page") Integer page,
@Query("limit") Integer limit,
@EncodedQuery("extended") Extended extended
);
示例8: popular
import retrofit.http.GET; //导入依赖的package包/类
/**
* Returns the most popular shows. Popularity is calculated using the rating percentage and the number of ratings.
*
* @param page Number of page of results to be returned. If {@code null} defaults to 1.
* @param limit Number of results to return per page. If {@code null} defaults to 10.
*/
@GET("/shows/popular")
List<Show> popular(
@Query("page") Integer page,
@Query("limit") Integer limit,
@EncodedQuery("extended") Extended extended
);
示例9: getItems
import retrofit.http.GET; //导入依赖的package包/类
@GET("/jokes/random/10")
Observable<Response> getItems(@Query("firstName") String firstName, @Query("lastName") String lastName);
示例10: getItem
import retrofit.http.GET; //导入依赖的package包/类
@GET("/jokes/{id}")
Observable<ItemResponse> getItem(@Query("firstName") String firstName, @Query("lastName") String lastName, @Path("id") int id);
示例11: searchFiles
import retrofit.http.GET; //导入依赖的package包/类
@GET(Constants.GOOGLE_API_BASE_URL + "/drive/v3/files")
Call<DriveSearchResult> searchFiles(@Header("Authorization") String authorization, @Query("q") String searchQuery);
示例12: searchCasesById
import retrofit.http.GET; //导入依赖的package包/类
@GET(CASES_URI + "/search")
Call<ApiResponse<Case>> searchCasesById(@Query("since_id") int since_id, @Query("per_page") int perPage,
@Query("page") int page, @Query("sort_field") String sortField,
@Query("sort_direction") SortDirection sortDirection, @Query("embed") Embed embed,
@Query("fields") Fields fields);
示例13: summary
import retrofit.http.GET; //导入依赖的package包/类
/**
* Returns a single person's details.
*
* @param personId trakt ID, trakt slug, or IMDB ID Example: bryan-cranston.
*/
@GET("/people/{id}")
Person summary(
@Path("id") String personId,
@Query("extended") Extended extended
);
示例14: getAlbumInfo
import retrofit.http.GET; //导入依赖的package包/类
@Headers("Cache-Control: public")
@GET(BASE_PARAMETERS_ALBUM)
void getAlbumInfo(@Query("artist") String artist, @Query("album") String album, Callback<AlbumInfo> callback);
示例15: getArtistInfo
import retrofit.http.GET; //导入依赖的package包/类
@Headers("Cache-Control: public")
@GET(BASE_PARAMETERS_ARTIST)
void getArtistInfo(@Query("artist") String artist, Callback<ArtistInfo> callback);