diff --git a/clips.go b/clips.go index 55ce7b8..c148dc8 100644 --- a/clips.go +++ b/clips.go @@ -85,10 +85,12 @@ func (ccr *CreateClipResponse) GetClipsCreationRateLimitRemaining() int { } type CreateClipParams struct { + // BroadcasterID The ID of the broadcaster whose stream you want to create a clip from. BroadcasterID string `query:"broadcaster_id"` - - // Optional - HasDelay bool `query:"has_delay,false"` + // Optional. The title of the clip. + Title string `query:"title"` + // Optional. The length of the clip in seconds. Possible values range from 5 to 60 inclusively with a precision of 0.1. The default is 30. + Duration float32 `query:"duration"` } // CreateClip creates a clip programmatically. This returns both an ID and diff --git a/clips_test.go b/clips_test.go index c015863..f723b6f 100644 --- a/clips_test.go +++ b/clips_test.go @@ -122,6 +122,14 @@ func TestCreateClip(t *testing.T) { "600", "598", }, + { + http.StatusAccepted, + &Options{ClientID: "my-client-id"}, + &CreateClipParams{BroadcasterID: "26490481", Title: "Title", Duration: 0.5}, // summit1g + `{"data":[{"id":"IronicHedonisticOryxSquadGoals","edit_url":"https://clips.twitch.tv/IronicHedonisticOryxSquadGoals/edit"}]}`, + "600", + "598", + }, { http.StatusUnauthorized, &Options{ClientID: "my-client-id"},