Package twitter4j.http

Examples of twitter4j.http.PostParameter


     * @throws TwitterException when Twitter service or network is unavailable
     * @since Twitter4J 1.0.4
     * @see <a href="http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-account%C2%A0update_delivery_device">Twitter API Wiki / Twitter REST API Method: account update_delivery_device</a>
     */
    public User updateDeliverlyDevice(Device device) throws TwitterException {
        return new User(http.post(getBaseURL() + "account/update_delivery_device.xml", new PostParameter[]{new PostParameter("device", device.DEVICE)}, true), this);
    }
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

     * @since Twitter4J 2.0.8
     * @see <a href="http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-saved_searches-create">Twitter API Wiki / Twitter REST API Method: saved_searches create</a>
     */
    public SavedSearch createSavedSearch(String query) throws TwitterException {
        return new SavedSearch(http.post(getBaseURL() + "saved_searches/create.json"
                , new PostParameter[]{new PostParameter("query", query)}, true));
    }
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

        }
    }

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

     */
    public StatusStream getFirehoseStream(int count) throws TwitterException {

        try {
            return new StatusStream(http.post(getStreamBaseURL() + "1/statuses/firehose.json"
                    , new PostParameter[]{new PostParameter("count"
                            , String.valueOf(count))}, true));
        } catch (IOException e) {
            throw new TwitterException(e);
        }
    }
View Full Code Here

     * @since Twitter4J 2.0.10
     */
    public StatusStream getFilterStream(int count, int[] follow, String[] track)
            throws TwitterException {
        List<PostParameter> postparams = new ArrayList<PostParameter>();
        postparams.add(new PostParameter("count", count));
        if(null != follow && follow.length > 0){
            postparams.add(new PostParameter("follow"
                            , toFollowString(follow)));
        }
        if(null != track && track.length > 0){
            postparams.add(new PostParameter("track"
                            , toTrackString(track)));
        }
        try {
            return new StatusStream(http.post(getStreamBaseURL() + "1/statuses/filter.json"
                    , postparams.toArray(new PostParameter[0]), true));
View Full Code Here

TOP

Related Classes of twitter4j.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.