本文整理汇总了Java中retrofit.http.Query类的典型用法代码示例。如果您正苦于以下问题:Java Query类的具体用法?Java Query怎么用?Java Query使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Query类属于retrofit.http包,在下文中一共展示了Query类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMessages
import retrofit.http.Query; //导入依赖的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
);
示例2: textQuery
import retrofit.http.Query; //导入依赖的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
);
示例3: idLookup
import retrofit.http.Query; //导入依赖的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
);
示例4: popular
import retrofit.http.Query; //导入依赖的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
);
示例5: trending
import retrofit.http.Query; //导入依赖的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
);
示例6: comments
import retrofit.http.Query; //导入依赖的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
);
示例7: popular
import retrofit.http.Query; //导入依赖的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
);
示例8: trending
import retrofit.http.Query; //导入依赖的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
);
示例9: getItems
import retrofit.http.Query; //导入依赖的package包/类
@GET("/jokes/random/10")
Observable<Response> getItems(@Query("firstName") String firstName, @Query("lastName") String lastName);
示例10: getItem
import retrofit.http.Query; //导入依赖的package包/类
@GET("/jokes/{id}")
Observable<ItemResponse> getItem(@Query("firstName") String firstName, @Query("lastName") String lastName, @Path("id") int id);
示例11: searchCasesById
import retrofit.http.Query; //导入依赖的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);
示例12: getAlbumInfo
import retrofit.http.Query; //导入依赖的package包/类
@Headers("Cache-Control: public")
@GET(BASE_PARAMETERS_ALBUM)
void getAlbumInfo(@Query("artist") String artist, @Query("album") String album, Callback<AlbumInfo> callback);
示例13: getArtistInfo
import retrofit.http.Query; //导入依赖的package包/类
@Headers("Cache-Control: public")
@GET(BASE_PARAMETERS_ARTIST)
void getArtistInfo(@Query("artist") String artist, Callback<ArtistInfo> callback);
示例14: homeTimeline
import retrofit.http.Query; //导入依赖的package包/类
@GET("/1.1/statuses/home_timeline.json")
void homeTimeline(@Query("count") Integer count,
@Query("trim_user") Boolean trim_user,
@Query("exclude_replies") Boolean exclude_replies,
@Query("contributor_details") Boolean contributor_details,
@Query("include_entities") Boolean include_entities,
Callback<List<Tweet>> callback);
示例15: getAlertsByUser
import retrofit.http.Query; //导入依赖的package包/类
@GET(SUB_ALERTS_SVC)
Collection<GlucoseAlert> getAlertsByUser(
@Path(SUBSCRIBER_ID) long subId,
@Query(PUBLISHER_ID) long pubId,
HttpServletResponse response);