Package twitter4j.internal.http

Examples of twitter4j.internal.http.HttpParameter


        if ((annotations != null) && (!annotations.isEmpty())) {
            appendParameter("annotations", annotations.asParameterValue(), params);
        }
        params.add(includeEntities);
        if(null != mediaFile){
            params.add(new HttpParameter("media[]", mediaFile));
            params.add(new HttpParameter("possibly_sensitive", possiblySensitive));
        }else if(mediaName != null && mediaBody != null){
            params.add(new HttpParameter("media[]", mediaName, mediaBody));
            params.add(new HttpParameter("possibly_sensitive", possiblySensitive));
        }

        HttpParameter[] paramArray = new HttpParameter[params.size()];
        return params.toArray(paramArray);
    }
View Full Code Here


        return params.toArray(paramArray);
    }

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

            params.add(new HttpParameter(name, value));
        }
    }

    private void appendParameter(String name, double value, List<HttpParameter> params) {
        params.add(new HttpParameter(name, String.valueOf(value)));
    }
View Full Code Here

    private void appendParameter(String name, double value, List<HttpParameter> params) {
        params.add(new HttpParameter(name, String.valueOf(value)));
    }

    private void appendParameter(String name, long value, List<HttpParameter> params) {
        params.add(new HttpParameter(name, String.valueOf(value)));
    }
View Full Code Here

    private static final long serialVersionUID = -1486360080128882436L;

    /*package*/
    TwitterImpl(Configuration conf, Authorization auth) {
        super(conf, auth);
        INCLUDE_ENTITIES = new HttpParameter("include_entities", conf.isIncludeEntitiesEnabled());
        INCLUDE_RTS = new HttpParameter("include_rts", conf.isIncludeRTsEnabled());
        INCLUDE_MY_RETWEET = new HttpParameter("include_my_retweet", 1);
    }
View Full Code Here

     */
    public ResponseList<Status> getUserTimeline(String screenName, Paging paging)
            throws TwitterException {
        return factory.createStatusList(get(conf.getRestBaseURL()
                + "statuses/user_timeline.json",
                mergeParameters(new HttpParameter[]{new HttpParameter("screen_name", screenName)
                        , INCLUDE_RTS
                        , INCLUDE_ENTITIES
                        , INCLUDE_MY_RETWEET}
                        , paging.asPostParameterArray())));
    }
View Full Code Here

     */
    public ResponseList<Status> getUserTimeline(long userId, Paging paging)
            throws TwitterException {
        return factory.createStatusList(get(conf.getRestBaseURL()
                + "statuses/user_timeline.json",
                mergeParameters(new HttpParameter[]{new HttpParameter("user_id", userId)
                        , INCLUDE_RTS
                        , INCLUDE_ENTITIES
                        , INCLUDE_MY_RETWEET}
                        , paging.asPostParameterArray())));
    }
View Full Code Here

     */
    public ResponseList<Status> getRetweetedToUser(String screenName, Paging paging) throws TwitterException {
        return factory.createStatusList(get(conf.getRestBaseURL() +
                "statuses/retweeted_to_user.json", mergeParameters(paging.asPostParameterArray()
                , new HttpParameter[]{
                new HttpParameter("screen_name", screenName)
                , INCLUDE_ENTITIES})));
    }
View Full Code Here

     */
    public ResponseList<Status> getRetweetedToUser(long userId, Paging paging) throws TwitterException {
        return factory.createStatusList(get(conf.getRestBaseURL() +
                "statuses/retweeted_to_user.json", mergeParameters(paging.asPostParameterArray()
                , new HttpParameter[]{
                new HttpParameter("user_id", userId)
                , INCLUDE_ENTITIES})));
    }
View Full Code Here

     */
    public ResponseList<Status> getRetweetedByUser(String screenName, Paging paging) throws TwitterException {
        return factory.createStatusList(get(conf.getRestBaseURL() +
                "statuses/retweeted_by_user.json", mergeParameters(paging.asPostParameterArray()
                , new HttpParameter[]{
                new HttpParameter("screen_name", screenName)
                , INCLUDE_ENTITIES})));
    }
View Full Code Here

TOP

Related Classes of twitter4j.internal.http.HttpParameter

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.