Skip to content

Support for Live Broadcasts#462

Open
gmarziou wants to merge 1 commit into
claudiob:masterfrom
gmarziou:LiveBroadcasts
Open

Support for Live Broadcasts#462
gmarziou wants to merge 1 commit into
claudiob:masterfrom
gmarziou:LiveBroadcasts

Conversation

@gmarziou

Copy link
Copy Markdown

This PR implements LiveBroadcast resource and collection.

To create a alive broadcast:

    params = {
      title: title, description: description, privacy_status: privacy_status,
      scheduled_start_time: scheduled_start_time, scheduled_end_time: scheduled_end_time,
      default_language: "en"
    }
    account.create_live_broadcast(**params)

To list all live broadcasts of an account/channel:

account(email).live_broadcasts

Fix #461

@kangkyu

kangkyu commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

@gmarziou thank you for opening a pr! I will try and get back to you

@kangkyu kangkyu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

params and body can be handled differently, I think we can use more existing methods. For example:

def insert_params
  super.tap {|p| p[:part] = "snippet,status"}
end

Comment thread lib/yt/models/account.rb Outdated
Comment thread lib/yt/models/account.rb Outdated
Comment on lines +60 to +64
def insert_parts
snippet = {keys: [:title, :description], sanitize_brackets: true}
status = {keys: [:privacy_status]}
{snippet: snippet, status: status}
end

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you might have wanted to use insert_parts in insert method in this class.

Comment on lines +35 to +37
def insert
do_insert
end

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this insert method may not be used.

This PR implements LiveBroadcast resource and collection.

To create a alive broadcast:

```ruby
    params = {
      title: title, description: description, privacy_status: privacy_status,
      scheduled_start_time: scheduled_start_time, scheduled_end_time: scheduled_end_time,
      default_language: "en"
    }
    account.create_live_broadcast(**params)
 ```

To list all live broadcasts of an account/channel:

```ruby
account(email).live_broadcasts
```

Fix claudiob#461
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for LiveBroadcasts

2 participants