删除播放列表时出现Ruby Youtube Data API gem错误

时间:2013-04-03 19:02:57

标签: ruby youtube-api

当我执行youtube.playlists.delete请求时,我回来了

NoMethodError: undefined method `[]' for nil:NilClass
    from /Users/me/.rvm/gems/ruby-1.9.2-p320@vidyard_dashboard/gems/google-api-      client-0.4.4/lib/google/api_client/result.rb:53:in `media_type'
    from /Users/me/.rvm/gems/ruby-1.9.2-p320@vidyard_dashboard/gems/google-api-client-0.4.4/lib/google/api_client/result.rb:57:in `data?'
    from /Users/me/.rvm/gems/ruby-1.9.2-p320@vidyard_dashboard/gems/google-api-client-0.4.4/lib/google/api_client.rb:775:in `execute!'

当删除播放列表时,请求似乎实际上已经通过,但无论出于何种原因,仍然会在返回的路上抛出错误。请求的基本代码如下:

yt.client.execute!(
    :api_method => yt.youtube.playlists.delete, 
    :parameters => {:id => 'youtube_playlist_id'}
)

0 个答案:

没有答案