0

I'm using the YouTube Data API v3 with Ruby. In the channels.list (list_channels) method, I noticed that the forHandle filter doesn't seem to work. Is this by design?

Running the following code causes this error. youtube.list_channels(part, for_handle: 'handle_name')

unknown keyword unknown keyword

After inspecting the method's arguments, I found that it does not accept the for_handle keyword. youtube.method(:list_channels).parameters

inspection inspection

Any advice would be greatly appreciated.

4
  • Have you tried passing that through the options Hash e.g. youtube.list_channels(part, options: {for_handle: 'handle_name'} ) it does look like this has been added as a keyword in the main branch if you wanted to install from there instead (Sourc) Commented Jun 17 at 13:13
  • 1
    @engineersmnky Thanks for the comment! Sorry—I ended up resolving the issue myself. I've explained the details in my answer. Commented Jun 18 at 1:21
  • put your images as embed instead of hyperlink. makes it more readable. I did it for you this time. Commented Jun 18 at 4:54
  • 1
    @SpicyCatGames Sorry, I mistakenly thought that newly created accounts weren't allowed to use the embed format. thank you! Commented Jun 18 at 9:52

1 Answer 1

0

Resolved

The version of the Gem I had installed was 0.4.0, and since the for_handle filter was implemented in a later version, I wasn’t able to use it. https://rubygems.org/gems/google-apis-youtube_v3/versions/0.4.0

Updating the Gem to a newer version resolved the issue. https://rubygems.org/gems/google-apis-youtube_v3/versions/0.56.0

Thank you to @engineersmnky for the comment!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.