public class TwitterScheduledTweetsApiImpl extends java.lang.Object implements TwitterScheduledTweetApi
| Constructor and Description |
|---|
TwitterScheduledTweetsApiImpl(TwitterAdsClient twitterAdsClient) |
| Modifier and Type | Method and Description |
|---|---|
BaseAdsResponse<ScheduledTweet> |
create(java.lang.String accountId,
java.util.Date scheduledAt,
java.lang.String text,
java.lang.String userId,
java.lang.String cardURI,
java.util.List<java.lang.String> mediaIds,
boolean nullCast) |
BaseAdsResponse<ScheduledTweet> |
delete(java.lang.String accountId,
java.lang.String scheduledTweetId) |
BaseAdsListResponseIterable<ScheduledTweet> |
fetch(java.lang.String accountId,
java.lang.String userId,
boolean withDeleted,
java.lang.Integer count,
java.lang.String cursor) |
BaseAdsResponse<ScheduledTweet> |
fetchScheduledTweetById(java.lang.String accountId,
java.lang.String scheduledTweetId,
boolean withDeleted) |
BaseAdsResponse<ScheduledTweet> |
update(java.lang.String accountId,
java.lang.String scheduledTweetId,
java.util.Date scheduledAt,
java.lang.String text,
java.lang.String cardURI,
java.util.List<java.lang.String> mediaIds) |
public TwitterScheduledTweetsApiImpl(TwitterAdsClient twitterAdsClient)
public BaseAdsListResponseIterable<ScheduledTweet> fetch(java.lang.String accountId, java.lang.String userId, boolean withDeleted, java.lang.Integer count, java.lang.String cursor) throws TwitterException
fetch in interface TwitterScheduledTweetApiaccountId - The identifier for the leveraged account.userId - Full promotable user Id.withDeleted - Include deleted results in your request. Defaults to false.count - Specifies the number of Scheduled Promoted Tweets to try to retrieve, up to a maximum of 1000 per distinct request.cursor - Specifies a cursor to get the next page of Scheduled Promoted Tweets.TwitterExceptionpublic BaseAdsResponse<ScheduledTweet> fetchScheduledTweetById(java.lang.String accountId, java.lang.String scheduledTweetId, boolean withDeleted) throws TwitterException
fetchScheduledTweetById in interface TwitterScheduledTweetApiaccountId - The identifier for the leveraged account.scheduledTweetId - The id of the scheduled tweetwithDeleted - Include deleted results in your request. Defaults to false.TwitterExceptionpublic BaseAdsResponse<ScheduledTweet> create(java.lang.String accountId, java.util.Date scheduledAt, java.lang.String text, java.lang.String userId, java.lang.String cardURI, java.util.List<java.lang.String> mediaIds, boolean nullCast) throws TwitterException
create in interface TwitterScheduledTweetApiaccountId - The identifier for the leveraged account.scheduledAt - The time, expressed in ISO 8601, that the Tweet should be published (or go live).. 2017-12-31T23:59:00Z
Tweets can only be scheduled up to one year in the future.
Note: Tweets should only be scheduled at minute-granularity; seconds will be ignored.text - The text of your status update, typically up to 140 characters.userId - The user ID of the advertiser on behalf of whom you are posting the Tweet. The advertiser must grant your handle (or handles) access to their ads account via ads.twitter.com. This permission allows you to call the API using the OAuth tokens of your own handle rather than the advertisers..cardURI - Associate a card with the Tweet using the card_uri value from any cards response, if available. card://855591459410511943
IMPORTANTmediaIds - Associate media with the Tweet by specifying a comma-separated list of identifiers. Include up to 4 images, 1 animated GIF, or 1 video. See Uploading Media for additional details on uploading media.nullCast - Whether to create a nullcasted (or Promoted-only) Tweet..TwitterExceptionpublic BaseAdsResponse<ScheduledTweet> update(java.lang.String accountId, java.lang.String scheduledTweetId, java.util.Date scheduledAt, java.lang.String text, java.lang.String cardURI, java.util.List<java.lang.String> mediaIds) throws TwitterException
update in interface TwitterScheduledTweetApiTwitterExceptionpublic BaseAdsResponse<ScheduledTweet> delete(java.lang.String accountId, java.lang.String scheduledTweetId) throws TwitterException
delete in interface TwitterScheduledTweetApiTwitterException