public interface TwitterAdsCampaignApi
| Modifier and Type | Method and Description |
|---|---|
BaseAdsResponse<Campaign> |
createCampaign(java.lang.String accountId,
Campaign campaign) |
BaseAdsResponse<Campaign> |
deleteCampaign(java.lang.String accountId,
java.lang.String campaignId) |
BaseAdsListResponseIterable<Campaign> |
getAllCampaigns(java.lang.String accountId,
java.util.Optional<java.util.Collection<java.lang.String>> campaignIds,
java.util.Optional<java.util.Collection<java.lang.String>> fundingInstrumentIds,
boolean withDeleted,
java.util.Optional<java.lang.Integer> count,
java.util.Optional<java.lang.String> cursor,
java.util.Optional<CampaignSortByField> sortByField) |
BaseAdsResponse<Campaign> |
getCampaignById(java.lang.String accountId,
java.lang.String campaignId,
boolean withDeleted) |
BaseAdsListResponseIterable<TwitterPoliticalDisclaimer> |
getDisclaimersByCampaignIds(java.lang.String accountId,
java.util.Collection<java.lang.String> campaignIds) |
BaseAdsResponse<TwitterPoliticalDisclaimer> |
publishDisclaimer(java.lang.String accountId,
TwitterPoliticalDisclaimer twitterPoliticalDisclaimer) |
BaseAdsResponse<Campaign> |
updateCampaign(java.lang.String accountId,
java.lang.String campaignId,
java.util.Optional<java.lang.String> name,
java.lang.Long totalBudgetAmountLocalMicro,
java.util.Optional<java.lang.Long> dailyBudgetAmountLocalMicro,
java.util.Optional<java.lang.String> startTime,
java.util.Optional<java.lang.String> endTime,
EntityStatus status,
java.util.Optional<java.lang.Boolean> standardDelivery,
int frequencyCap,
int durationInDays) |
BaseAdsResponse<TwitterPoliticalDisclaimer> |
updateDisclaimer(java.lang.String accountUserId,
java.lang.String disclaimerId,
java.lang.String paidForBy,
java.lang.String paidForByWebsite,
java.lang.String authorizedBy) |
BaseAdsListResponseIterable<Campaign> getAllCampaigns(java.lang.String accountId, java.util.Optional<java.util.Collection<java.lang.String>> campaignIds, java.util.Optional<java.util.Collection<java.lang.String>> fundingInstrumentIds, boolean withDeleted, java.util.Optional<java.lang.Integer> count, java.util.Optional<java.lang.String> cursor, java.util.Optional<CampaignSortByField> sortByField) throws TwitterException
accountId - The identifier for the leveraged account.campaignIds - (optional) Scope the response to just the desired campaigns by specifying a comma-separated list of identifiers. Up to 50 ids may be provided.fundingInstrumentIds - (optional) Scope the response to just the desired funding instruments by specifying a comma-separated list of identifiers.
Up to 50 ids may be provided.withDeleted - Include deleted results in your request. Defaults to false.count - (optional) Specifies the number of campaigns to try and retrieve, up to a maximum of 1000 per distinct request.cursor - (optional) Specify a cursor to retrieve data from a specific page (function automatically handles paging upon iteration when you do not specify cursor value).TwitterExceptionBaseAdsResponse<Campaign> getCampaignById(java.lang.String accountId, java.lang.String campaignId, boolean withDeleted) throws TwitterException
accountId - The identifier for the leveraged account.campaignId - The identifier for a campaign associated with the current account.withDeleted - Include deleted results in your request. Defaults to false.TwitterExceptionBaseAdsResponse<Campaign> createCampaign(java.lang.String accountId, Campaign campaign) throws TwitterException
campaign - A Campaign object representing the campaign to be created.TwitterExceptionBaseAdsResponse<Campaign> updateCampaign(java.lang.String accountId, java.lang.String campaignId, java.util.Optional<java.lang.String> name, java.lang.Long totalBudgetAmountLocalMicro, java.util.Optional<java.lang.Long> dailyBudgetAmountLocalMicro, java.util.Optional<java.lang.String> startTime, java.util.Optional<java.lang.String> endTime, EntityStatus status, java.util.Optional<java.lang.Boolean> standardDelivery, int frequencyCap, int durationInDays) throws TwitterException
accountId - The identifier for the leveraged account.campaignId - The identifier of campaign to update.name - (optional) Name to update the cmapaign with.totalBudgetAmountLocalMicro - Name to update the cmapaign with.dailyBudgetAmountLocalMicro - (optional) Name to update the cmapaign with.startTime - (optional) Start time to update the cmapaign with.endTime - (optional) End time to update the cmapaign with.status - Status of the campaignstandardDelivery - (optional) Update the standard delivery setting of campaign.frequencyCap - (if value passed greater than 0) Update integer representing the number of times for which one user could be delivered an ad to.durationInDays - (if value passed greater than 0) Update integer representing the time period within which the frequency_cap frequency is achieved. Only supports values of: 1, 7 and 30.TwitterExceptionBaseAdsResponse<Campaign> deleteCampaign(java.lang.String accountId, java.lang.String campaignId) throws TwitterException
accountId - The identifier for the leveraged account.campaignId - The identifier of campaign to delete.TwitterExceptionBaseAdsResponse<TwitterPoliticalDisclaimer> publishDisclaimer(java.lang.String accountId, TwitterPoliticalDisclaimer twitterPoliticalDisclaimer) throws TwitterException
accountId - The identifier for the leveraged account.twitterPoliticalDisclaimer - Political disclaimer to publish.TwitterExceptionBaseAdsListResponseIterable<TwitterPoliticalDisclaimer> getDisclaimersByCampaignIds(java.lang.String accountId, java.util.Collection<java.lang.String> campaignIds) throws TwitterException
accountId - The identifier for the leveraged account.campaignIds - Campaign ids for which to fetch the disclaimers.TwitterExceptionBaseAdsResponse<TwitterPoliticalDisclaimer> updateDisclaimer(java.lang.String accountUserId, java.lang.String disclaimerId, java.lang.String paidForBy, java.lang.String paidForByWebsite, java.lang.String authorizedBy) throws TwitterException
accountUserId - The identifier for the leveraged account.disclaimerId - The id of disclaimer to updatepaidForBy - paidForByWebsite - authorizedBy - TwitterException