本文整理汇总了Java中retrofit2.http.Field类的典型用法代码示例。如果您正苦于以下问题:Java Field类的具体用法?Java Field怎么用?Java Field使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Field类属于retrofit2.http包,在下文中一共展示了Field类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: post
import retrofit2.http.Field; //导入依赖的package包/类
@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);
示例2: checkIn
import retrofit2.http.Field; //导入依赖的package包/类
@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
);
示例3: postDataByRx
import retrofit2.http.Field; //导入依赖的package包/类
@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);
示例4: comment
import retrofit2.http.Field; //导入依赖的package包/类
@POST("sys/comments/new")
@FormUrlEncoded
Flowable<ResponseDto> comment(
@Field("account") String account,
@Field("content") String content,
@Field("token") String token
);
示例5: formEncodedFieldList
import retrofit2.http.Field; //导入依赖的package包/类
@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");
}
示例6: filterPkg
import retrofit2.http.Field; //导入依赖的package包/类
/**
* { "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);
示例7: doSignUp
import retrofit2.http.Field; //导入依赖的package包/类
@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);
示例8: getPostsList
import retrofit2.http.Field; //导入依赖的package包/类
/**
* 获取帖子列表 可获取全部或者最热 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);
示例9: directLogin
import retrofit2.http.Field; //导入依赖的package包/类
@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);
示例10: getAccessToken
import retrofit2.http.Field; //导入依赖的package包/类
@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);
示例11: search
import retrofit2.http.Field; //导入依赖的package包/类
@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);
示例12: addActivityOrInvitationComment
import retrofit2.http.Field; //导入依赖的package包/类
@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);
示例13: login
import retrofit2.http.Field; //导入依赖的package包/类
/**
* 社交系统API,提供与服务器互相交互的接口
*/
// 登录
@FormUrlEncoded
@POST("login")
Observable<UserResponse> login(@Field("name") String username,
@Field("pw") String password);
示例14: postDataByRxNoReturn
import retrofit2.http.Field; //导入依赖的package包/类
@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);
示例15: wanted
import retrofit2.http.Field; //导入依赖的package包/类
@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
);