Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ export class FacebookProvider extends SocialAbstract implements SocialProvider {
// by post_total_media_view_unique (unique media views = reach), available on
// Graph API v23.0+. Engagement metrics below are unaffected.
const { data } = await (
await this.fetch(
await fetch(
`https://graph.facebook.com/v23.0/${postId}/insights?metric=post_total_media_view_unique,post_reactions_by_type_total,post_clicks,post_clicks_by_type&access_token=${accessToken}`
)
).json();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ export class InstagramProvider
try {
// Fetch media insights from Instagram Graph API
const { data } = await (
await this.fetch(
await fetch(
`https://${type}/v21.0/${postId}/insights?metric=views,reach,saved,likes,comments,shares&access_token=${accessToken}`
)
).json();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ export class LinkedinPageProvider

const { elements: shareElements }: { elements: PostShareStatElement[] } =
await (
await this.fetch(shareStatsUrl, {
await fetch(shareStatsUrl, {
headers: {
Authorization: `Bearer ${accessToken}`,
'LinkedIn-Version': '202601',
Expand All @@ -449,7 +449,7 @@ export class LinkedinPageProvider
postId
)}`;
socialActions = await (
await this.fetch(socialActionsUrl, {
await fetch(socialActionsUrl, {
headers: {
Authorization: `Bearer ${accessToken}`,
'LinkedIn-Version': '202601',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ export class PinterestProvider

try {
// Fetch pin analytics from Pinterest API
const response = await this.fetch(
const response = await fetch(
`https://api.pinterest.com/v5/pins/${postId}/analytics?start_date=${since}&end_date=${today}&metric_types=IMPRESSION,PIN_CLICK,OUTBOUND_CLICK,SAVE`,
{
method: 'GET',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ export class ThreadsProvider extends SocialAbstract implements SocialProvider {
try {
// Fetch thread insights from Threads API
const { data } = await (
await this.fetch(
await fetch(
`https://graph.threads.net/v1.0/${postId}/insights?metric=views,likes,replies,reposts,quotes&access_token=${accessToken}`
)
).json();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ export class TiktokProvider extends SocialAbstract implements SocialProvider {

try {
// Get user stats (follower_count, following_count, likes_count, video_count)
const userStatsResponse = await this.fetch(
const userStatsResponse = await fetch(
'https://open.tiktokapis.com/v2/user/info/?fields=follower_count,following_count,likes_count,video_count',
{
method: 'GET',
Expand Down Expand Up @@ -910,7 +910,7 @@ export class TiktokProvider extends SocialAbstract implements SocialProvider {
}

// Get recent videos and aggregate their stats
const videoListResponse = await this.fetch(
const videoListResponse = await fetch(
'https://open.tiktokapis.com/v2/video/list/?fields=id',
{
method: 'POST',
Expand All @@ -929,7 +929,7 @@ export class TiktokProvider extends SocialAbstract implements SocialProvider {
const videoIds = videos.map((v: { id: string }) => v.id);

// Query video details to get engagement metrics
const videoQueryResponse = await this.fetch(
const videoQueryResponse = await fetch(
'https://open.tiktokapis.com/v2/video/query/?fields=id,like_count,comment_count,share_count,view_count',
{
method: 'POST',
Expand Down Expand Up @@ -1036,7 +1036,7 @@ export class TiktokProvider extends SocialAbstract implements SocialProvider {

if (postId.indexOf('v_pub_url') > -1) {
const post = await (
await this.fetch(
await fetch(
'https://open.tiktokapis.com/v2/post/publish/status/fetch/',
{
method: 'POST',
Expand All @@ -1047,10 +1047,7 @@ export class TiktokProvider extends SocialAbstract implements SocialProvider {
body: JSON.stringify({
publish_id: postId,
}),
},
'',
0,
true
}
)
).json();

Expand All @@ -1063,7 +1060,7 @@ export class TiktokProvider extends SocialAbstract implements SocialProvider {

try {
// Query video details using the video ID
const response = await this.fetch(
const response = await fetch(
'https://open.tiktokapis.com/v2/video/query/?fields=id,like_count,comment_count,share_count,view_count',
{
method: 'POST',
Expand Down
Loading