Closed serv closed 12 years ago
To replicate this,
video = client.video_by("YOUTUBE_VIDEO_URL") video.categories # => [#<YouTubeIt::Model::Category:0x007fef11139428 @term="Music", @label="Music">] video.categories.term # => NoMethodError: undefined method `term' for #<Array:0x007fef11137948> video.categories.label # => NoMethodError: undefined method `label' for #<Array:0x007fef11137948>
the problem is that the categories is an array so you have to do the following:
video.categories.first.label
or
video.categories.first.term
cheers!
To replicate this,