Skip to content

Commit

Permalink
solve post video init method
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Sep 19, 2024
1 parent 78513bc commit 57ee975
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tiktok/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tiktok/tiktok.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 57ee975

Please sign in to comment.