⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 constants.java

📁 一个J2ME Twitter 客户端的NetBeans项目
💻 JAVA
字号:
/*
 ******************************************************************************
    Stores constant values with regards to Twitter API
    Copyright (C) 2007 Timothy Lim Sheng Hwee

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

 Author: Timothy Lim Sheng Hwee
 Email : LimShengHwee@gmail.com
******************************************************************************
 */

package Twittering;

/**
 *
 * @author Administrator
 */
public class Constants {

    public static final String ENCODING = "UTF8";
    
    // all URI must be appened w/ format

    public static final String URI_HOME = "http://twitter.com/";

    
    /* URL: http://twitter.com/statuses/friends_timeline.format
     * Formats: xml, json, rss, atom
     * Parameters:
     *     id          Optional    Specifies the ID or screen name of the user for whom to return the friends_timeline.  Ex: http://twitter.com/statuses/friends_timeline/12345.xml or http://twitter.com/statuses/friends_timeline/bob.json. 
     *     since       Optional    Narrows the returned results to just those statuses created after the specified HTTP-formatted date.  The same behavior is available by setting an If-Modified-Since header in your HTTP request.  Ex: http://twitter.com/statuses/friends_timeline.rss?since=Tue%2C+27+Mar+2007+22%3A55%3A48+GMT
     *     page        Optional    Gets the 20 next most recent statuses from the authenticating user and that user's friends.  Ex: http://twitter.com/statuses/friends_timeline.rss?page=3     
     */
    public static final String URI_LIST_TIMELINE_FRIENDS = "http://twitter.com/statuses/friends_timeline.";
    
    /* URL: http://twitter.com/statuses/user_timeline.format
     * Formats: xml, json, rss, atom
     * Parameters:
     *      id      Optional    Specifies the ID or screen name of the user for whom to return the friends_timeline.  Ex: http://twitter.com/statuses/user_timeline/12345.xml or http://twitter.com/statuses/user_timeline/bob.json. 
     *      count   Optional    Specifies the number of statuses to retrieve.  May not be greater than 20 for performance purposes.  Ex: http://twitter.com/statuses/user_timeline?count=5  
     *      since   Optional    Narrows the returned results to just those statuses created after the specified HTTP-formatted date.  The same behavior is available by setting an If-Modified-Since header in your HTTP request.  Ex: http://twitter.com/statuses/user_timeline.rss?since=Tue%2C+27+Mar+2007+22%3A55%3A48+GMT 
     *      page    Optional    Retrieves the 20 next most recent direct messages.  Ex: http://twitter.com/direct_messages.xml?page=3     *
     */
    public static final String URI_LIST_TIMELINE_USER = "http://twitter.com/statuses/user_timeline.";

    
    /* URL: http://twitter.com/statuses/update.format
     * Formats: xml, json.  Returns the posted status in requested format when successful.
     * Parameters:
     *      status      Required    The text of your status update.  Be sure to URL encode as necessary.  Must not be more than 160 characters and should not be more than 140 characters to ensure optimal display.
replies
     */
    public static final String URI_SEND_TWEET = "http://twitter.com/statuses/update.";

    /* 
     * URL: http://twitter.com/direct_messages.format
     * Formats: xml, json, rss, atom 
     * Parameters:
     *      since       Optional    Narrows the resulting list of direct messages to just those sent after the specified HTTP-formatted date.  The same behavior is available by setting the If-Modified-Since parameter in your HTTP request.  Ex: http://twitter.com/direct_messages.atom?since=Tue%2C+27+Mar+2007+22%3A55%3A48+GMT
     *      since_id    Optional    Returns only direct messages with an ID greater than (that is, more recent than) the specified ID.  Ex: http://twitter.com/direct_messages.xml?since_id=12345
     *      page        Optional    Retrieves the 20 next most recent direct messages.  Ex: http://twitter.com/direct_messages.xml?page=3     
     */
    public static final String URI_LIST_DIRECT = "http://twitter.com/direct_messages."    ;
    /*
     * URL: http://twitter.com/direct_messages/new.format
     * Formats: xml, json  
     * Parameters: 
     *      user        Required    The ID or screen name of the recipient user. 
     *      text        Required    The text of your direct message.  Be sure to URL encode as necessary, and keep it under 140 characters.  
     */
    public static final String URI_SEND_DIRECT = "http://twitter.com/direct_messages/new.";                                                  

    /* 
     * URL: http://twitter.com/statuses/friends.format
     * Formats: xml, json
     * Parameters:
     *      id      Optional    The ID or screen name of the user for whom to request a list of friends.  Ex: http://twitter.com/statuses/friends/12345.json or http://twitter.com/statuses/friends/bob.rss     * 
     */
    public static final String URI_LIST_FRIENDS = "http://twitter.com/statuses/friends.";
    
    public static final String URI_FORMAT_XML = "xml";
    public static final String URI_FORMAT_RSS = "rss";
    public static final String URI_FORMAT_JSON = "json";
    public static final String URI_FORMAT_ATOM = "atom";
            

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -