Java Code Examples for retrofit2.http.Field

The following are top voted examples for showing how to use retrofit2.http.Field. 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: Phoenix-for-VK   File: IWallService.java   Source Code and License 6 votes vote down vote up
@FormUrlEncoded
@POST("wall.post")
Single<BaseResponse<PostCreateResponse>> post(@Field("owner_id") Integer ownerId,
                                              @Field("friends_only") Integer friendsOnly,
                                              @Field("from_group") Integer fromGroup,
                                              @Field("message") String message,
                                              @Field("attachments") String attachments,
                                              @Field("services") String services,
                                              @Field("signed") Integer signed,
                                              @Field("publish_date") Long publishDate,
                                              @Field("lat") Double latitude,
                                              @Field("long") Double longitude,
                                              @Field("place_id") Integer placeId,
                                              @Field("post_id") Integer postId,
                                              @Field("guid") Integer guid,
                                              @Field("mark_as_ads") Integer markAsAds,
                                              @Field("ads_promoted_stealth") Integer adsPromotedStealth);
 
Example 2
Project: CheckIn   File: API.java   Source Code and License 6 votes vote down vote up
@FormUrlEncoded
@POST("xxx")
Flowable<CheckInResponse> checkIn(
        @Field("user_id") String user_id,
        @Field("token") String token,
        @Field("company_id") String company_id,
        @Field("type") String type,
        @Field("location") String location,
        @Field("longitude") double longitude,
        @Field("latitude") double latitude,
        @Field("wifi_name") String wifi_name,
        @Field("wifi_mac") String wifi_mac,
        @Field("file_id") String file_id,
        @Field("remark") String remark,
        @Field("is_force") int is_force,
        @Field("device_name") String device_name,
        @Field("device_no") String device_no,
        @Field("date") String date
);
 
Example 3
Project: csdn-retrofit   File: GankApi.java   Source Code and License 5 votes vote down vote up
@FormUrlEncoded
@POST("api/add2gank")
Observable<Object> postDataByRx(@Field("url") String url,
                                @Field("desc") String desc,
                                @Field("who") String who,
                                @Field("type") String type,
                                @Field("debug") String debug);
 
Example 4
Project: Renrentou   File: SystemService.java   Source Code and License 5 votes vote down vote up
@POST("sys/comments/new")
@FormUrlEncoded
Flowable<ResponseDto> comment(
        @Field("account") String account,
        @Field("content") String content,
        @Field("token") String token
);
 
Example 5
Project: GitHub   File: RequestBuilderTest.java   Source Code and License 5 votes vote down vote up
@Test public void formEncodedFieldList() {
  class Example {
    @FormUrlEncoded //
    @POST("/foo") //
    Call<ResponseBody> method(@Field("foo") List<Object> fields, @Field("kit") String kit) {
      return null;
    }
  }

  List<Object> values = Arrays.<Object>asList("foo", "bar", null, 3);
  Request request = buildRequest(Example.class, values, "kat");
  assertBody(request.body(), "foo=foo&foo=bar&foo=3&kit=kat");
}
 
Example 6
Project: NanoIconPack   File: NanoServerService.java   Source Code and License 5 votes vote down vote up
/**
 * { "status": 0, "msg": "success" }
 */
@FormUrlEncoded
@POST("reqfilter/{iconpack}/{user}")
Call<ResResBean> filterPkg(@Path("iconpack") String iconPack,
                           @Path("user") String user,
                           @Field("pkg") String pkgName,
                           @Field("launcher") String launcherActivity);
 
Example 7
Project: Daejeon-People   File: APIinterface.java   Source Code and License 5 votes vote down vote up
@FormUrlEncoded
@POST("/signup")
Call<Void> doSignUp(@Field("id") String id,
                    @Field("password") String password,
                    @Field("email") String email,
                    @Field("name") String name,
                    @Field("registration_id") String resistrationId);
 
Example 8
Project: Tribe   File: ApiService.java   Source Code and License 5 votes vote down vote up
/**
 * 获取帖子列表 可获取全部或者最热  zuire不为空,约定传入"zuire"
 * @return
 */
@FormUrlEncoded
@POST("api.php?m=tieba&a=getTieZi")
Observable<HttpResult<List<PostBean>>> getPostsList(@Field("userid") String userid,
                                                    @Field("pageNum") String pageNum,
                                                    @Field("tieba_id") String tieba_id,
                                                    @Field("zuire") String zuire,
                                                    @Field("pageSize") String pageSize);
 
Example 9
Project: Phoenix-for-VK   File: IAuthService.java   Source Code and License 5 votes vote down vote up
@FormUrlEncoded
@POST("token")
Single<LoginResponse> directLogin(@Field("grant_type") String grantType,
                                  @Field("client_id") int clientId,
                                  @Field("client_secret") String clientSecret,
                                  @Field("username") String username,
                                  @Field("password") String password,
                                  @Field("v") String v,
                                  @Field("2fa_supported") int twoFaSupported,
                                  @Field("scope") String scope,
                                  @Field("code") String smscode,
                                  @Field("captcha_sid") String captchaSid,
                                  @Field("captcha_key") String captchaKey,
                                  @Field("force_sms") Integer forceSms);
 
Example 10
Project: AndroidThings-BurglarAlarm   File: IgniteService.java   Source Code and License 5 votes vote down vote up
@Headers({
        "Authorization:Basic ZnJvbnRlbmQ6",
        "Content-Type:application/x-www-form-urlencoded"
})
@FormUrlEncoded
@POST("login/oauth")
Call<AccessToken> getAccessToken(@Field("username") String username, @Field("password") String password, @Field("grant_type") String grant_type);
 
Example 11
Project: Phoenix-for-VK   File: IFriendsService.java   Source Code and License 5 votes vote down vote up
@FormUrlEncoded
@POST("friends.search")
Single<BaseResponse<Items<VKApiUser>>> search(@Field("user_id") int userId,
                                              @Field("q") String query,
                                              @Field("fields") String fields,
                                              @Field("name_case") String nameCase,
                                              @Field("offset") Integer offset,
                                              @Field("count") Integer count);
 
Example 12
Project: Tribe   File: ApiService.java   Source Code and License 5 votes vote down vote up
@FormUrlEncoded
@POST("api.php/review/add")
Observable<HttpResult> addActivityOrInvitationComment(@Field("uid") String userId,
                                          @Field("by_uid") String otherId,
                                          @Field("type") String type,
                                          @Field("pid") String pid,
                                          @Field("fid") String fid,
                                          @Field("content") String content);
 
Example 13
Project: Paper-Melody   File: SocialSystemAPI.java   Source Code and License 5 votes vote down vote up
/**
 * 社交系统API,提供与服务器互相交互的接口
 */

// 登录
@FormUrlEncoded
@POST("login")
Observable<UserResponse> login(@Field("name") String username,
                               @Field("pw") String password);
 
Example 14
Project: csdn-retrofit   File: GankApi.java   Source Code and License 5 votes vote down vote up
@FormUrlEncoded
@POST("api/add2gank")
Completable postDataByRxNoReturn(@Field("url") String url,
                                 @Field("desc") String desc,
                                 @Field("who") String who,
                                 @Field("type") String type,
                                 @Field("debug") String debug);
 
Example 15
Project: TripBuyer   File: Api.java   Source Code and License 5 votes vote down vote up
@FormUrlEncoded
@POST("wanted") Observable<ResponseModel_no_list> wanted(@Field("productName") String productName
        , @Field("price") String price
        , @Field("num") String num
        , @Field("userAddress.addressId") String addressId
        , @Field("deliveryTime") int deliveryTime
        , @Field("pack") int pack
        , @Field("deliveryArea") String deliveryArea
        , @Field("requirements") String requirements
        , @Field("picture") String picture
        , @Field("total") Double total
        , @Field("createType") String createType
);
 
Example 16
Project: Phoenix-for-VK   File: IPhotosService.java   Source Code and License 5 votes vote down vote up
@FormUrlEncoded    @POST("photos.get")
Single<BaseResponse<Items<VKApiPhoto>>> get(@Field("owner_id") Integer ownerId,
                                            @Field("album_id") String albumId,
                                            @Field("photo_ids") String photoIds,
                                            @Field("rev") Integer rev,
                                            @Field("extended") Integer extended,
                                            @Field("photo_sizes") Integer photoSizes,
                                            @Field("offset") Integer offset,
                                            @Field("count") Integer count);
 
Example 17
Project: Phoenix-for-VK   File: IPhotosService.java   Source Code and License 5 votes vote down vote up
@FormUrlEncoded    @POST("photos.getAlbums")
Single<BaseResponse<Items<VKApiPhotoAlbum>>> getAlbums(@Field("owner_id") Integer ownerId,
                                                       @Field("album_ids") String albumIds,
                                                       @Field("offset") Integer offset,
                                                       @Field("count") Integer count,
                                                       @Field("need_system") Integer needSystem,
                                                       @Field("need_covers") Integer needCovers,
                                                       @Field("photo_sizes") Integer photoSizes);
 
Example 18
Project: Phoenix-for-VK   File: IGroupsService.java   Source Code and License 5 votes vote down vote up
@FormUrlEncoded
@POST("groups.getBanned")
Single<BaseResponse<Items<VKApiUser>>> getBanned(@Field("group_id") int groupId,
                                                 @Field("offset") Integer offset,
                                                 @Field("count") Integer count,
                                                 @Field("fields") String fields,
                                                 @Field("user_id") Integer userId);
 
Example 19
Project: Phoenix-for-VK   File: IAccountService.java   Source Code and License 5 votes vote down vote up
@FormUrlEncoded
@POST("account.registerDevice")
Single<BaseResponse<Integer>> registerDevice(@Field("token") String token,
                                             @Field("device_model") String deviceModel,
                                             @Field("device_year") Integer deviceYear,
                                             @Field("device_id") String deviceId,
                                             @Field("system_version") String systemVersion,
                                             @Field("settings") String settings);
 
Example 20
Project: Phoenix-for-VK   File: IGroupsService.java   Source Code and License 5 votes vote down vote up
@FormUrlEncoded
@POST("groups.get")
Single<BaseResponse<Items<VKApiCommunity>>> get(@Field("user_id") Integer userId,
                                                @Field("extended") Integer extended,
                                                @Field("filter") String filter,
                                                @Field("fields") String fields,
                                                @Field("offset") Integer offset,
                                                @Field("count") Integer count);
 
Example 21
Project: Tribe   File: ApiService.java   Source Code and License 5 votes vote down vote up
@FormUrlEncoded
@POST("api.php?m=member&a=getNeighbor")
Observable<HttpResult<List<NearbyListPerson>>> getNearbyListPersonList(@Field("userid") String userid,
                                                                       @Field("pageSize") String pageSize,
                                                                       @Field("pageNum") String pageNum,
                                                                       @Field("longitude") String longitude,
                                                                       @Field("latitude") String latitude,
                                                                       @Field("sex") String sex);
 
Example 22
Project: RetrofitRxjavaDemo   File: APIService.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@POST("getJoke")
Observable<HttpResult<JokeResult>> getJokeById2(
        @Field("id") int id);
 
Example 23
Project: Phoenix-for-VK   File: IVideoService.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@POST("video.delete")
Single<BaseResponse<Integer>> deleteVideo(@Field("video_id") Integer videoId,
                                          @Field("owner_id") Integer ownerId,
                                          @Field("target_id") Integer targetId);
 
Example 24
Project: Phoenix-for-VK   File: IAudioService.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@POST("audio.restore")
Single<BaseResponse<VKApiAudio>> restore(@Field("audio_id") int audioId,
                                         @Field("owner_id") Integer ownerId);
 
Example 25
Project: ZeroKit-Android-Sample   File: AdminApi.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@Headers(AUTHORIZATION_HEADER)
@POST("/api/user/invited-user")
retrofit2.Call<Void> invitedUser(@Field("operationId") String operationId);
 
Example 26
Project: telegram-bot-api   File: BotApi.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@POST("/bot{apiToken}/getChatMember")
Call<ApiResponse<ChatMember>> getChatMember(@Path("apiToken") String apiToken, @Field("chat_id") String chatId, @Field("user_id") long userId);
 
Example 27
Project: Phoenix-for-VK   File: IStoreService.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@POST("store.getProducts") //extended=1&filters=active&type=stickers&v=5.64" Thanks for Kate Mobile
Single<BaseResponse<Items<VKApiStickerSet.Product>>> getProducts(@Field("extended") Integer extended,
                                                                 @Field("filters") String filters,
                                                                 @Field("type") String type);
 
Example 28
Project: TripBuyer   File: Api.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@POST("purse") Observable<ResponseModel_no_list> wallet(@Field("a") String wid);
 
Example 29
Project: ZeroKit-Android-SDK   File: AdminApi.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@Headers(AUTHORIZATION_HEADER)
@POST("/api/user/invited-user")
retrofit2.Call<Void> invitedUser(@Field("operationId") String operationId);
 
Example 30
Project: tumbviewer   File: UserService.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@POST("/v2/user/follow")
Call<BaseBean<Void>> follow(@Field("url") String url);
 
Example 31
Project: ForeverLibrary   File: API.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@POST("api/login.json")
Observable<BasicResponse<LoginModel>> login(@Field("loginName") String name,
                                            @Field("password") String psd,
                                            @Field("deviceId") String deviceId,
                                            @Field("registrationId") String registerId);
 
Example 32
Project: Phoenix-for-VK   File: IVideoService.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@POST("video.restoreComment")
Single<BaseResponse<Integer>> restoreComment(@Field("owner_id") Integer ownerId,
                                            @Field("comment_id") int commentId);
 
Example 33
Project: DepressingThoughts   File: TwitterApiClient.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@POST("oauth2/token")
Call<OAuthToken> postCredentials(
        @Field("grant_type") String grantType
);
 
Example 34
Project: Artist   File: APIinterface.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@POST("/device")
Call<Void>registDevice(@Field("registration_id") String registration_id,
                       @Field("type") int type_num);
 
Example 35
Project: Paper-Melody   File: SocialSystemAPI.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@POST("user/password")
Observable<UserResponse> updatePassword(@Field("userID") Integer userID,
                                        @Field("oldPassword") String oldPassword,
                                        @Field("newPassword") String newPassword);
 
Example 36
Project: ImageClassify   File: RankService.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@POST("rank/getranking")
Call<HttpResult<List<Rank>>> getRanking(@Field(ApiConstant.OAUTH_TOKEN) String token,
                                        @Field(ApiConstant.RANK_IDENTIFICATION) String rankIdentification,
                                        @Field(ApiConstant.START) String start,
                                        @Field(ApiConstant.PAGE_NUM) String num);
 
Example 37
Project: Fairy   File: LogcatService.java   Source Code and License 4 votes vote down vote up
@POST("/")
@FormUrlEncoded
Observable<LogcatData> logcat(@Field("options") String options,
                              @Field("filter") String filter,
                              @Field("grep") String grep);
 
Example 38
Project: CheckIn   File: API.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@POST("xxx")
Flowable<LoginResponse> login(@Field("loginname") String loginname, @Field("pass") String pass);
 
Example 39
Project: REDAndroid   File: FailedMockApiService.java   Source Code and License 4 votes vote down vote up
@Override
public Single<ResponseBody> sendMessage(@Field("action") String action, @Field("toid") String toId, @Field("convid") String convId, @Field("subject") String subject, @Field("auth") String auth, @Field("body") String body) {
	return null;
}
 
Example 40
Project: Phoenix-for-VK   File: IPollsService.java   Source Code and License 4 votes vote down vote up
@FormUrlEncoded
@POST("polls.getById")
Single<BaseResponse<VKApiPoll>> getById(@Field("owner_id") Integer ownerId,
                                        @Field("is_board") Integer isBoard,
                                        @Field("poll_id") Integer pollId);