retrofit2.http.Field Java Examples

The following examples show how to use retrofit2.http.Field. 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 check out the related API usage on the sidebar.
Example #1
Source File: ApiService.java    From MaoWanAndoidClient with 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 #2
Source File: ApiInterface.java    From Android with 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 #3
Source File: ApiInterface.java    From Android with 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 #4
Source File: MineApis.java    From WanAndroid with 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 #5
Source File: ApiInterface.java    From Android with 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 #6
Source File: WanAndroidService.java    From playa with 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 #7
Source File: RedditAuthApi.java    From auth with 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 #8
Source File: ApiService.java    From MaoWanAndoidClient with 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 #9
Source File: ApiService.java    From MaoWanAndoidClient with 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 #10
Source File: ApiService.java    From MaoWanAndoidClient with 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 #11
Source File: PersonApis.java    From Yuan-WanAndroid with 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 #12
Source File: PersonApis.java    From Yuan-WanAndroid with 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 #13
Source File: CollectApis.java    From Yuan-WanAndroid with Apache License 2.0 5 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 #14
Source File: ApiService.java    From MaoWanAndoidClient with 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 #15
Source File: ApiService.java    From MaoWanAndoidClient with 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 #16
Source File: RetrofitService.java    From Yuan-SxMusic with Apache License 2.0 4 votes vote down vote up
/**
 * 得到歌手照片,主要用于本地音乐:http://music.163.com/api/search/get/web?s=刘瑞琦&type=100
 * @param singer 歌手名字
 */
@Headers(Api.HEADER_USER_AGENT)
@POST(Api.SINGER_PIC)
@FormUrlEncoded
Observable<SingerImg> getSingerImg(@Field("s")String singer);
 
Example #17
Source File: MineApis.java    From WanAndroid with Apache License 2.0 4 votes vote down vote up
/**
 * 获得取消收藏结果
 * http://www.wanandroid.com/lg/uncollect/2805/json
 * @return
 */
@POST("lg/uncollect/{id}/json")
@FormUrlEncoded
Observable<BaseResponse<Collection>> getUnCollectionRequest(@Path("id") int id,//收藏在我的收藏列表的id
                                                            @Field("originId") int originId//收藏在原始文章列表的id
);
 
Example #18
Source File: ApiService.java    From MaoWanAndoidClient with Apache License 2.0 4 votes vote down vote up
/**
 * 删除收藏网站
 * @param id 收藏网站 id
 * @return
 */
@POST("/lg/collect/deletetool/json")
@FormUrlEncoded
Observable<ResponseBody<String>> deleteWebBookMark(
        @Field("id")int id
);
 
Example #19
Source File: ApiInterface.java    From Android with MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("plex/request.php")
Call<ResponseBody> requestMovie(@Field("user") String movie_id,
                                @Field("title") String title,
                                @Field("description") String description);
 
Example #20
Source File: JwtExampleService.java    From demo-firebase-android with The Unlicense 4 votes vote down vote up
@FormUrlEncoded @POST("generate_jwt")
Call<TokenResponse> getToken(
        @Header("Authorization") String token,
        @Field("identity") String identity
);
 
Example #21
Source File: LoginService.java    From MvpRoute with Apache License 2.0 4 votes vote down vote up
@FormUrlEncoded
@POST("user/login")
Observable<LoginResponse> login(@Field("username") String username, @Field("password") String passworld);
 
Example #22
Source File: QtumApi.java    From guarda-android-wallets with GNU General Public License v3.0 4 votes vote down vote up
@POST("/insight-api/tx/send")
@FormUrlEncoded
Call<SendTxResponse> sendRawTx(@Field("rawtx") String rawTx);
 
Example #23
Source File: SearchApis.java    From WanAndroid with Apache License 2.0 4 votes vote down vote up
/**
 * 搜索
 * http://www.wanandroid.com/article/query/0/json
 */
@POST("article/query/{pageNum}/json")
@FormUrlEncoded
Observable<BaseResponse<Articles>> getSearchRequest(@Field("k") String key,//关键字
                                                    @Path("pageNum") int pageNum//页数
);
 
Example #24
Source File: RetrofitApiCaller.java    From Android-POS with MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("posapi/public/access")
Call<UserLogin> userLogin(@Field("username") String userName, @Field("password") String password);
 
Example #25
Source File: ApiInterface.java    From Android with MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("plex/points.php")
Call<User> get_points(
        @Field("id") String id
);
 
Example #26
Source File: ApiInterface.java    From Android with MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("plex/login.php")
Call<User> loging_user(
        @Field("email") String email,
        @Field("password") String password
);
 
Example #27
Source File: V9PornServiceApi.java    From v9porn with MIT License 4 votes vote down vote up
@Headers({"Domain-Name: " + Api.PORN9_VIDEO_DOMAIN_NAME})
@FormUrlEncoded
@POST("/my_favour.php")
Observable<String> deleteMyFavoriteVideo(@Field("rvid") String rvid, @Field("removfavour") String removFavour, @Field("submit") String submit, @Header("Referer") String referer);
 
Example #28
Source File: RetrofitService.java    From DanDanPlayForAndroid with MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("/api/v2/user/profile")
Observable<CommJsonEntity> changeScreenName(@Field("screenName") String screenName);
 
Example #29
Source File: WanAndroidService.java    From playa with MIT License 4 votes vote down vote up
@POST("article/query/{page}/json")
@FormUrlEncoded
Observable<BaseResponse<ArticleListResponse>> searchArticles(
        @Path("page") int page, @Field("k") String keyword
);
 
Example #30
Source File: ApiService.java    From WanAndroid with 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);