Java Code Examples for retrofit2.http.Field

The following examples show how to use retrofit2.http.Field. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: Yuan-WanAndroid   Source File: PersonApis.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 登陆
 * http://www.wanandroid.com/user/login
 */
@POST("user/login")
@FormUrlEncoded
Observable<BaseResponse<Login>> login(
        @Field("username") String userName,
        @Field("password") String password
);
 
Example 2
Source Project: Yuan-WanAndroid   Source File: PersonApis.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 注册
 * http://www.wanandroid.com/user/register
 */
@POST("user/register")
@FormUrlEncoded
Observable<BaseResponse<Login>> register(@Field("username") String username,
                                         @Field("password") String password,
                                         @Field("repassword") String rePassword//确认密码
);
 
Example 3
Source Project: playa   Source File: WanAndroidService.java    License: MIT License 5 votes vote down vote up
@POST("user/register")
@FormUrlEncoded
Observable<BaseResponse<LoginResponse>> signup(
        @Field("username") String username,
        @Field("password") String password,
        @Field("repassword") String repassword
);
 
Example 4
Source Project: Android   Source File: ApiInterface.java    License: MIT License 5 votes vote down vote up
@FormUrlEncoded
@POST("plex/addmovie.php")
Call<ResponseBody> addMovie(@Field("id") String movie_id,
                                @Field("title") String title,
                            @Field("file_id") String file_id,

                            @Field("id_tvseries_tmdb") int id_tvseries_tmdb,
                            @Field("name_tv_series") String name_tv_series,
                            @Field("season_number") int season_number,
                            @Field("episode_name") String episode_name,
                            @Field("episode_number") int  episode_number,
                            @Field("episode_id_tmdb") int episode_id_tmdb
);
 
Example 5
Source Project: Android   Source File: ApiInterface.java    License: MIT License 5 votes vote down vote up
@FormUrlEncoded
@POST("plex/registration.php")
Call<User> registration(
                            @Field("full_name") String full_name,
                            @Field("email") String email,
                            @Field("password") String password,
                            @Field("phone") String phone,
                            @Field("points") int points,
                            @Field("age") String age,
                            @Field("location") String loation,
                            @Field("address") String  address,
                            @Field("details_manufacturing") String  Details_MANUFACTURER);
 
Example 6
Source Project: Android   Source File: ApiInterface.java    License: MIT License 5 votes vote down vote up
@FormUrlEncoded
@POST("plex/edit-profile.php")
Call<User> edit_profile(
        @Field("id") String id,
        @Field("full_name") String full_name,
        @Field("email") String email,
        @Field("password") String password,
        @Field("phone") String phone,
        @Field("age") String age);
 
Example 7
Source Project: WanAndroid   Source File: MineApis.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 注册
 * http://www.wanandroid.com/user/register
 */
@POST("user/register")
@FormUrlEncoded
Observable<BaseResponse<Login>> getRegisterRequest(@Field("username") String username,//用户名
                                                   @Field("password") String password,//输入密码
                                                   @Field("repassword") String rePassword//再次输入密码
);
 
Example 8
Source Project: auth   Source File: RedditAuthApi.java    License: MIT License 5 votes vote down vote up
@FormUrlEncoded
@POST("v1/access_token")
Single<TokenResponse> authenticate(
        @Header("Authorization") String basicAuth,
        @Field("grant_type") String grantType,
        @Field("code") String code,
        @Field("redirect_uri") String redirectUri);
 
Example 9
Source Project: MaoWanAndoidClient   Source File: ApiService.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 注册
 * @param username 用户名
 * @param password 密码
 * @param repassword 确认密码
 * @return
 */
@POST("/user/register")
@FormUrlEncoded
Observable<ResponseBody<LoginData>> postSignUpData(
        @Field("username")String username,
        @Field("password")String password,
        @Field("repassword")String repassword
);
 
Example 10
Source Project: MaoWanAndoidClient   Source File: ApiService.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 收藏站外文章
 * @param title
 * @param author
 * @param link
 * @return
 */
@POST("/lg/collect/add/json")
@FormUrlEncoded
Observable<ResponseBody<CollectData>>getCollectOutsideListData(
        @Field("title")String title,
        @Field("author")String author,
        @Field("link")String link
);
 
Example 11
Source Project: MaoWanAndoidClient   Source File: ApiService.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 我的收藏页面  取消收藏(该页面包含自己录入的内容)
 * @param articleId 文章id:拼接在链接上
 * @param originId  originId:列表页下发,无则为-1 (originId 代表的是你收藏之前的那篇文章本身的id; 但是收藏支持主动添加,这种情况下,没有originId则为-1)
 * @return
 */
@POST("/lg/uncollect/{articleId}/json")
@FormUrlEncoded
Observable<ResponseBody<String>>cancelCollectArticlePageData(
        @Path("articleId") int articleId,
        @Field("originId") int originId
);
 
Example 12
Source Project: MaoWanAndoidClient   Source File: ApiService.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 添加收藏网址
 * @param name 网站名称
 * @param link 网站链接
 * @return
 */
@POST("/lg/collect/addtool/json")
@FormUrlEncoded
Observable<ResponseBody<WebBookMark>> addWebBookMark(
        @Field("name")String name,
        @Field("link")String link
);
 
Example 13
Source Project: MaoWanAndoidClient   Source File: ApiService.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 编辑收藏网站
 * @param id 收藏网站 id
 * @param name 网站名称
 * @param link 网站链接
 * @return
 */
@POST("/lg/collect/updatetool/json")
@FormUrlEncoded
Observable<ResponseBody<WebBookMark>> updateWebBookMark(
        @Field("id")int id,
        @Field("name")String name,
        @Field("link")String link
);
 
Example 14
Source Project: MaoWanAndoidClient   Source File: ApiService.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 搜索
 * @param pageNum 页码:拼接在链接上,从0开始
 * @param keyWord 搜索关键词
 * @return
 */
@POST("/article/query/{pageNum}/json")
@FormUrlEncoded
Observable<ResponseBody<HomeArticleListData>> getSearchKeyWordData(
        @Path("pageNum") int pageNum,
        @Field("k") String keyWord
);
 
Example 15
Source Project: WanAndroid   Source File: ApiService.java    License: MIT License 4 votes vote down vote up
@POST("user/login")
@FormUrlEncoded
Observable<LoginStateBean> userLogin(@Field("username") String username, @Field("password") String password);
 
Example 16
Source Project: WanAndroid   Source File: ApiService.java    License: MIT License 4 votes vote down vote up
@POST("user/register")
@FormUrlEncoded
Observable<LoginStateBean> userRegister(@Field("username") String username, @Field("password") String password, @Field("repassword") String repassword);
 
Example 17
Source Project: V2EX   Source File: TopicApi.java    License: GNU General Public License v3.0 4 votes vote down vote up
@POST("/down/topic")
Observable<String> downVote(@Path("id") int id, @Field("t") String v);
 
Example 18
Source Project: Gander   Source File: SampleApiService.java    License: Apache License 2.0 4 votes vote down vote up
@POST("/post")
@FormUrlEncoded
@Headers({
        "ContentType: application/x-www-form-urlencoded",
})
Call<Void> postForm(@Field("param_string") String string, @Field("param_string_null") String stringNil, @Field("param_double") double param2, @Field("param_int") int param3, @Field("param_bool") boolean param4);
 
Example 19
Source Project: WanAndroid   Source File: API.java    License: GNU General Public License v3.0 4 votes vote down vote up
/**
 * 登录
 */
@POST("user/login")
@FormUrlEncoded
Call<Result<UserBean>> postLogin(@Field("username") String username, @Field("password") String password);
 
Example 20
Source Project: Yuan-WanAndroid   Source File: CollectApis.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * 收藏列表下取消收藏
 * http://www.wanandroid.com/lg/uncollect/2805/json
 */
@POST("lg/uncollect/{id}/json")
@FormUrlEncoded
Observable<BaseResponse> unCollection(@Path("id") int id,//收藏在我的收藏列表的id
                                      @Field("originId") int originId);
 
Example 21
Source Project: Pixiv-Shaft   Source File: SignApi.java    License: MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("api/provisional-accounts/create")
Observable<SignResponse> pixivSign(@Header("Authorization") String token,
                                   @Field("user_name") String userName,
                                   @Field("ref") String ref);
 
Example 22
Source Project: Pixiv-Shaft   Source File: SignApi.java    License: MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("/api/account/edit")
Observable<AccountEditResponse> changePixivID(@Header("Authorization") String token,
                                                      @Field("new_user_account") String new_user_account,
                                                      @Field("current_password") String current_password);
 
Example 23
Source Project: Pixiv-Shaft   Source File: SignApi.java    License: MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("/api/account/edit")
Observable<AccountEditResponse> changeEmailAndPixivID(@Header("Authorization") String token,
                                            @Field("new_mail_address") String new_mail_address,
                                            @Field("new_user_account") String new_user_account,
                                            @Field("current_password") String current_password);
 
Example 24
Source Project: Pixiv-Shaft   Source File: AppApi.java    License: MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("v1/user/follow/add")
Observable<NullResponse> postFollow(@Header("Authorization") String token,
                                    @Field("user_id") int user_id,
                                    @Field("restrict") String followType);
 
Example 25
Source Project: Pixiv-Shaft   Source File: AppApi.java    License: MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("v1/user/follow/delete")
Observable<NullResponse> postUnFollow(@Header("Authorization") String token,
                                      @Field("user_id") int user_id);
 
Example 26
Source Project: Pixiv-Shaft   Source File: AppApi.java    License: MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("v1/illust/comment/add")
Observable<CommentHolder> postComment(@Header("Authorization") String token,
                                      @Field("illust_id") int illust_id,
                                      @Field("comment") String comment);
 
Example 27
Source Project: Pixiv-Shaft   Source File: AppApi.java    License: MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("v1/illust/comment/add")
Observable<CommentHolder> postComment(@Header("Authorization") String token,
                                      @Field("illust_id") int illust_id,
                                      @Field("comment") String comment,
                                      @Field("parent_comment_id") int parent_comment_id);
 
Example 28
Source Project: Pixiv-Shaft   Source File: AppApi.java    License: MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("v2/illust/bookmark/add")
Observable<NullResponse> postLike(@Header("Authorization") String token,
                                  @Field("illust_id") int illust_id,
                                  @Field("restrict") String restrict);
 
Example 29
Source Project: Pixiv-Shaft   Source File: AppApi.java    License: MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("v2/novel/bookmark/add")
Observable<NullResponse> postLikeNovel(@Header("Authorization") String token,
                                       @Field("novel_id") int novel_id,
                                       @Field("restrict") String restrict);
 
Example 30
Source Project: Pixiv-Shaft   Source File: AppApi.java    License: MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("v2/illust/bookmark/add")
Observable<NullResponse> postLike(@Header("Authorization") String token,
                                  @Field("illust_id") int illust_id,
                                  @Field("restrict") String restrict,
                                  @Field("tags[]") String... tags);