@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);
@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 );
@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);
@POST("sys/comments/new") @FormUrlEncoded Flowable<ResponseDto> comment( @Field("account") String account, @Field("content") String content, @Field("token") String token );
@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"); }
/** * { "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);
@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);
/** * 获取帖子列表 可获取全部或者最热 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);
@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);
@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);
@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);
@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);
/** * 社交系统API,提供与服务器互相交互的接口 */ // 登录 @FormUrlEncoded @POST("login") Observable<UserResponse> login(@Field("name") String username, @Field("pw") String password);
@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);
@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 );
@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);
@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);
@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);
@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);
@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);
@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);
@FormUrlEncoded @POST("getJoke") Observable<HttpResult<JokeResult>> getJokeById2( @Field("id") int id);
@FormUrlEncoded @POST("video.delete") Single<BaseResponse<Integer>> deleteVideo(@Field("video_id") Integer videoId, @Field("owner_id") Integer ownerId, @Field("target_id") Integer targetId);
@FormUrlEncoded @POST("audio.restore") Single<BaseResponse<VKApiAudio>> restore(@Field("audio_id") int audioId, @Field("owner_id") Integer ownerId);
@FormUrlEncoded @Headers(AUTHORIZATION_HEADER) @POST("/api/user/invited-user") retrofit2.Call<Void> invitedUser(@Field("operationId") String operationId);
@FormUrlEncoded @POST("/bot{apiToken}/getChatMember") Call<ApiResponse<ChatMember>> getChatMember(@Path("apiToken") String apiToken, @Field("chat_id") String chatId, @Field("user_id") long userId);
@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);
@FormUrlEncoded @POST("purse") Observable<ResponseModel_no_list> wallet(@Field("a") String wid);
@FormUrlEncoded @POST("/v2/user/follow") Call<BaseBean<Void>> follow(@Field("url") String url);
@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);
@FormUrlEncoded @POST("video.restoreComment") Single<BaseResponse<Integer>> restoreComment(@Field("owner_id") Integer ownerId, @Field("comment_id") int commentId);
@FormUrlEncoded @POST("oauth2/token") Call<OAuthToken> postCredentials( @Field("grant_type") String grantType );
@FormUrlEncoded @POST("/device") Call<Void>registDevice(@Field("registration_id") String registration_id, @Field("type") int type_num);
@FormUrlEncoded @POST("user/password") Observable<UserResponse> updatePassword(@Field("userID") Integer userID, @Field("oldPassword") String oldPassword, @Field("newPassword") String newPassword);
@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);
@POST("/") @FormUrlEncoded Observable<LogcatData> logcat(@Field("options") String options, @Field("filter") String filter, @Field("grep") String grep);
@FormUrlEncoded @POST("xxx") Flowable<LoginResponse> login(@Field("loginname") String loginname, @Field("pass") String pass);
@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; }
@FormUrlEncoded @POST("polls.getById") Single<BaseResponse<VKApiPoll>> getById(@Field("owner_id") Integer ownerId, @Field("is_board") Integer isBoard, @Field("poll_id") Integer pollId);