當前位置: 首頁>>代碼示例>>Java>>正文


Java GET類代碼示例

本文整理匯總了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
);
 
開發者ID:archos-sa,項目名稱:aos-MediaLib,代碼行數:13,代碼來源:Movies.java

示例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
);
 
開發者ID:archos-sa,項目名稱:aos-MediaLib,代碼行數:15,代碼來源:Search.java

示例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
);
 
開發者ID:OwaNotifier,項目名稱:owa-notifier,代碼行數:9,代碼來源:OutlookService.java

示例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
);
 
開發者ID:archos-sa,項目名稱:aos-MediaLib,代碼行數:14,代碼來源:Search.java

示例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
);
 
開發者ID:archos-sa,項目名稱:aos-MediaLib,代碼行數:13,代碼來源:Movies.java

示例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
);
 
開發者ID:archos-sa,項目名稱:aos-MediaLib,代碼行數:13,代碼來源:Shows.java

示例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
);
 
開發者ID:archos-sa,項目名稱:aos-MediaLib,代碼行數:17,代碼來源:Episodes.java

示例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
);
 
開發者ID:archos-sa,項目名稱:aos-MediaLib,代碼行數:13,代碼來源:Shows.java

示例9: getItems

import retrofit.http.GET; //導入依賴的package包/類
@GET("/jokes/random/10")
Observable<Response> getItems(@Query("firstName") String firstName, @Query("lastName") String lastName);
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:3,代碼來源:ServerAPI.java

示例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);
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:3,代碼來源:ServerAPI.java

示例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);
 
開發者ID:WorldBank-Transport,項目名稱:RoadLab-Pro,代碼行數:3,代碼來源:ApiService.java

示例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);
 
開發者ID:forcedotcom,項目名稱:scmt-server,代碼行數:6,代碼來源:CaseService.java

示例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
);
 
開發者ID:archos-sa,項目名稱:aos-MediaLib,代碼行數:11,代碼來源:People.java

示例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);
 
開發者ID:Vinetos,項目名稱:Hello-Music-droid,代碼行數:4,代碼來源:LastFmRestService.java

示例15: getArtistInfo

import retrofit.http.GET; //導入依賴的package包/類
@Headers("Cache-Control: public")
@GET(BASE_PARAMETERS_ARTIST)
void getArtistInfo(@Query("artist") String artist, Callback<ArtistInfo> callback);
 
開發者ID:Vinetos,項目名稱:Hello-Music-droid,代碼行數:4,代碼來源:LastFmRestService.java


注:本文中的retrofit.http.GET類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。