Java Code Examples for retrofit.http.Query

The following are top voted examples for showing how to use retrofit.http.Query. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: owa-notifier   File: OutlookService.java   View source code 7 votes vote down vote up
@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
);
 
Example 2
Project: aos-MediaLib   File: Search.java   View source code 7 votes vote down vote up
/**
 * 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
);
 
Example 3
Project: aos-MediaLib   File: Search.java   View source code 7 votes vote down vote up
/**
 * 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
);
 
Example 4
Project: aos-MediaLib   File: Shows.java   View source code 7 votes vote down vote up
/**
 * 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
);
 
Example 5
Project: aos-MediaLib   File: Shows.java   View source code 7 votes vote down vote up
/**
 * 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
);
 
Example 6
Project: aos-MediaLib   File: Episodes.java   View source code 7 votes vote down vote up
/**
 * 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
);
 
Example 7
Project: aos-MediaLib   File: Movies.java   View source code 7 votes vote down vote up
/**
 * 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
);
 
Example 8
Project: aos-MediaLib   File: Movies.java   View source code 7 votes vote down vote up
/**
 * 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
);
 
Example 9
Project: GitHub   File: ServerAPI.java   View source code 6 votes vote down vote up
@GET("/jokes/random/10")
Observable<Response> getItems(@Query("firstName") String firstName, @Query("lastName") String lastName);
 
Example 10
Project: GitHub   File: ServerAPI.java   View source code 6 votes vote down vote up
@GET("/jokes/{id}")
Observable<ItemResponse> getItem(@Query("firstName") String firstName, @Query("lastName") String lastName, @Path("id") int id);
 
Example 11
Project: GitHub   File: ServerAPI.java   View source code 6 votes vote down vote up
@GET("/jokes/random/10")
Observable<Response> getItems(@Query("firstName") String firstName, @Query("lastName") String lastName);
 
Example 12
Project: GitHub   File: ServerAPI.java   View source code 6 votes vote down vote up
@GET("/jokes/random/10")
Observable<Response> getItems(@Query("firstName") String firstName, @Query("lastName") String lastName);
 
Example 13
Project: scmt-server   File: CaseService.java   View source code 6 votes vote down vote up
@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);
 
Example 14
Project: Hello-Music-droid   File: LastFmRestService.java   View source code 6 votes vote down vote up
@Headers("Cache-Control: public")
@GET(BASE_PARAMETERS_ALBUM)
void getAlbumInfo(@Query("artist") String artist, @Query("album") String album, Callback<AlbumInfo> callback);
 
Example 15
Project: Hello-Music-droid   File: LastFmRestService.java   View source code 6 votes vote down vote up
@Headers("Cache-Control: public")
@GET(BASE_PARAMETERS_ARTIST)
void getArtistInfo(@Query("artist") String artist, Callback<ArtistInfo> callback);
 
Example 16
Project: androidadvanced   File: TimelineService.java   View source code 6 votes vote down vote up
@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);
 
Example 17
Project: Android_watch_magpie   File: SubscriberSvcApi.java   View source code 6 votes vote down vote up
@GET(SUB_ALERTS_SVC)
Collection<GlucoseAlert> getAlertsByUser(
		@Path(SUBSCRIBER_ID) long subId,
		@Query(PUBLISHER_ID) long pubId,
		HttpServletResponse response);
 
Example 18
Project: MangoBloggerAndroidApp   File: AuthApi.java   View source code 6 votes vote down vote up
@GET("/ledzee1729/user/register/")
void registerUser(@Query("username") String username,
                         @Query("email") String email,
                         @Query("nonce") String nonce,
                         @Query("display_name") String display_name,
                         @Query("notify") String notify,
                         @Query("user_pass") String password,
                         Callback<RegisterResponse> callback);
 
Example 19
Project: aos-MediaLib   File: People.java   View source code 6 votes vote down vote up
/**
 * 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
);
 
Example 20
Project: aos-MediaLib   File: Shows.java   View source code 6 votes vote down vote up
/**
 * Returns all top level comments for a show. Most recent comments returned first.
 *
 * @param showId trakt ID, trakt slug, or IMDB ID. Example: "game-of-thrones".
 * @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/{id}/comments")
List<Comment> comments(
        @Path("id") String showId,
        @Query("page") Integer page,
        @Query("limit") Integer limit,
        @EncodedQuery("extended") Extended extended
);
 
Example 21
Project: aos-MediaLib   File: Movies.java   View source code 6 votes vote down vote up
/**
 * Returns all top level comments for a movie. Most recent comments returned first.
 *
 * @param movieId trakt ID, trakt slug, or IMDB ID. Example: "tron-legacy-2010".
 * @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/{id}/comments")
List<Comment> comments(
        @Path("id") String movieId,
        @Query("page") Integer page,
        @Query("limit") Integer limit,
        @EncodedQuery("extended") Extended extended
);
 
Example 22
Project: RoadLab-Pro   File: ApiService.java   View source code 6 votes vote down vote up
@GET(Constants.GOOGLE_API_BASE_URL + "/drive/v3/files")
Call<DriveSearchResult> searchFiles(@Header("Authorization") String authorization, @Query("q") String searchQuery);
 
Example 23
Project: FlowGeek   File: ServerAPI.java   View source code 6 votes vote down vote up
@GET("/action/api/comment_list")
Observable<RespCmmList> getCmmList(
        @Query("catalog") int catalog,
        @Query("id") long id,
        @Query("pageIndex") int pageIndex,
        @Query("pageSize") int pageSize
);
 
Example 24
Project: smoothnovelreader   File: EasouNovelService.java   View source code 6 votes vote down vote up
@GET("/chapter.m")
ChapterContentItem getChapterContentSync(
        @Query("appversion") String appversion,
        @Query("ch") String ch,
        @Query("cid") String cid,
        @Query("os") String os,
        @Query("version") String version,
        @Query("gid") long gid,
        @Query("nid") long nid,
        @Query("sort") int sort,
        @Query("chapter_name") String chapterName
);
 
Example 25
Project: talk-android   File: TalkApi.java   View source code 6 votes vote down vote up
@GET("/messages/tags")
Observable<List<Message>> readTagWithMessage(
        @Query("_teamId") String teamId,
        @Query("_tagId") String tagId,
        @Query("isDirectMessage") boolean isDirectMessage,
        @Query("limit") int limit
);
 
Example 26
Project: talk-android   File: TalkApi.java   View source code 6 votes vote down vote up
@GET("/messages/tags")
Observable<List<Message>> readMoreTagWithMessage(
        @Query("_teamId") String teamId,
        @Query("_tagId") String tagId,
        @Query("_maxId") String maxId,
        @Query("isDirectMessage") boolean isDirectMessage,
        @Query("limit") int limit
);
 
Example 27
Project: talk-android   File: AccountApi.java   View source code 6 votes vote down vote up
@POST("/mobile/signup")
Observable<User> mobileSignUp(
        @Query("phoneNumber") String phoneNumber,
        @Query("password") String password,
        @Query("randomCode") String randomCode,
        @Query("verifyCode") String verifyCode
);
 
Example 28
Project: GitHub   File: ServerAPI.java   View source code 5 votes vote down vote up
@GET("/jokes/random/10")
Observable<Response> getItems(@Query("firstName") String firstName, @Query("lastName") String lastName);
 
Example 29
Project: GitHub   File: ServerAPI.java   View source code 5 votes vote down vote up
@GET("/jokes/random/10")
Observable<Response> getItems(@Query("firstName") String firstName, @Query("lastName") String lastName);
 
Example 30
Project: GitHub   File: ServerAPI.java   View source code 5 votes vote down vote up
@GET("/jokes/random/10")
Observable<Response> getItems(@Query("firstName") String firstName, @Query("lastName") String lastName, @Header("pageNumber") int pageNumberIgnored);
 
Example 31
Project: GitHub   File: ServerAPI.java   View source code 5 votes vote down vote up
@GET("/jokes/random/10")
Observable<Response> getItems(@Query("firstName") String firstName, @Query("lastName") String lastName);
 
Example 32
Project: GitHub   File: ServerAPI.java   View source code 5 votes vote down vote up
@GET("/jokes/{id}")
Observable<ItemResponse> getItem(@Query("firstName") String firstName, @Query("lastName") String lastName, @Path("id") int id);
 
Example 33
Project: scmt-server   File: CustomerService.java   View source code 5 votes vote down vote up
@GET(CUSTOMERS_URI + "/search")
Call<ApiResponse<Customer>> searchCustomersByUpdatedAt(@Query("since_updated_at") Integer since_updated_at,
    @Query("per_page") int perPage, @Query("page") int page, @Query("sort_field") String sortField, 
    @Query("sort_direction") SortDirection sortDirection, @Query("fields") Fields fields);
 
Example 34
Project: scmt-server   File: CompanyService.java   View source code 5 votes vote down vote up
@GET(COMPANY_URI+"?fields=id,name,domains,external_id,custom_fields")    
Call<ApiResponse<Company>> getCompanies(@Query("per_page") int perPage,
        @Query("page") int page);
 
Example 35
Project: MADBike   File: Apis.java   View source code 5 votes vote down vote up
@GET("/weather")
void getWeatherData(@Query("id") long id, @Query("lang") String locale, @Query("units") String units, @Query("APPID") String appID, Callback<WeatherResponse> response);
 
Example 36
Project: Android_watch_magpie   File: SubscriberSvcApi.java   View source code 5 votes vote down vote up
@GET(SUB_ALERTS_SVC)
Collection<GlucoseAlert> getAlertsByUser(
        @Path(SUBSCRIBER_ID) long subId, @Query(PUBLISHER_ID) long pubId);
 
Example 37
Project: MangoBloggerAndroidApp   File: AuthApi.java   View source code 5 votes vote down vote up
@GET("/ledzee1729/get_nonce/")
void getNonceId(@Query("controller") String controller,
                       @Query("method") String method,
                       Callback<NonceIdResponse> callback);
 
Example 38
Project: MangoBloggerAndroidApp   File: AuthApi.java   View source code 5 votes vote down vote up
@GET("/ledzee1729/user/generate_auth_cookie/")
void loginUser(@Query("username") String username,
                      @Query("password") String password,
                      Callback<LoginResponse> callback);
 
Example 39
Project: MangoBloggerAndroidApp   File: AuthApi.java   View source code 5 votes vote down vote up
@GET("/ledzee1729/user/retrieve_password/")
void resetPassword(@Query("user_login") String username,
                          Callback<ResetPasswordResponse> callback);
 
Example 40
Project: GitHub   File: ServerAPI.java   View source code 4 votes vote down vote up
@GET("/jokes/random/10")
Observable<Response> getItems(@Query("firstName") String firstName, @Query("lastName") String lastName, @Header("pageNumber") int pageNumberIgnored);