Skip to content

Commit

Permalink
added model content
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Jul 25, 2024
1 parent 242eb98 commit 68a275d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tiktok/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ curl --location 'https://open.tiktokapis.com/v2/post/publish/video/init/' \
"video_cover_timestamp_ms": 1000
},
"source_info": {
"source": "FILE_UPLOAD",
"video_size": 50000123,
"chunk_size": 10000000,
"total_chunk_count": 5
"source": "PULL_FROM_URL",
"video_url": "https://example.verified.domain.com/example_video.mp4",
}
}'
*/
Expand Down
42 changes: 42 additions & 0 deletions tiktok/model_content.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package tiktok

/*
{
"data":{
"creator_avatar_url": "https://lf16-tt4d.tiktokcdn.com/obj/tiktok-open-platform/8d5740ac3844be417beeacd0df75aef1",
"creator_username": "tiktok",
"creator_nickname": "TikTok Official",
"privacy_level_options": ["PUBLIC_TO_EVERYONE", "MUTUAL_FOLLOW_FRIENDS", "SELF_ONLY"]
"comment_disabled": false,
"duet_disabled": false,
"stitch_disabled": true,
"max_video_post_duration_sec": 300
},
"error": {
"code": "ok",
"message": "",
"log_id": "202210112248442CB9319E1FB30C1073F3"
}
}
*/

type QueryCreatorInfoResponse struct {
Data DataQueryCreatorInfo `json:"data"`
Error ErrorQueryCreatorInfo `json:"error"`
}

type DataQueryCreatorInfo struct {
CreatorAvatarUrl string `json:"creator_avatar_url"`
CreatorUsername string `json:"creator_username"`
CreatorNickname string `json:"creator_nickname"`
PrivacyLevelOptions []string `json:"privacy_level_options"`
CommentDisabled bool `json:"comment_disabled"`
DuetDisabled bool `json:"duet_disabled"`
StitchDisabled bool `json:"stitch_disabled"`
}

type ErrorQueryCreatorInfo struct {
Code string `json:"code"`
Message string `json:"message"`
LogId string `json:"log_id"`
}

0 comments on commit 68a275d

Please sign in to comment.