From 57ee975743cf7e1a3518c2ad093aa42a759be39b Mon Sep 17 00:00:00 2001 From: Allan Nava Date: Thu, 19 Sep 2024 15:54:55 +0200 Subject: [PATCH] solve post video init method --- tiktok/content.go | 8 ++++---- tiktok/tiktok.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tiktok/content.go b/tiktok/content.go index 342f32e..8f204c5 100644 --- a/tiktok/content.go +++ b/tiktok/content.go @@ -61,7 +61,7 @@ curl --location 'https://open.tiktokapis.com/v2/post/publish/video/init/' \ } }' */ -func (o *tiktok) PostVideoInit(title, videoUrl string, privacyLevel string) (*PublishVideoResponse, error) { +func (o *tiktok) PostVideoInit(title, videoUrl string, privacyLevel string, disableDuet, disableComment, disableStitch bool) (*PublishVideoResponse, error) { if !CheckPrivacyLevel(privacyLevel) { return nil, PrivacyLevelWrong } @@ -70,9 +70,9 @@ func (o *tiktok) PostVideoInit(title, videoUrl string, privacyLevel string) (*Pu PostInfo: PostInfo{ Title: title, PrivacyLevel: privacyLevel, - DisableDuet: false, - DisableComment: false, - DisableStitch: false, + DisableDuet: disableDuet, + DisableComment: disableComment, + DisableStitch: disableStitch, }, SourceInfo: SourceInfo{ Source: "PULL_FROM_URL", diff --git a/tiktok/tiktok.go b/tiktok/tiktok.go index b51fc3b..900e90b 100644 --- a/tiktok/tiktok.go +++ b/tiktok/tiktok.go @@ -15,7 +15,7 @@ type ITiktok interface { // GetClientAccessTokenManagement() (*AccessTokenManagement, error) CreatorInfo() (*QueryCreatorInfoResponse, error) - PostVideoInit(title, videoUrl string, privacyLevel string) (*PublishVideoResponse, error) + PostVideoInit(title, videoUrl string, privacyLevel string, disableDuet, disableComment, disableStitch bool) (*PublishVideoResponse, error) PublishVideo(publishId string) (*PublishStatusFetchResponse, error) GetVideoList(count int64) (*VideoListResponse, error) PostPhotoInit(title, description, privacyLevel string, photoUrls []string, photoMode string) (*PublishStatusFetchResponse, error)