public class TwitterAdsStatApiImpl extends java.lang.Object implements TwitterAdsStatApi
| Constructor and Description |
|---|
TwitterAdsStatApiImpl(TwitterAdsClient twitterAdsClient) |
| Modifier and Type | Method and Description |
|---|---|
BaseAdsResponse<JobDetails> |
createAsyncJob(java.lang.String accountId,
TwitterEntityType twitterEntityType,
java.util.Collection<java.lang.String> ids,
long startTime,
long endTime,
boolean withDeleted,
Granularity granularity,
Placement placement,
java.util.Optional<TwitterSegmentationType> twitterSegmentationType) |
BaseAdsResponse<JobDetails> |
deleteJob(java.lang.String accountId,
java.lang.String jobId) |
BaseAdsListResponseIterable<TwitterAuctionInsights> |
fetchAuctionInsights(java.lang.String accountId,
java.util.Collection<java.lang.String> lineItemIds,
long startTime,
long endTime,
Granularity granularity,
Placement placement) |
BaseAdsListResponseIterable<TwitterAdStatistics> |
fetchCampaignStats(java.lang.String accountId,
java.util.Collection<java.lang.String> campaignIds,
long startTime,
long endTime) |
BaseAdsListResponse<TwitterEntityStatistics> |
fetchJobDataAsync(java.lang.String dataUrl) |
BaseAdsListResponseIterable<TwitterEntityStatistics> |
fetchStatsSync(java.lang.String accountId,
TwitterEntityType twitterEntity,
java.util.Collection<java.lang.String> entityIds,
long startTime,
long endTime,
boolean withDeleted,
Granularity granularity,
Placement placement) |
BaseAdsListResponseIterable<JobDetails> |
getJobExecutionDetails(java.lang.String accountId,
java.util.Collection<java.lang.String> jobIds) |
public TwitterAdsStatApiImpl(TwitterAdsClient twitterAdsClient)
public BaseAdsListResponseIterable<TwitterEntityStatistics> fetchStatsSync(java.lang.String accountId, TwitterEntityType twitterEntity, java.util.Collection<java.lang.String> entityIds, long startTime, long endTime, boolean withDeleted, Granularity granularity, Placement placement) throws TwitterException
fetchStatsSync in interface TwitterAdsStatApiaccountId - The identifier for the leveraged account.twitterEntity - The enum of entity type (e.g. LINE_ITEM, PROMOTED_TWEET).entityIds - A collection of ids to retrieve stats for.startTime - The time to retrieve stats from.endTime - The time to retrieve stats until.withDeleted - Whether or not to include deleted items in the results. Defaults to false.granularity - The granularity as enum such as DAY or HOUR.placement - The placement of entity to retrieve stats for.TwitterExceptionpublic BaseAdsListResponseIterable<TwitterAuctionInsights> fetchAuctionInsights(java.lang.String accountId, java.util.Collection<java.lang.String> lineItemIds, long startTime, long endTime, Granularity granularity, Placement placement) throws TwitterException
fetchAuctionInsights in interface TwitterAdsStatApiTwitterExceptionpublic BaseAdsResponse<JobDetails> createAsyncJob(java.lang.String accountId, TwitterEntityType twitterEntityType, java.util.Collection<java.lang.String> ids, long startTime, long endTime, boolean withDeleted, Granularity granularity, Placement placement, java.util.Optional<TwitterSegmentationType> twitterSegmentationType) throws TwitterException
createAsyncJob in interface TwitterAdsStatApiaccountId - The identifier for the leveraged account.twitterEntityType - The enum of entity type (e.g. LINE_ITEM, PROMOTED_TWEET).ids - A collection of ids to retrieve stats for.startTime - The time to retrieve stats from.endTime - The time to retrieve stats until.withDeleted - Whether or not to include deleted items in the results. Defaults to false.granularity - The granularity as enum such as DAY or HOUR.placement - The placement of entity to retrieve stats for.twitterSegmentationType - (optional) Break down analytics data via a supported segmentation type.TwitterExceptionpublic BaseAdsListResponseIterable<JobDetails> getJobExecutionDetails(java.lang.String accountId, java.util.Collection<java.lang.String> jobIds) throws TwitterException
getJobExecutionDetails in interface TwitterAdsStatApiaccountId - The identifier for the leveraged account.jobIds - A collection of job IDs to retrieve status of.TwitterExceptionpublic BaseAdsListResponse<TwitterEntityStatistics> fetchJobDataAsync(java.lang.String dataUrl) throws TwitterException
fetchJobDataAsync in interface TwitterAdsStatApidataUrl - The path given as output via a completed async job.TwitterExceptionpublic BaseAdsListResponseIterable<TwitterAdStatistics> fetchCampaignStats(java.lang.String accountId, java.util.Collection<java.lang.String> campaignIds, long startTime, long endTime) throws TwitterException
fetchCampaignStats in interface TwitterAdsStatApiaccountId - The identifier for the leveraged account.campaignIds - Campaign ids to fetch stats for.startTime - Start time.endTime - End time.TwitterExceptionpublic BaseAdsResponse<JobDetails> deleteJob(java.lang.String accountId, java.lang.String jobId) throws TwitterException
deleteJob in interface TwitterAdsStatApiTwitterException