开发者

youtube api for rails 3

开发者 https://www.devze.com 2023-02-12 02:53 出处:网络
Is there a wrapper on youtube api for ruby on rails 3 ? I have created one application in rails 3. 开发者_运维百科I want to use youtube api any have a api then suggest me

Is there a wrapper on youtube api for ruby on rails 3 ?

I have created one application in rails 3. 开发者_运维百科I want to use youtube api any have a api then suggest me 


http://railsforum.com/viewtopic.php?id=33219


use the gem 'youtube_it'. Then in a controller or helper...

  client = YouTubeIt::Client.new(:dev_key => "dev_key_supplied_by_youtube_after_you_register_for_their_api")
  videos = client.videos_by(:user => "some persons youtube username)
  count = videos.total_result_count

Then in view

  <%= "So and so has <%= count %> videos on youtube" %> 
0

精彩评论

暂无评论...
验证码 换一张
取 消