Package weibo4j.http

Examples of weibo4j.http.PostParameter


                                                        String text) throws WeiboException {
        /*return new DirectMessage(http.post(getBaseURL() + "direct_messages/new.xml",
                new PostParameter[]{new PostParameter("user", id),
                        new PostParameter("text", text)}, true), this);*/
      return new DirectMessage(http.post(getBaseURL() + "direct_messages/new.json",
                new PostParameter[]{new PostParameter("user_id", id),
                        new PostParameter("text", text),new PostParameter("source", source)}, true).asJSONObject());
    }
View Full Code Here


        /*return new User(http.post(getBaseURL() + "friendships/create/" + id + ".xml"
                , new PostParameter[]{new PostParameter("follow"
                        , String.valueOf(follow))}, true)
                , this);*/
       return new User(http.post(getBaseURL() + "friendships/create/" + id + ".json"
                 , new PostParameter[]{new PostParameter("follow"
                         , String.valueOf(follow))}, true).asJSONObject()
                 );
    }
View Full Code Here

     * @throws WeiboException when Weibo service or network is unavailable
     * @since Weibo4J 1.0.4
     * @deprecated Use updateProfile(String name, String email, String url, String location, String description) instead
     */
    public User updateLocation(String location) throws WeiboException {
        return new User(http.post(getBaseURL() + "account/update_location.xml", new PostParameter[]{new PostParameter("location", location)}, true), this);
    }
View Full Code Here

     * @throws WeiboException when Weibo service or network is unavailable
     * @since Weibo4J 1.0.4
     */
    public User updateDeliverlyDevice(Device device) throws WeiboException {
//        return new User(http.post(getBaseURL() + "account/update_delivery_device.xml", new PostParameter[]{new PostParameter("device", device.DEVICE)}, true), this);
      return new User(http.post(getBaseURL() + "account/update_delivery_device.json", new PostParameter[]{new PostParameter("device", device.DEVICE)}, true).asJSONObject());
    }
View Full Code Here

    }

    private void addParameterToList(List<PostParameter> colors,
                                      String paramName, String color) {
        if(null != color){
            colors.add(new PostParameter(paramName,color));
        }
    }
View Full Code Here

     * @throws WeiboException when Weibo service or network is unavailable
     * @since Weibo4J 2.0.8
     */
    public SavedSearch createSavedSearch(String query) throws WeiboException {
        return new SavedSearch(http.post(getBaseURL() + "saved_searches/create.json"
                , new PostParameter[]{new PostParameter("query", query)}, true));
    }
View Full Code Here

     * @throws WeiboException when Weibo service or network is unavailable
     * @since Weibo4J 2.0.10
     */
    public Status repost(String sid,String status) throws WeiboException {
      return new Status(http.post(getBaseURL() + "statuses/repost.json",
                new PostParameter[]{new PostParameter("id", sid),
                  new PostParameter("status", status)}, true));
    }
View Full Code Here

     * @throws WeiboException when Weibo service or network is unavailable
     * @since Weibo4J 2.0.10
     */
    public Status reply(String sid,String cid,String comment) throws WeiboException {
      return new Status(http.post(getBaseURL() + "statuses/reply.json",
                new PostParameter[]{new PostParameter("id", sid),
                    new PostParameter("cid", cid),
                  new PostParameter("comment", comment)}, true));
    }
View Full Code Here

     * @return jsonObject
     * @throws WeiboException when Weibo service or network is unavailable
     */
    public JSONObject register(String ip,String ...args) throws WeiboException {
      return http.post(getBaseURL() + "account/register.json",
                new PostParameter[]{new PostParameter("nick", args[2]),
                  new PostParameter("gender", args[3]),
                  new PostParameter("password", args[4]),
                  new PostParameter("email", args[5]),
                  new PostParameter("ip", ip)}, true).asJSONObject();
    }
View Full Code Here

        return params.toArray(paramArray);
    }

    private void appendParameter(String name, String value, List<PostParameter> params) {
        if (null != value) {
            params.add(new PostParameter(name, value));
        }
    }
View Full Code Here

TOP

Related Classes of weibo4j.http.PostParameter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.