Skip to content

Captions associated with a video#419

Merged
kangkyu merged 4 commits into
masterfrom
captions
Oct 3, 2023
Merged

Captions associated with a video#419
kangkyu merged 4 commits into
masterfrom
captions

Conversation

@kangkyu

@kangkyu kangkyu commented Oct 3, 2023

Copy link
Copy Markdown
Collaborator

After this change, we can do something like this

v = Yt::Video.new(id: "8ompJkDKEEI")
c = v.captions.first
c.language
# => "es"

closes #413

- add 'bin/console' exec (not use 'bundle console')
- git ignore vcr cassettes (have your own local cassettes)
- remove coveralls for tests
@kangkyu kangkyu requested a review from justinhoward October 3, 2023 08:17
@kangkyu kangkyu self-assigned this Oct 3, 2023
@justinhoward

Copy link
Copy Markdown
Contributor

The captions addition looks good to me. Does the removal of cassettes mean that tests will now only run whenever someone has set the following env variables? And they will always test against live data?

YT_TEST_CLIENT_ID
YT_TEST_CLIENT_SECRET
YT_TEST_API_KEY
YT_TEST_REFRESH_TOKEN

Did you test running the suite from scratch to see if that works?

@kangkyu

kangkyu commented Oct 3, 2023

Copy link
Copy Markdown
Collaborator Author

Yes, I ran test with those env variables and it passed. As you may know I couldn't run as_content_owner test because I don't have access to any content owner on YouTube. By the way, that test actually currently disabled like https://github.com/nullscreen/yt/blob/master/.rspec#L2 so I was able to simply run rspec

yt (captions) $ rspec
Run options: exclude {:slow=>true}

Randomized with seed 53975
....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Finished in 1 minute 29.11 seconds (files took 0.75296 seconds to load)
724 examples, 0 failures

Randomized with seed 53975

Coverage report generated for RSpec to /Users/kangkyu/code/yt/coverage. 5678 / 6039 LOC (94.02%) covered.

@justinhoward justinhoward left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice!

@kangkyu kangkyu merged commit 71cb685 into master Oct 3, 2023
@kangkyu kangkyu deleted the captions branch September 16, 2025 17:22
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.

Captions API

2 participants