@memberjunction/actions-bizapps-social 2.112.0 → 2.113.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +13 -0
- package/dist/base/base-social.action.d.ts.map +1 -1
- package/dist/base/base-social.action.js +24 -18
- package/dist/base/base-social.action.js.map +1 -1
- package/dist/providers/buffer/buffer-base.action.d.ts.map +1 -1
- package/dist/providers/buffer/buffer-base.action.js +34 -35
- package/dist/providers/buffer/buffer-base.action.js.map +1 -1
- package/dist/providers/facebook/actions/boost-post.action.d.ts.map +1 -1
- package/dist/providers/facebook/actions/boost-post.action.js +33 -33
- package/dist/providers/facebook/actions/boost-post.action.js.map +1 -1
- package/dist/providers/facebook/actions/create-album.action.d.ts.map +1 -1
- package/dist/providers/facebook/actions/create-album.action.js +36 -34
- package/dist/providers/facebook/actions/create-album.action.js.map +1 -1
- package/dist/providers/facebook/actions/create-post.action.d.ts.map +1 -1
- package/dist/providers/facebook/actions/create-post.action.js +20 -20
- package/dist/providers/facebook/actions/create-post.action.js.map +1 -1
- package/dist/providers/facebook/actions/get-page-insights.action.d.ts.map +1 -1
- package/dist/providers/facebook/actions/get-page-insights.action.js +27 -25
- package/dist/providers/facebook/actions/get-page-insights.action.js.map +1 -1
- package/dist/providers/facebook/actions/get-page-posts.action.d.ts.map +1 -1
- package/dist/providers/facebook/actions/get-page-posts.action.js +23 -19
- package/dist/providers/facebook/actions/get-page-posts.action.js.map +1 -1
- package/dist/providers/facebook/actions/get-post-insights.action.d.ts.map +1 -1
- package/dist/providers/facebook/actions/get-post-insights.action.js +32 -28
- package/dist/providers/facebook/actions/get-post-insights.action.js.map +1 -1
- package/dist/providers/facebook/actions/respond-to-comments.action.d.ts.map +1 -1
- package/dist/providers/facebook/actions/respond-to-comments.action.js +44 -42
- package/dist/providers/facebook/actions/respond-to-comments.action.js.map +1 -1
- package/dist/providers/facebook/actions/schedule-post.action.d.ts.map +1 -1
- package/dist/providers/facebook/actions/schedule-post.action.js +29 -29
- package/dist/providers/facebook/actions/schedule-post.action.js.map +1 -1
- package/dist/providers/facebook/actions/search-posts.action.d.ts.map +1 -1
- package/dist/providers/facebook/actions/search-posts.action.js +39 -37
- package/dist/providers/facebook/actions/search-posts.action.js.map +1 -1
- package/dist/providers/facebook/facebook-base.action.d.ts.map +1 -1
- package/dist/providers/facebook/facebook-base.action.js +59 -44
- package/dist/providers/facebook/facebook-base.action.js.map +1 -1
- package/dist/providers/hootsuite/actions/bulk-schedule-posts.action.d.ts.map +1 -1
- package/dist/providers/hootsuite/actions/bulk-schedule-posts.action.js +31 -33
- package/dist/providers/hootsuite/actions/bulk-schedule-posts.action.js.map +1 -1
- package/dist/providers/hootsuite/actions/create-scheduled-post.action.d.ts.map +1 -1
- package/dist/providers/hootsuite/actions/create-scheduled-post.action.js +32 -28
- package/dist/providers/hootsuite/actions/create-scheduled-post.action.js.map +1 -1
- package/dist/providers/hootsuite/actions/delete-scheduled-post.action.d.ts.map +1 -1
- package/dist/providers/hootsuite/actions/delete-scheduled-post.action.js +19 -19
- package/dist/providers/hootsuite/actions/delete-scheduled-post.action.js.map +1 -1
- package/dist/providers/hootsuite/actions/get-analytics.action.d.ts.map +1 -1
- package/dist/providers/hootsuite/actions/get-analytics.action.js +26 -24
- package/dist/providers/hootsuite/actions/get-analytics.action.js.map +1 -1
- package/dist/providers/hootsuite/actions/get-scheduled-posts.action.d.ts.map +1 -1
- package/dist/providers/hootsuite/actions/get-scheduled-posts.action.js +22 -22
- package/dist/providers/hootsuite/actions/get-scheduled-posts.action.js.map +1 -1
- package/dist/providers/hootsuite/actions/get-social-profiles.action.d.ts.map +1 -1
- package/dist/providers/hootsuite/actions/get-social-profiles.action.js +34 -32
- package/dist/providers/hootsuite/actions/get-social-profiles.action.js.map +1 -1
- package/dist/providers/hootsuite/actions/search-posts.action.d.ts.map +1 -1
- package/dist/providers/hootsuite/actions/search-posts.action.js +52 -43
- package/dist/providers/hootsuite/actions/search-posts.action.js.map +1 -1
- package/dist/providers/hootsuite/actions/update-scheduled-post.action.d.ts.map +1 -1
- package/dist/providers/hootsuite/actions/update-scheduled-post.action.js +28 -30
- package/dist/providers/hootsuite/actions/update-scheduled-post.action.js.map +1 -1
- package/dist/providers/hootsuite/hootsuite-base.action.d.ts.map +1 -1
- package/dist/providers/hootsuite/hootsuite-base.action.js +20 -18
- package/dist/providers/hootsuite/hootsuite-base.action.js.map +1 -1
- package/dist/providers/instagram/actions/create-post.action.d.ts.map +1 -1
- package/dist/providers/instagram/actions/create-post.action.js +26 -27
- package/dist/providers/instagram/actions/create-post.action.js.map +1 -1
- package/dist/providers/instagram/actions/create-story.action.d.ts.map +1 -1
- package/dist/providers/instagram/actions/create-story.action.js +35 -35
- package/dist/providers/instagram/actions/create-story.action.js.map +1 -1
- package/dist/providers/instagram/actions/get-account-insights.action.d.ts.map +1 -1
- package/dist/providers/instagram/actions/get-account-insights.action.js +59 -38
- package/dist/providers/instagram/actions/get-account-insights.action.js.map +1 -1
- package/dist/providers/instagram/actions/get-business-posts.action.d.ts.map +1 -1
- package/dist/providers/instagram/actions/get-business-posts.action.js +29 -29
- package/dist/providers/instagram/actions/get-business-posts.action.js.map +1 -1
- package/dist/providers/instagram/actions/get-comments.action.d.ts.map +1 -1
- package/dist/providers/instagram/actions/get-comments.action.js +36 -36
- package/dist/providers/instagram/actions/get-comments.action.js.map +1 -1
- package/dist/providers/instagram/actions/get-post-insights.action.d.ts.map +1 -1
- package/dist/providers/instagram/actions/get-post-insights.action.js +25 -23
- package/dist/providers/instagram/actions/get-post-insights.action.js.map +1 -1
- package/dist/providers/instagram/actions/schedule-post.action.d.ts.map +1 -1
- package/dist/providers/instagram/actions/schedule-post.action.js +25 -25
- package/dist/providers/instagram/actions/schedule-post.action.js.map +1 -1
- package/dist/providers/instagram/actions/search-posts.action.d.ts.map +1 -1
- package/dist/providers/instagram/actions/search-posts.action.js +60 -56
- package/dist/providers/instagram/actions/search-posts.action.js.map +1 -1
- package/dist/providers/instagram/instagram-base.action.d.ts.map +1 -1
- package/dist/providers/instagram/instagram-base.action.js +27 -25
- package/dist/providers/instagram/instagram-base.action.js.map +1 -1
- package/dist/providers/linkedin/actions/create-article.action.d.ts.map +1 -1
- package/dist/providers/linkedin/actions/create-article.action.js +45 -55
- package/dist/providers/linkedin/actions/create-article.action.js.map +1 -1
- package/dist/providers/linkedin/actions/create-post.action.d.ts.map +1 -1
- package/dist/providers/linkedin/actions/create-post.action.js +29 -31
- package/dist/providers/linkedin/actions/create-post.action.js.map +1 -1
- package/dist/providers/linkedin/actions/get-followers.action.d.ts.map +1 -1
- package/dist/providers/linkedin/actions/get-followers.action.js +28 -28
- package/dist/providers/linkedin/actions/get-followers.action.js.map +1 -1
- package/dist/providers/linkedin/actions/get-organization-posts.action.d.ts.map +1 -1
- package/dist/providers/linkedin/actions/get-organization-posts.action.js +20 -20
- package/dist/providers/linkedin/actions/get-organization-posts.action.js.map +1 -1
- package/dist/providers/linkedin/actions/get-personal-posts.action.d.ts.map +1 -1
- package/dist/providers/linkedin/actions/get-personal-posts.action.js +19 -19
- package/dist/providers/linkedin/actions/get-personal-posts.action.js.map +1 -1
- package/dist/providers/linkedin/actions/get-post-analytics.action.d.ts.map +1 -1
- package/dist/providers/linkedin/actions/get-post-analytics.action.js +23 -25
- package/dist/providers/linkedin/actions/get-post-analytics.action.js.map +1 -1
- package/dist/providers/linkedin/actions/schedule-post.action.d.ts.map +1 -1
- package/dist/providers/linkedin/actions/schedule-post.action.js +30 -32
- package/dist/providers/linkedin/actions/schedule-post.action.js.map +1 -1
- package/dist/providers/linkedin/actions/search-posts.action.d.ts.map +1 -1
- package/dist/providers/linkedin/actions/search-posts.action.js +30 -28
- package/dist/providers/linkedin/actions/search-posts.action.js.map +1 -1
- package/dist/providers/linkedin/linkedin-base.action.d.ts.map +1 -1
- package/dist/providers/linkedin/linkedin-base.action.js +38 -33
- package/dist/providers/linkedin/linkedin-base.action.js.map +1 -1
- package/dist/providers/tiktok/tiktok-base.action.d.ts.map +1 -1
- package/dist/providers/tiktok/tiktok-base.action.js +26 -25
- package/dist/providers/tiktok/tiktok-base.action.js.map +1 -1
- package/dist/providers/twitter/actions/create-thread.action.d.ts.map +1 -1
- package/dist/providers/twitter/actions/create-thread.action.js +29 -25
- package/dist/providers/twitter/actions/create-thread.action.js.map +1 -1
- package/dist/providers/twitter/actions/create-tweet.action.d.ts.map +1 -1
- package/dist/providers/twitter/actions/create-tweet.action.js +23 -23
- package/dist/providers/twitter/actions/create-tweet.action.js.map +1 -1
- package/dist/providers/twitter/actions/delete-tweet.action.d.ts.map +1 -1
- package/dist/providers/twitter/actions/delete-tweet.action.js +19 -19
- package/dist/providers/twitter/actions/delete-tweet.action.js.map +1 -1
- package/dist/providers/twitter/actions/get-analytics.action.d.ts.map +1 -1
- package/dist/providers/twitter/actions/get-analytics.action.js +47 -40
- package/dist/providers/twitter/actions/get-analytics.action.js.map +1 -1
- package/dist/providers/twitter/actions/get-mentions.action.d.ts.map +1 -1
- package/dist/providers/twitter/actions/get-mentions.action.js +31 -30
- package/dist/providers/twitter/actions/get-mentions.action.js.map +1 -1
- package/dist/providers/twitter/actions/get-timeline.action.d.ts.map +1 -1
- package/dist/providers/twitter/actions/get-timeline.action.js +29 -29
- package/dist/providers/twitter/actions/get-timeline.action.js.map +1 -1
- package/dist/providers/twitter/actions/schedule-tweet.action.d.ts.map +1 -1
- package/dist/providers/twitter/actions/schedule-tweet.action.js +26 -26
- package/dist/providers/twitter/actions/schedule-tweet.action.js.map +1 -1
- package/dist/providers/twitter/actions/search-tweets.action.d.ts.map +1 -1
- package/dist/providers/twitter/actions/search-tweets.action.js +58 -56
- package/dist/providers/twitter/actions/search-tweets.action.js.map +1 -1
- package/dist/providers/twitter/twitter-base.action.d.ts.map +1 -1
- package/dist/providers/twitter/twitter-base.action.js +68 -58
- package/dist/providers/twitter/twitter-base.action.js.map +1 -1
- package/dist/providers/youtube/youtube-base.action.d.ts +1 -1
- package/dist/providers/youtube/youtube-base.action.d.ts.map +1 -1
- package/dist/providers/youtube/youtube-base.action.js +25 -22
- package/dist/providers/youtube/youtube-base.action.js.map +1 -1
- package/package.json +6 -5
- package/src/base/base-social.action.ts +224 -217
- package/src/providers/buffer/buffer-base.action.ts +441 -435
- package/src/providers/facebook/actions/boost-post.action.ts +386 -350
- package/src/providers/facebook/actions/create-album.action.ts +307 -291
- package/src/providers/facebook/actions/create-post.action.ts +227 -224
- package/src/providers/facebook/actions/get-page-insights.action.ts +403 -383
- package/src/providers/facebook/actions/get-page-posts.action.ts +225 -214
- package/src/providers/facebook/actions/get-post-insights.action.ts +316 -300
- package/src/providers/facebook/actions/respond-to-comments.action.ts +336 -319
- package/src/providers/facebook/actions/schedule-post.action.ts +292 -289
- package/src/providers/facebook/actions/search-posts.action.ts +413 -399
- package/src/providers/facebook/facebook-base.action.ts +670 -653
- package/src/providers/hootsuite/actions/bulk-schedule-posts.action.ts +257 -257
- package/src/providers/hootsuite/actions/create-scheduled-post.action.ts +189 -184
- package/src/providers/hootsuite/actions/delete-scheduled-post.action.ts +161 -160
- package/src/providers/hootsuite/actions/get-analytics.action.ts +254 -249
- package/src/providers/hootsuite/actions/get-scheduled-posts.action.ts +207 -206
- package/src/providers/hootsuite/actions/get-social-profiles.action.ts +205 -206
- package/src/providers/hootsuite/actions/search-posts.action.ts +369 -351
- package/src/providers/hootsuite/actions/update-scheduled-post.action.ts +209 -211
- package/src/providers/hootsuite/hootsuite-base.action.ts +307 -301
- package/src/providers/instagram/actions/create-post.action.ts +296 -276
- package/src/providers/instagram/actions/create-story.action.ts +394 -378
- package/src/providers/instagram/actions/get-account-insights.action.ts +420 -384
- package/src/providers/instagram/actions/get-business-posts.action.ts +242 -233
- package/src/providers/instagram/actions/get-comments.action.ts +377 -365
- package/src/providers/instagram/actions/get-post-insights.action.ts +273 -265
- package/src/providers/instagram/actions/schedule-post.action.ts +235 -233
- package/src/providers/instagram/actions/search-posts.action.ts +538 -512
- package/src/providers/instagram/instagram-base.action.ts +393 -368
- package/src/providers/linkedin/actions/create-article.action.ts +266 -275
- package/src/providers/linkedin/actions/create-post.action.ts +177 -179
- package/src/providers/linkedin/actions/get-followers.action.ts +211 -211
- package/src/providers/linkedin/actions/get-organization-posts.action.ts +147 -146
- package/src/providers/linkedin/actions/get-personal-posts.action.ts +139 -138
- package/src/providers/linkedin/actions/get-post-analytics.action.ts +189 -190
- package/src/providers/linkedin/actions/schedule-post.action.ts +189 -191
- package/src/providers/linkedin/actions/search-posts.action.ts +283 -275
- package/src/providers/linkedin/linkedin-base.action.ts +421 -407
- package/src/providers/tiktok/tiktok-base.action.ts +320 -305
- package/src/providers/twitter/actions/create-thread.action.ts +207 -203
- package/src/providers/twitter/actions/create-tweet.action.ts +188 -187
- package/src/providers/twitter/actions/delete-tweet.action.ts +129 -128
- package/src/providers/twitter/actions/get-analytics.action.ts +411 -402
- package/src/providers/twitter/actions/get-mentions.action.ts +219 -218
- package/src/providers/twitter/actions/get-timeline.action.ts +233 -232
- package/src/providers/twitter/actions/schedule-tweet.action.ts +222 -221
- package/src/providers/twitter/actions/search-tweets.action.ts +543 -540
- package/src/providers/twitter/twitter-base.action.ts +560 -541
- package/src/providers/youtube/youtube-base.action.ts +333 -320
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RegisterClass } from '@memberjunction/global';
|
|
2
2
|
import { InstagramBaseAction } from '../instagram-base.action';
|
|
3
3
|
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
-
import { LogError } from '@memberjunction/
|
|
4
|
+
import { LogError } from '@memberjunction/core';
|
|
5
5
|
import { BaseAction } from '@memberjunction/actions';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -10,405 +10,441 @@ import { BaseAction } from '@memberjunction/actions';
|
|
|
10
10
|
*/
|
|
11
11
|
@RegisterClass(BaseAction, 'Instagram - Get Account Insights')
|
|
12
12
|
export class InstagramGetAccountInsightsAction extends InstagramBaseAction {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
13
|
+
|
|
14
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
15
|
+
try {
|
|
16
|
+
const companyIntegrationId = this.getParamValue(params.Params, 'CompanyIntegrationID');
|
|
17
|
+
const period = this.getParamValue(params.Params, 'Period') || 'day';
|
|
18
|
+
const startDate = this.getParamValue(params.Params, 'StartDate');
|
|
19
|
+
const endDate = this.getParamValue(params.Params, 'EndDate');
|
|
20
|
+
const includeDemographics = this.getParamValue(params.Params, 'IncludeDemographics') !== false;
|
|
21
|
+
|
|
22
|
+
// Initialize OAuth
|
|
23
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
24
|
+
return {
|
|
25
|
+
Success: false,
|
|
26
|
+
Message: 'Failed to initialize Instagram authentication',
|
|
27
|
+
ResultCode: 'AUTH_FAILED'
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Define metrics based on period
|
|
32
|
+
const metrics = this.getAccountMetrics(period);
|
|
33
|
+
|
|
34
|
+
// Get account insights
|
|
35
|
+
const insights = await this.getInsights(
|
|
36
|
+
this.instagramBusinessAccountId,
|
|
37
|
+
metrics,
|
|
38
|
+
period as any
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
// Parse insights data
|
|
42
|
+
const parsedInsights = this.parseAccountInsights(insights);
|
|
43
|
+
|
|
44
|
+
// Get account info
|
|
45
|
+
const accountInfo = await this.getAccountInfo();
|
|
46
|
+
|
|
47
|
+
// Get demographics if requested
|
|
48
|
+
let demographics = null;
|
|
49
|
+
if (includeDemographics) {
|
|
50
|
+
demographics = await this.getAccountDemographics();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Get content performance summary
|
|
54
|
+
const contentSummary = await this.getContentPerformanceSummary(startDate, endDate);
|
|
55
|
+
|
|
56
|
+
// Calculate growth metrics
|
|
57
|
+
const growthMetrics = this.calculateGrowthMetrics(parsedInsights, accountInfo);
|
|
58
|
+
|
|
59
|
+
// Store result in output params
|
|
60
|
+
const outputParams = [...params.Params];
|
|
61
|
+
outputParams.push({
|
|
62
|
+
Name: 'ResultData',
|
|
63
|
+
Type: 'Output',
|
|
64
|
+
Value: JSON.stringify({
|
|
65
|
+
account: {
|
|
66
|
+
id: this.instagramBusinessAccountId,
|
|
67
|
+
username: accountInfo.username,
|
|
68
|
+
name: accountInfo.name,
|
|
69
|
+
biography: accountInfo.biography,
|
|
70
|
+
followersCount: accountInfo.followers_count,
|
|
71
|
+
followsCount: accountInfo.follows_count,
|
|
72
|
+
mediaCount: accountInfo.media_count,
|
|
73
|
+
profilePictureUrl: accountInfo.profile_picture_url,
|
|
74
|
+
websiteUrl: accountInfo.website
|
|
75
|
+
},
|
|
76
|
+
insights: parsedInsights,
|
|
77
|
+
demographics,
|
|
78
|
+
growth: growthMetrics,
|
|
79
|
+
contentPerformance: contentSummary,
|
|
80
|
+
period,
|
|
81
|
+
dataCollectedAt: new Date().toISOString()
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
Success: true,
|
|
87
|
+
Message: 'Successfully retrieved Instagram account insights',
|
|
88
|
+
ResultCode: 'SUCCESS',
|
|
89
|
+
Params: outputParams
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
} catch (error: any) {
|
|
93
|
+
LogError('Failed to retrieve Instagram account insights', error);
|
|
94
|
+
|
|
95
|
+
if (error.code === 'RATE_LIMIT') {
|
|
96
|
+
return {
|
|
97
|
+
Success: false,
|
|
98
|
+
Message: 'Instagram API rate limit exceeded. Please try again later.',
|
|
99
|
+
ResultCode: 'RATE_LIMIT'
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (error.code === 'INSUFFICIENT_PERMISSIONS') {
|
|
104
|
+
return {
|
|
105
|
+
Success: false,
|
|
106
|
+
Message: 'Insufficient permissions to access Instagram account insights',
|
|
107
|
+
ResultCode: 'INSUFFICIENT_PERMISSIONS'
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return {
|
|
112
|
+
Success: false,
|
|
113
|
+
Message: `Failed to retrieve account insights: ${error.message}`,
|
|
114
|
+
ResultCode: 'ERROR'
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
}
|
|
96
118
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Get appropriate metrics based on period
|
|
121
|
+
*/
|
|
122
|
+
private getAccountMetrics(period: string): string[] {
|
|
123
|
+
const baseMetrics = [
|
|
124
|
+
'impressions',
|
|
125
|
+
'reach',
|
|
126
|
+
'profile_views',
|
|
127
|
+
'website_clicks'
|
|
128
|
+
];
|
|
129
|
+
|
|
130
|
+
if (period === 'day') {
|
|
131
|
+
return [
|
|
132
|
+
...baseMetrics,
|
|
133
|
+
'follower_count',
|
|
134
|
+
'email_contacts',
|
|
135
|
+
'phone_call_clicks',
|
|
136
|
+
'text_message_clicks',
|
|
137
|
+
'get_directions_clicks'
|
|
138
|
+
];
|
|
139
|
+
} else if (period === 'week' || period === 'days_28') {
|
|
140
|
+
return [
|
|
141
|
+
...baseMetrics,
|
|
142
|
+
'accounts_engaged'
|
|
143
|
+
];
|
|
144
|
+
}
|
|
104
145
|
|
|
105
|
-
|
|
106
|
-
Success: false,
|
|
107
|
-
Message: `Failed to retrieve account insights: ${error.message}`,
|
|
108
|
-
ResultCode: 'ERROR',
|
|
109
|
-
};
|
|
146
|
+
return baseMetrics;
|
|
110
147
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Get account information
|
|
151
|
+
*/
|
|
152
|
+
private async getAccountInfo(): Promise<any> {
|
|
153
|
+
const response = await this.makeInstagramRequest(
|
|
154
|
+
this.instagramBusinessAccountId,
|
|
155
|
+
'GET',
|
|
156
|
+
null,
|
|
157
|
+
{
|
|
158
|
+
fields: 'username,name,biography,followers_count,follows_count,media_count,profile_picture_url,website',
|
|
159
|
+
access_token: this.getAccessToken()
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
return response;
|
|
123
164
|
}
|
|
124
165
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
parsed
|
|
179
|
-
|
|
166
|
+
/**
|
|
167
|
+
* Get account demographics
|
|
168
|
+
*/
|
|
169
|
+
private async getAccountDemographics(): Promise<any> {
|
|
170
|
+
try {
|
|
171
|
+
// Get follower demographics
|
|
172
|
+
const demographicMetrics = [
|
|
173
|
+
'audience_city',
|
|
174
|
+
'audience_country',
|
|
175
|
+
'audience_gender_age',
|
|
176
|
+
'audience_locale',
|
|
177
|
+
'online_followers'
|
|
178
|
+
];
|
|
179
|
+
|
|
180
|
+
const demographics = await this.getInsights(
|
|
181
|
+
this.instagramBusinessAccountId,
|
|
182
|
+
demographicMetrics,
|
|
183
|
+
'lifetime'
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
// Parse demographic data
|
|
187
|
+
const parsed: any = {
|
|
188
|
+
locations: {
|
|
189
|
+
cities: {},
|
|
190
|
+
countries: {}
|
|
191
|
+
},
|
|
192
|
+
genderAge: {},
|
|
193
|
+
languages: {},
|
|
194
|
+
onlineHours: {}
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
demographics.forEach((metric: any) => {
|
|
198
|
+
const value = metric.values?.[0]?.value;
|
|
199
|
+
|
|
200
|
+
switch (metric.name) {
|
|
201
|
+
case 'audience_city':
|
|
202
|
+
parsed.locations.cities = value || {};
|
|
203
|
+
break;
|
|
204
|
+
case 'audience_country':
|
|
205
|
+
parsed.locations.countries = value || {};
|
|
206
|
+
break;
|
|
207
|
+
case 'audience_gender_age':
|
|
208
|
+
parsed.genderAge = this.parseGenderAge(value || {});
|
|
209
|
+
break;
|
|
210
|
+
case 'audience_locale':
|
|
211
|
+
parsed.languages = value || {};
|
|
212
|
+
break;
|
|
213
|
+
case 'online_followers':
|
|
214
|
+
parsed.onlineHours = this.parseOnlineHours(value || {});
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
return parsed;
|
|
220
|
+
} catch (error) {
|
|
221
|
+
LogError('Failed to get demographics', error);
|
|
222
|
+
return null;
|
|
180
223
|
}
|
|
181
|
-
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Parse gender/age demographics
|
|
228
|
+
*/
|
|
229
|
+
private parseGenderAge(data: any): any {
|
|
230
|
+
const parsed: any = {
|
|
231
|
+
male: {},
|
|
232
|
+
female: {},
|
|
233
|
+
unknown: {}
|
|
234
|
+
};
|
|
182
235
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
236
|
+
Object.keys(data).forEach(key => {
|
|
237
|
+
const [gender, ageRange] = key.split('.');
|
|
238
|
+
if (parsed[gender]) {
|
|
239
|
+
parsed[gender][ageRange] = data[key];
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
return parsed;
|
|
187
244
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
const [gender, ageRange] = key.split('.');
|
|
202
|
-
if (parsed[gender]) {
|
|
203
|
-
parsed[gender][ageRange] = data[key];
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
return parsed;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Parse online hours data
|
|
212
|
-
*/
|
|
213
|
-
private parseOnlineHours(data: any): any {
|
|
214
|
-
const parsed: any = {};
|
|
215
|
-
|
|
216
|
-
Object.keys(data).forEach((hour) => {
|
|
217
|
-
parsed[hour] = {
|
|
218
|
-
count: data[hour],
|
|
219
|
-
hour: parseInt(hour),
|
|
220
|
-
label: `${hour}:00`,
|
|
221
|
-
};
|
|
222
|
-
});
|
|
223
|
-
|
|
224
|
-
return parsed;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Get content performance summary
|
|
229
|
-
*/
|
|
230
|
-
private async getContentPerformanceSummary(startDate?: string, endDate?: string): Promise<any> {
|
|
231
|
-
try {
|
|
232
|
-
// Get recent posts
|
|
233
|
-
const queryParams: any = {
|
|
234
|
-
fields: 'id,media_type,like_count,comments_count,timestamp',
|
|
235
|
-
access_token: this.getAccessToken(),
|
|
236
|
-
limit: 50,
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
if (startDate) {
|
|
240
|
-
queryParams.since = Math.floor(new Date(startDate).getTime() / 1000);
|
|
241
|
-
}
|
|
242
|
-
if (endDate) {
|
|
243
|
-
queryParams.until = Math.floor(new Date(endDate).getTime() / 1000);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
const response = await this.makeInstagramRequest<{ data: any[] }>(
|
|
247
|
-
`${this.instagramBusinessAccountId}/media`,
|
|
248
|
-
'GET',
|
|
249
|
-
null,
|
|
250
|
-
queryParams
|
|
251
|
-
);
|
|
252
|
-
|
|
253
|
-
const posts = response.data || [];
|
|
254
|
-
|
|
255
|
-
// Calculate performance metrics
|
|
256
|
-
const summary = {
|
|
257
|
-
totalPosts: posts.length,
|
|
258
|
-
avgLikes: 0,
|
|
259
|
-
avgComments: 0,
|
|
260
|
-
totalEngagements: 0,
|
|
261
|
-
topPerformingPost: null as any,
|
|
262
|
-
mediaTypeBreakdown: {
|
|
263
|
-
IMAGE: 0,
|
|
264
|
-
VIDEO: 0,
|
|
265
|
-
CAROUSEL_ALBUM: 0,
|
|
266
|
-
REELS: 0,
|
|
267
|
-
},
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
if (posts.length > 0) {
|
|
271
|
-
let totalLikes = 0;
|
|
272
|
-
let totalComments = 0;
|
|
273
|
-
let topPost = posts[0];
|
|
274
|
-
|
|
275
|
-
posts.forEach((post) => {
|
|
276
|
-
totalLikes += post.like_count || 0;
|
|
277
|
-
totalComments += post.comments_count || 0;
|
|
278
|
-
|
|
279
|
-
// Track media types
|
|
280
|
-
if (summary.mediaTypeBreakdown[post.media_type] !== undefined) {
|
|
281
|
-
summary.mediaTypeBreakdown[post.media_type]++;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
// Find top performing post
|
|
285
|
-
const engagement = (post.like_count || 0) + (post.comments_count || 0);
|
|
286
|
-
const topEngagement = (topPost.like_count || 0) + (topPost.comments_count || 0);
|
|
287
|
-
if (engagement > topEngagement) {
|
|
288
|
-
topPost = post;
|
|
289
|
-
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Parse online hours data
|
|
248
|
+
*/
|
|
249
|
+
private parseOnlineHours(data: any): any {
|
|
250
|
+
const parsed: any = {};
|
|
251
|
+
|
|
252
|
+
Object.keys(data).forEach(hour => {
|
|
253
|
+
parsed[hour] = {
|
|
254
|
+
count: data[hour],
|
|
255
|
+
hour: parseInt(hour),
|
|
256
|
+
label: `${hour}:00`
|
|
257
|
+
};
|
|
290
258
|
});
|
|
291
259
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
260
|
+
return parsed;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Get content performance summary
|
|
265
|
+
*/
|
|
266
|
+
private async getContentPerformanceSummary(startDate?: string, endDate?: string): Promise<any> {
|
|
267
|
+
try {
|
|
268
|
+
// Get recent posts
|
|
269
|
+
const queryParams: any = {
|
|
270
|
+
fields: 'id,media_type,like_count,comments_count,timestamp',
|
|
271
|
+
access_token: this.getAccessToken(),
|
|
272
|
+
limit: 50
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
if (startDate) {
|
|
276
|
+
queryParams.since = Math.floor(new Date(startDate).getTime() / 1000);
|
|
277
|
+
}
|
|
278
|
+
if (endDate) {
|
|
279
|
+
queryParams.until = Math.floor(new Date(endDate).getTime() / 1000);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
const response = await this.makeInstagramRequest<{ data: any[] }>(
|
|
283
|
+
`${this.instagramBusinessAccountId}/media`,
|
|
284
|
+
'GET',
|
|
285
|
+
null,
|
|
286
|
+
queryParams
|
|
287
|
+
);
|
|
288
|
+
|
|
289
|
+
const posts = response.data || [];
|
|
290
|
+
|
|
291
|
+
// Calculate performance metrics
|
|
292
|
+
const summary = {
|
|
293
|
+
totalPosts: posts.length,
|
|
294
|
+
avgLikes: 0,
|
|
295
|
+
avgComments: 0,
|
|
296
|
+
totalEngagements: 0,
|
|
297
|
+
topPerformingPost: null as any,
|
|
298
|
+
mediaTypeBreakdown: {
|
|
299
|
+
IMAGE: 0,
|
|
300
|
+
VIDEO: 0,
|
|
301
|
+
CAROUSEL_ALBUM: 0,
|
|
302
|
+
REELS: 0
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
if (posts.length > 0) {
|
|
307
|
+
let totalLikes = 0;
|
|
308
|
+
let totalComments = 0;
|
|
309
|
+
let topPost = posts[0];
|
|
310
|
+
|
|
311
|
+
posts.forEach(post => {
|
|
312
|
+
totalLikes += post.like_count || 0;
|
|
313
|
+
totalComments += post.comments_count || 0;
|
|
314
|
+
|
|
315
|
+
// Track media types
|
|
316
|
+
if (summary.mediaTypeBreakdown[post.media_type] !== undefined) {
|
|
317
|
+
summary.mediaTypeBreakdown[post.media_type]++;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// Find top performing post
|
|
321
|
+
const engagement = (post.like_count || 0) + (post.comments_count || 0);
|
|
322
|
+
const topEngagement = (topPost.like_count || 0) + (topPost.comments_count || 0);
|
|
323
|
+
if (engagement > topEngagement) {
|
|
324
|
+
topPost = post;
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
summary.avgLikes = Math.round(totalLikes / posts.length);
|
|
329
|
+
summary.avgComments = Math.round(totalComments / posts.length);
|
|
330
|
+
summary.totalEngagements = totalLikes + totalComments;
|
|
331
|
+
summary.topPerformingPost = {
|
|
332
|
+
id: topPost.id,
|
|
333
|
+
likes: topPost.like_count,
|
|
334
|
+
comments: topPost.comments_count,
|
|
335
|
+
engagement: (topPost.like_count || 0) + (topPost.comments_count || 0),
|
|
336
|
+
publishedAt: topPost.timestamp
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
return summary;
|
|
341
|
+
} catch (error) {
|
|
342
|
+
LogError('Failed to get content performance', error);
|
|
343
|
+
return null;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Parse account insights
|
|
349
|
+
*/
|
|
350
|
+
private parseAccountInsights(insights: any[]): Record<string, any> {
|
|
351
|
+
const parsed: Record<string, any> = {};
|
|
352
|
+
|
|
353
|
+
insights.forEach(metric => {
|
|
354
|
+
const name = metric.name;
|
|
355
|
+
const values = metric.values || [];
|
|
356
|
+
|
|
357
|
+
if (values.length > 0) {
|
|
358
|
+
parsed[name] = {
|
|
359
|
+
value: values[0].value || 0,
|
|
360
|
+
title: metric.title,
|
|
361
|
+
description: metric.description,
|
|
362
|
+
period: metric.period
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
// For time series data
|
|
366
|
+
if (values.length > 1) {
|
|
367
|
+
parsed[name].timeSeries = values.map((v: any) => ({
|
|
368
|
+
value: v.value,
|
|
369
|
+
endTime: v.end_time
|
|
370
|
+
}));
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
});
|
|
303
374
|
|
|
304
|
-
|
|
305
|
-
} catch (error) {
|
|
306
|
-
LogError('Failed to get content performance', error);
|
|
307
|
-
return null;
|
|
375
|
+
return parsed;
|
|
308
376
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
if (values.length > 0) {
|
|
322
|
-
parsed[name] = {
|
|
323
|
-
value: values[0].value || 0,
|
|
324
|
-
title: metric.title,
|
|
325
|
-
description: metric.description,
|
|
326
|
-
period: metric.period,
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Calculate growth metrics
|
|
380
|
+
*/
|
|
381
|
+
private calculateGrowthMetrics(insights: any, accountInfo: any): any {
|
|
382
|
+
const growth: any = {
|
|
383
|
+
followersGrowth: 0,
|
|
384
|
+
followersGrowthRate: 0,
|
|
385
|
+
reachGrowth: 0,
|
|
386
|
+
impressionsGrowth: 0,
|
|
387
|
+
engagementRate: 0
|
|
327
388
|
};
|
|
328
389
|
|
|
329
|
-
//
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
390
|
+
// Calculate follower growth if we have time series data
|
|
391
|
+
const followerData = insights.follower_count;
|
|
392
|
+
if (followerData?.timeSeries && followerData.timeSeries.length > 1) {
|
|
393
|
+
const firstValue = followerData.timeSeries[0].value;
|
|
394
|
+
const lastValue = followerData.timeSeries[followerData.timeSeries.length - 1].value;
|
|
395
|
+
growth.followersGrowth = lastValue - firstValue;
|
|
396
|
+
|
|
397
|
+
if (firstValue > 0) {
|
|
398
|
+
growth.followersGrowthRate = ((lastValue - firstValue) / firstValue) * 100;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// Calculate engagement rate
|
|
403
|
+
const reach = insights.reach?.value || 0;
|
|
404
|
+
const profileViews = insights.profile_views?.value || 0;
|
|
405
|
+
const websiteClicks = insights.website_clicks?.value || 0;
|
|
406
|
+
|
|
407
|
+
if (reach > 0) {
|
|
408
|
+
const totalEngagements = profileViews + websiteClicks;
|
|
409
|
+
growth.engagementRate = (totalEngagements / reach) * 100;
|
|
335
410
|
}
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
return parsed;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Calculate growth metrics
|
|
344
|
-
*/
|
|
345
|
-
private calculateGrowthMetrics(insights: any, accountInfo: any): any {
|
|
346
|
-
const growth: any = {
|
|
347
|
-
followersGrowth: 0,
|
|
348
|
-
followersGrowthRate: 0,
|
|
349
|
-
reachGrowth: 0,
|
|
350
|
-
impressionsGrowth: 0,
|
|
351
|
-
engagementRate: 0,
|
|
352
|
-
};
|
|
353
|
-
|
|
354
|
-
// Calculate follower growth if we have time series data
|
|
355
|
-
const followerData = insights.follower_count;
|
|
356
|
-
if (followerData?.timeSeries && followerData.timeSeries.length > 1) {
|
|
357
|
-
const firstValue = followerData.timeSeries[0].value;
|
|
358
|
-
const lastValue = followerData.timeSeries[followerData.timeSeries.length - 1].value;
|
|
359
|
-
growth.followersGrowth = lastValue - firstValue;
|
|
360
|
-
|
|
361
|
-
if (firstValue > 0) {
|
|
362
|
-
growth.followersGrowthRate = ((lastValue - firstValue) / firstValue) * 100;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
411
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
const profileViews = insights.profile_views?.value || 0;
|
|
369
|
-
const websiteClicks = insights.website_clicks?.value || 0;
|
|
412
|
+
return growth;
|
|
413
|
+
}
|
|
370
414
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
415
|
+
/**
|
|
416
|
+
* Define the parameters for this action
|
|
417
|
+
*/
|
|
418
|
+
public get Params(): ActionParam[] {
|
|
419
|
+
return [
|
|
420
|
+
...this.commonSocialParams,
|
|
421
|
+
{
|
|
422
|
+
Name: 'Period',
|
|
423
|
+
Type: 'Input',
|
|
424
|
+
Value: 'day'
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
Name: 'StartDate',
|
|
428
|
+
Type: 'Input',
|
|
429
|
+
Value: null
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
Name: 'EndDate',
|
|
433
|
+
Type: 'Input',
|
|
434
|
+
Value: null
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
Name: 'IncludeDemographics',
|
|
438
|
+
Type: 'Input',
|
|
439
|
+
Value: true
|
|
440
|
+
}
|
|
441
|
+
];
|
|
374
442
|
}
|
|
375
443
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
return [
|
|
384
|
-
...this.commonSocialParams,
|
|
385
|
-
{
|
|
386
|
-
Name: 'Period',
|
|
387
|
-
Type: 'Input',
|
|
388
|
-
Value: 'day',
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
Name: 'StartDate',
|
|
392
|
-
Type: 'Input',
|
|
393
|
-
Value: null,
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
Name: 'EndDate',
|
|
397
|
-
Type: 'Input',
|
|
398
|
-
Value: null,
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
Name: 'IncludeDemographics',
|
|
402
|
-
Type: 'Input',
|
|
403
|
-
Value: true,
|
|
404
|
-
},
|
|
405
|
-
];
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
/**
|
|
409
|
-
* Get the description for this action
|
|
410
|
-
*/
|
|
411
|
-
public get Description(): string {
|
|
412
|
-
return 'Retrieves comprehensive account-level insights including follower demographics, reach, impressions, and growth metrics.';
|
|
413
|
-
}
|
|
414
|
-
}
|
|
444
|
+
/**
|
|
445
|
+
* Get the description for this action
|
|
446
|
+
*/
|
|
447
|
+
public get Description(): string {
|
|
448
|
+
return 'Retrieves comprehensive account-level insights including follower demographics, reach, impressions, and growth metrics.';
|
|
449
|
+
}
|
|
450
|
+
}
|