Error won't occur unless I put contentDetails into 4th line.
It seems that the error occurs when there are more than two in part section.
If I leave it just as :part => 'snippet',, everything works fine.
However I have to add contentDetails to gain information about duration of the videos on Youtube.
How can I archive it?
videos_controller.rb
@search_response = client.execute!(
:api_method => youtube.search.list,
:parameters => {
:part => 'snippet, contentDetails',
:q => 'cats',
:maxResults => 20,
:order => 'date',
:pageToken => pageToken
}
)
Error
ActionView::Template::Error (undefined method `prev_page_token' for nil:NilClass):
1:
2: <% if !@search_response.prev_page_token.nil? %>
Aucun commentaire:
Enregistrer un commentaire