twitter4j.api.DirectMessagesResourcesAsync Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of twitter4j-async Show documentation
Show all versions of twitter4j-async Show documentation
A Java library for the Twitter API
/*
* Copyright 2007 Yusuke Yamamoto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package twitter4j.api;
import twitter4j.Paging;
/**
* @author Joern Huxhorn - jhuxhorn at googlemail.com
*/
public interface DirectMessagesResourcesAsync {
/**
* Returns a list of the direct messages sent to the authenticating user.
*
This method calls https://api.twitter.com/1.1/direct_messages
*
* @see GET direct_messages | Twitter Developers
*/
void getDirectMessages();
/**
* Returns a list of the direct messages sent to the authenticating user.
*
This method calls https://api.twitter.com/1.1/direct_messages
*
* @param paging controls pagination
* @see GET direct_messages | Twitter Developers
* @since Twitter4J 2.0.1
*/
void getDirectMessages(Paging paging);
/**
* Returns a list of the direct messages sent by the authenticating user.
*
This method calls https://api.twitter.com/1.1/direct_messages/sent
*
* @see GET direct_messages/sent | Twitter Developers
*/
void getSentDirectMessages();
/**
* Returns a list of the direct messages sent by the authenticating user.
*
This method calls https://api.twitter.com/1.1/direct_messages/sent
*
* @param paging controls pagination
* @see GET direct_messages/sent | Twitter Developers
* @since Twitter4J 2.0.1
*/
void getSentDirectMessages(Paging paging);
/**
* Returns a single direct message, specified by an id parameter.
*
This method has not been finalized and the interface is subject to change in incompatible ways.
*
This method calls https://api.twitter.com/1.1/direct_messages/show/:id.json
*
* @param id message id
* @see #newtwitter and the API - Twitter API Announcements | Google Group
* @since Twitter4J 2.1.9
*/
void showDirectMessage(long id);
/**
* Destroys the direct message specified in the required ID parameter. The authenticating user must be the recipient of the specified direct message.
*
This method calls https://api.twitter.com/1.1/direct_messages/destroy
*
* @param id int
* @see POST direct_messages/destroy/:id | Twitter Developers
* @since Twitter4J 2.0.1
*/
void destroyDirectMessage(long id);
/**
* Sends a new direct message to the specified user from the authenticating user. Requires both the user and text parameters below.
* The text will be trimed if the length of the text is exceeding 140 characters.
*
This method calls https://api.twitter.com/1.1/direct_messages/new
*
* @param userId the screen name of the user to whom send the direct message
* @param text The text of your direct message.
* @see POST direct_messages/new | Twitter Developers
* @since Twitter4j 2.1.0
*/
void sendDirectMessage(long userId, String text);
/**
* Sends a new direct message to the specified user from the authenticating user. Requires both the user and text parameters below.
* The text will be trimed if the length of the text is exceeding 140 characters.
*
This method calls https://api.twitter.com/1.1/direct_messages/new
*
* @param screenName the screen name of the user to whom send the direct message
* @param text The text of your direct message.
* @see POST direct_messages/new | Twitter Developers
*/
void sendDirectMessage(String screenName, String text);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy