refinerycms-vimeo-videos 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. data/.gitignore +0 -1
  2. data/Gemfile.lock +33 -0
  3. data/README.markdown +8 -0
  4. data/TODO +2 -1
  5. data/app/controllers/admin/vimeo_account_controller.rb +30 -7
  6. data/app/controllers/admin/vimeo_videos_controller.rb +10 -9
  7. data/app/models/vimeo_embed_cache.rb +6 -1
  8. data/app/models/vimeo_meta_cache.rb +25 -24
  9. data/lib/refinerycms-vimeo-videos.rb +4 -1
  10. data/lib/refinerycms_vimeo_videos/account.rb +31 -0
  11. data/lib/refinerycms_vimeo_videos/version.rb +1 -1
  12. data/refinerycms-vimeo-videos.gemspec +146 -4
  13. data/spec/controllers/admin/vimeo_account_controller_spec.rb +0 -0
  14. data/spec/fixtures/advanced/album/add_video.json +4 -0
  15. data/spec/fixtures/advanced/album/create.json +7 -0
  16. data/spec/fixtures/advanced/album/delete.json +4 -0
  17. data/spec/fixtures/advanced/album/get_all.json +111 -0
  18. data/spec/fixtures/advanced/album/get_videos.json +30 -0
  19. data/spec/fixtures/advanced/album/remove_video.json +4 -0
  20. data/spec/fixtures/advanced/album/set_description.json +4 -0
  21. data/spec/fixtures/advanced/album/set_password.json +4 -0
  22. data/spec/fixtures/advanced/album/set_title.json +4 -0
  23. data/spec/fixtures/advanced/auth/access_token.txt +1 -0
  24. data/spec/fixtures/advanced/auth/check_access_token.json +9 -0
  25. data/spec/fixtures/advanced/auth/check_token.json +13 -0
  26. data/spec/fixtures/advanced/auth/get_frob.json +5 -0
  27. data/spec/fixtures/advanced/auth/get_token.json +13 -0
  28. data/spec/fixtures/advanced/auth/request_token.txt +1 -0
  29. data/spec/fixtures/advanced/channel/add_video.json +4 -0
  30. data/spec/fixtures/advanced/channel/get_all.json +1357 -0
  31. data/spec/fixtures/advanced/channel/get_info.json +55 -0
  32. data/spec/fixtures/advanced/channel/get_moderators.json +45 -0
  33. data/spec/fixtures/advanced/channel/get_subscribers.json +44 -0
  34. data/spec/fixtures/advanced/channel/get_videos.json +19 -0
  35. data/spec/fixtures/advanced/channel/remove_video.json +4 -0
  36. data/spec/fixtures/advanced/channel/subscribe.json +4 -0
  37. data/spec/fixtures/advanced/channel/unsubscribe.json +4 -0
  38. data/spec/fixtures/advanced/contact/get_all.json +117 -0
  39. data/spec/fixtures/advanced/contact/get_mutual.json +80 -0
  40. data/spec/fixtures/advanced/contact/get_online.json +47 -0
  41. data/spec/fixtures/advanced/contact/get_who_added.json +117 -0
  42. data/spec/fixtures/advanced/group/add_video.json +4 -0
  43. data/spec/fixtures/advanced/group/get_all.json +1532 -0
  44. data/spec/fixtures/advanced/group/get_files.json +255 -0
  45. data/spec/fixtures/advanced/group/get_info.json +72 -0
  46. data/spec/fixtures/advanced/group/get_members.json +862 -0
  47. data/spec/fixtures/advanced/group/get_moderators.json +44 -0
  48. data/spec/fixtures/advanced/group/get_video_comments.json +96 -0
  49. data/spec/fixtures/advanced/group/get_videos.json +102 -0
  50. data/spec/fixtures/advanced/group/join.json +4 -0
  51. data/spec/fixtures/advanced/group/leave.json +4 -0
  52. data/spec/fixtures/advanced/group_events/get_month.json +141 -0
  53. data/spec/fixtures/advanced/group_events/get_past.json +141 -0
  54. data/spec/fixtures/advanced/group_events/get_upcoming.json +141 -0
  55. data/spec/fixtures/advanced/group_forums/get_topic_comments.json +222 -0
  56. data/spec/fixtures/advanced/group_forums/get_topics.json +504 -0
  57. data/spec/fixtures/advanced/person/add_contact.json +4 -0
  58. data/spec/fixtures/advanced/person/add_subscription.json +4 -0
  59. data/spec/fixtures/advanced/person/find_by_email.json +9 -0
  60. data/spec/fixtures/advanced/person/get_hd_embeds.json +8 -0
  61. data/spec/fixtures/advanced/person/get_info.json +20 -0
  62. data/spec/fixtures/advanced/person/get_portrait_urls.json +28 -0
  63. data/spec/fixtures/advanced/person/remove_contact.json +4 -0
  64. data/spec/fixtures/advanced/person/remove_subscription.json +4 -0
  65. data/spec/fixtures/advanced/test/echo.json +8 -0
  66. data/spec/fixtures/advanced/test/login.json +8 -0
  67. data/spec/fixtures/advanced/test/null.json +4 -0
  68. data/spec/fixtures/advanced/upload/get_quota.json +16 -0
  69. data/spec/fixtures/advanced/upload/get_ticket.json +8 -0
  70. data/spec/fixtures/advanced/upload/sample_iTunes.mov +0 -0
  71. data/spec/fixtures/advanced/video/add_cast.json +4 -0
  72. data/spec/fixtures/advanced/video/add_comment.json +7 -0
  73. data/spec/fixtures/advanced/video/add_photos.json +4 -0
  74. data/spec/fixtures/advanced/video/add_tags.json +4 -0
  75. data/spec/fixtures/advanced/video/clear_tags.json +4 -0
  76. data/spec/fixtures/advanced/video/delete.json +4 -0
  77. data/spec/fixtures/advanced/video/delete_comment.json +4 -0
  78. data/spec/fixtures/advanced/video/edit_comment.json +4 -0
  79. data/spec/fixtures/advanced/video/get_all.json +30 -0
  80. data/spec/fixtures/advanced/video/get_appears_in.json +10 -0
  81. data/spec/fixtures/advanced/video/get_by_tag.json +237 -0
  82. data/spec/fixtures/advanced/video/get_cast.json +42 -0
  83. data/spec/fixtures/advanced/video/get_comments_list.json +52 -0
  84. data/spec/fixtures/advanced/video/get_contacts_liked.json +48 -0
  85. data/spec/fixtures/advanced/video/get_contacts_uploaded.json +237 -0
  86. data/spec/fixtures/advanced/video/get_info.json +246 -0
  87. data/spec/fixtures/advanced/video/get_likes.json +32 -0
  88. data/spec/fixtures/advanced/video/get_subscriptions.json +237 -0
  89. data/spec/fixtures/advanced/video/get_thumbnail_urls.json +28 -0
  90. data/spec/fixtures/advanced/video/get_uploaded.json +30 -0
  91. data/spec/fixtures/advanced/video/remove_cast.json +4 -0
  92. data/spec/fixtures/advanced/video/remove_tag.json +4 -0
  93. data/spec/fixtures/advanced/video/search.json +237 -0
  94. data/spec/fixtures/advanced/video/set_description.json +4 -0
  95. data/spec/fixtures/advanced/video/set_like.json +4 -0
  96. data/spec/fixtures/advanced/video/set_privacy.json +4 -0
  97. data/spec/fixtures/advanced/video/set_title.json +4 -0
  98. data/spec/fixtures/advanced/video_embed/get_presets.json +8 -0
  99. data/spec/fixtures/advanced/video_embed/set_preset.json +4 -0
  100. data/spec/fixtures/oembed/oembed.json +5 -0
  101. data/spec/fixtures/simple/activity/contacts_did.json +1 -0
  102. data/spec/fixtures/simple/activity/everyone_did.json +1 -0
  103. data/spec/fixtures/simple/activity/happened_to_contacts.json +1 -0
  104. data/spec/fixtures/simple/activity/happened_to_user.json +1 -0
  105. data/spec/fixtures/simple/activity/user_did.json +1 -0
  106. data/spec/fixtures/simple/album/info.json +1 -0
  107. data/spec/fixtures/simple/album/videos.json +1 -0
  108. data/spec/fixtures/simple/channel/info.json +1 -0
  109. data/spec/fixtures/simple/channel/videos.json +1 -0
  110. data/spec/fixtures/simple/group/info.json +1 -0
  111. data/spec/fixtures/simple/group/users.json +1 -0
  112. data/spec/fixtures/simple/group/videos.json +1 -0
  113. data/spec/fixtures/simple/user/albums.json +1 -0
  114. data/spec/fixtures/simple/user/all_videos.json +1 -0
  115. data/spec/fixtures/simple/user/appears_in.json +1 -0
  116. data/spec/fixtures/simple/user/channels.json +1 -0
  117. data/spec/fixtures/simple/user/contacts_like.json +1 -0
  118. data/spec/fixtures/simple/user/contacts_videos.json +1 -0
  119. data/spec/fixtures/simple/user/groups.json +1 -0
  120. data/spec/fixtures/simple/user/info.json +1 -0
  121. data/spec/fixtures/simple/user/likes.json +1 -0
  122. data/spec/fixtures/simple/user/subscriptions.json +1 -0
  123. data/spec/fixtures/simple/user/videos.json +1 -0
  124. data/spec/fixtures/simple/video/info.json +1 -0
  125. data/spec/models/vimeo_embed_cache_spec.rb +65 -0
  126. data/spec/models/vimeo_meta_cache_spec.rb +24 -0
  127. data/spec/models/vimeo_video_spec.rb +0 -8
  128. data/spec/vimeo_helper.rb +54 -0
  129. metadata +131 -3
  130. data/app/controllers/admin/vimeo_base_controller.rb +0 -40
data/.gitignore CHANGED
@@ -1,4 +1,3 @@
1
- *.gemspec
2
1
  *.gem
3
2
  TODO
4
3
 
data/Gemfile.lock ADDED
@@ -0,0 +1,33 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ refinerycms-vimeo-videos (0.1.4)
5
+ httparty (~> 0.6.1)
6
+ vimeo (~> 1.3.0)
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ crack (0.1.8)
12
+ fakeweb (1.2.8)
13
+ httparty (0.6.1)
14
+ crack (= 0.1.8)
15
+ httpclient (2.2.0.1)
16
+ json (1.5.1)
17
+ mocha (0.9.12)
18
+ multipart-post (1.1.0)
19
+ oauth (0.4.4)
20
+ vimeo (1.3.0)
21
+ httparty (>= 0.4.5)
22
+ httpclient (>= 2.1.5.2)
23
+ json (>= 1.1.9)
24
+ multipart-post (>= 1.0.1)
25
+ oauth (>= 0.4.3)
26
+
27
+ PLATFORMS
28
+ ruby
29
+
30
+ DEPENDENCIES
31
+ fakeweb (~> 1.2.6)
32
+ mocha (~> 0.9.12)
33
+ refinerycms-vimeo-videos!
data/README.markdown ADDED
@@ -0,0 +1,8 @@
1
+ Refinerycms-Vimeo-Videos
2
+ ========================
3
+
4
+ This gem makes it easy for refinerycms sites to add vimeo videos to models.
5
+
6
+ Usage
7
+ -----
8
+
data/TODO CHANGED
@@ -1,2 +1,3 @@
1
1
  * specs!
2
- * fetch account from one general method
2
+ * fetch account from one general method
3
+ * don't use vimeo if not configured yet and show warn messages
@@ -1,31 +1,54 @@
1
1
  module Admin
2
- class VimeoAccountController < VimeoBaseController
2
+ class VimeoAccountController < Admin::BaseController
3
+
4
+ include ::RefinerycmsVimeoVideos::Account
3
5
 
4
6
  def authorization
7
+ debugger
5
8
  if not authorized? and ready_to_authorize?
9
+
10
+ # begin authorization process
6
11
  base = Vimeo::Advanced::Base.new(
7
- @account[:consumer_key],
8
- @account[:consumer_secret])
12
+ account[:consumer_key],
13
+ account[:consumer_secret])
9
14
  request_token = base.get_request_token
10
15
  session[:oauth_secret] = request_token.secret
16
+
17
+ debugger
11
18
  redirect_to base.authorize_url
19
+
12
20
  elsif ready_to_authorize?
13
- callback
21
+
22
+ # already authorized
23
+ flash.notice = "You have already authorized your account."
24
+ redirect_to "/admin"
25
+
14
26
  else
27
+
28
+ # not ready to authorize
15
29
  raise ArgumentError, 'Not ready to authorize. Type in consumer_key and consumer_secret.'
30
+
16
31
  end
17
32
  end
18
33
 
19
34
  def callback
35
+ debugger
36
+ # vimeo will redirect us here upon successful authorization
20
37
  base = Vimeo::Advanced::Base.new(
21
- @account[:consumer_key],
22
- @account[:consumer_secret])
38
+ account[:consumer_key],
39
+ account[:consumer_secret])
23
40
  access_token = base.get_access_token(params[:oauth_token], session[:oauth_secret], params[:oauth_verifier])
24
41
  RefinerySetting.find_by_name('vimeo_token').update_attribute(:value, access_token.token)
25
42
  RefinerySetting.find_by_name('vimeo_secret').update_attribute(:value, access_token.secret)
26
- flash[:notice] = "You successfully authorized your vimeo account for integration in your backend. You can now start using it."
43
+ flash.notice = "You successfully authorized your vimeo account for integration in your backend. You can now start using it."
27
44
  redirect_to '/admin'
45
+
28
46
  end
47
+
48
+ protected
49
+
50
+ def restrict_controller
51
+ end
29
52
 
30
53
  end
31
54
  end
@@ -1,5 +1,7 @@
1
1
  module Admin
2
- class VimeoVideosController < Admin::VimeoBaseController
2
+ class VimeoVideosController < Admin::BaseController
3
+
4
+ include ::RefinerycmsVimeoVideos::Account
3
5
 
4
6
  before_filter :init_dialog
5
7
 
@@ -7,9 +9,9 @@ module Admin
7
9
  if authorized?
8
10
  get_videos_on_vimeo_account
9
11
  elsif request.xhr?
10
- render :text => 'You are have not authorized this app to use your vimeo account.'
12
+ render :text => 'You have not authorized this application to use your vimeo account.'
11
13
  else
12
- raise ArgumentError, 'You are have not authorized this app to use your vimeo account.'
14
+ raise ArgumentError, 'You have not authorized this application to use your vimeo account.'
13
15
  end
14
16
  end
15
17
 
@@ -41,13 +43,12 @@ module Admin
41
43
 
42
44
  protected
43
45
  def get_videos_on_vimeo_account
44
- get_account
45
46
  video = Vimeo::Advanced::Video.new(
46
- @account[:consumer_key],
47
- @account[:consumer_secret],
48
- :token => @account[:token],
49
- :secret => @account[:secret])
50
- @vimeo_videos = video.get_all(@account[:username], {:full_response => true, :sort => 'upload_date'})["videos"]["video"]
47
+ account[:consumer_key],
48
+ account[:consumer_secret],
49
+ :token => account[:token],
50
+ :secret => account[:secret])
51
+ @vimeo_videos = video.get_all(account[:username], {:full_response => true, :sort => 'upload_date'})["videos"]["video"]
51
52
  end
52
53
 
53
54
  def init_dialog
@@ -26,6 +26,11 @@ class VimeoEmbedCache < ActiveRecord::Base
26
26
  end
27
27
  end
28
28
 
29
+ def update_cache
30
+ cache true
31
+ self.save
32
+ end
33
+
29
34
  FIXED_WIDTH_GEOMETRY = /^(\d+)$/ # e.g. '300'
30
35
  FIXED_HEIGHT_GEOMETRY = /^x(\d+)$/ # e.g. 'x200'
31
36
  FIXED_GEOMETRY = /^(\d+)x(\d+)$/ # e.g. '300x200'
@@ -39,7 +44,7 @@ class VimeoEmbedCache < ActiveRecord::Base
39
44
  {:height => $1}
40
45
  when FIXED_GEOMETRY
41
46
  {:width => $1, :height => $2}
42
- else raise ArgumentError, "Didn't recognise the geometry string #{self.geometry}"
47
+ else raise ArgumentError, "Didn't recognise the geometry string #{geometry}"
43
48
  end
44
49
  end
45
50
 
@@ -1,6 +1,7 @@
1
- require 'vimeo'
2
1
  class VimeoMetaCache < ActiveRecord::Base
3
2
 
3
+ include ::RefinerycmsVimeoVideos::Account
4
+
4
5
  set_table_name "vimeo_meta_cache"
5
6
 
6
7
  has_many :vimeo_embed_caches, :dependent => :destroy
@@ -19,39 +20,39 @@ class VimeoMetaCache < ActiveRecord::Base
19
20
  "http://www.vimeo.com/#{self.vid}"
20
21
  end
21
22
 
22
- def force_cache
23
- cache true
23
+ def update_cache image = false
24
+ cache true, images
24
25
  self.save
25
26
  end
26
27
 
27
28
  private
28
29
 
29
- def cache force = false
30
- if self.title.blank? or self.image_id.blank?
31
- get_account
30
+ def cache force = false, images = false
31
+ if self.title.blank? or self.image_id.blank? or self.description.blank?
32
+
32
33
  video = Vimeo::Advanced::Video.new(
33
- @account[:consumer_key],
34
- @account[:consumer_secret],
35
- :token => @account[:token],
36
- :secret => @account[:secret])
34
+ account[:consumer_key],
35
+ account[:consumer_secret],
36
+ :token => account[:token],
37
+ :secret => account[:secret])
37
38
  video_info = video.get_info(self.vid)["video"].first
38
39
 
39
- # Save cached image
40
- vimeo_thumb_url = video_info["thumbnails"]["thumbnail"].last["_content"]
41
- self.create_image(:image => URLTempfile.new(vimeo_thumb_url)) if self.image_id.blank? or force
40
+ # By default omitt image if we already have one.
41
+ # If we force an update, we need to specifically force images as well by
42
+ # calling this method with force and images true.
43
+
44
+ if (images and force) or not image_id?
45
+ # Save fetched image url
46
+ vimeo_thumb_url = video_info["thumbnails"]["thumbnail"].last["_content"]
47
+ self.create_image(:image => URLTempfile.new(vimeo_thumb_url))
48
+ end
42
49
 
43
- # Save cached title
44
- self.title = video_info["description"] if self.title.blank? or force
50
+ # Save fetched title
51
+ self.title = video_info["title"] if self.title.blank? or force
52
+
53
+ # Save fetched description
54
+ self.description = video_info["description"] if self.description.blank? or force
45
55
  end
46
56
  end
47
57
 
48
-
49
- def get_account
50
- @account = {
51
- :username => RefinerySetting.find_or_set(:vimeo_username, :value => "Username"),
52
- :consumer_key => RefinerySetting.find_or_set(:vimeo_consumer_key, :value => "Consumer Key"),
53
- :consumer_secret => RefinerySetting.find_or_set(:vimeo_consumer_secret, :value => "Consumer Secret"),
54
- :token => RefinerySetting.find_or_set(:vimeo_token, :value => 'Token').value,
55
- :secret => RefinerySetting.find_or_set(:vimeo_secret, :value => 'Secret').value}
56
- end
57
58
  end
@@ -1,4 +1,7 @@
1
- require 'refinery'
1
+ require 'refinerycms-base'
2
+ require 'vimeo'
3
+
4
+ require 'refinerycms_vimeo_videos/account'
2
5
 
3
6
  module Refinery
4
7
  module VimeoVideos
@@ -0,0 +1,31 @@
1
+ module RefinerycmsVimeoVideos
2
+ module Account
3
+
4
+ # This will extend controllers and models to centralize account setup logic
5
+
6
+ protected
7
+
8
+ CONSUMER_KEY_FORMAT = /^\w{32}$/
9
+ CONSUMER_SECRET_FORMAT = /^\w{16}$/
10
+ TOKEN_FORMAT = /^\w{32}$/
11
+ SECRET_FORMAT = /^\w{40}$/
12
+
13
+ def ready_to_authorize?
14
+ account[:consumer_key] =~ CONSUMER_KEY_FORMAT and account[:consumer_secret] =~ CONSUMER_SECRET_FORMAT
15
+ end
16
+
17
+ def authorized?
18
+ account[:token] =~ TOKEN_FORMAT and account[:secret] =~ SECRET_FORMAT
19
+ end
20
+
21
+ def account
22
+ @account ||= {
23
+ :username => RefinerySetting.find_or_set(:vimeo_username, :value => "Username"),
24
+ :consumer_key => RefinerySetting.find_or_set(:vimeo_consumer_key, :value => "Consumer Key"),
25
+ :consumer_secret => RefinerySetting.find_or_set(:vimeo_consumer_secret, :value => "Consumer Secret"),
26
+ :token => RefinerySetting.find_or_set(:vimeo_token, :value => 'Token'),
27
+ :secret => RefinerySetting.find_or_set(:vimeo_secret, :value => 'Secret')}
28
+ end
29
+
30
+ end
31
+ end
@@ -1,3 +1,3 @@
1
1
  module RefinerycmsVimeoVideos
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -4,9 +4,9 @@ require "refinerycms_vimeo_videos/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = %q{refinerycms-vimeo-videos}
7
- s.version = RefinerycmsVimeoVideos::VERSION
7
+ s.version = %q{0.1.5}
8
8
  s.description = 'Ruby on Rails Vimeo Videos engine for Refinery CMS'
9
- s.date = %q{2011-04-21}
9
+ s.date = %q{2011-04-25}
10
10
  s.summary = 'Vimeo Videos engine for Refinery CMS'
11
11
  s.email = %q{mail@bitflut.com}
12
12
  s.homepage = %q{http://bitflut.com}
@@ -17,18 +17,20 @@ Gem::Specification.new do |s|
17
17
 
18
18
  s.add_dependency 'vimeo', '~> 1.3.0'
19
19
  s.add_dependency 'httparty', '~> 0.6.1'
20
+ s.add_dependency 'fakeweb', '~> 1.2.6'
20
21
 
21
22
  s.files = [
22
23
  '.gitignore',
23
24
  'Gemfile',
24
25
  'Gemfile',
26
+ 'Gemfile.lock',
27
+ 'README.markdown',
25
28
  'Rakefile',
26
29
  'TODO',
27
30
  'app',
28
31
  'app/controllers',
29
32
  'app/controllers/admin',
30
33
  'app/controllers/admin/vimeo_account_controller.rb',
31
- 'app/controllers/admin/vimeo_base_controller.rb',
32
34
  'app/controllers/admin/vimeo_videos_controller.rb',
33
35
  'app/models',
34
36
  'app/models/vimeo_embed_cache.rb',
@@ -70,6 +72,7 @@ Gem::Specification.new do |s|
70
72
  'lib/generators/refinerycms_vimeo_videos_generator.rb',
71
73
  'lib/refinerycms-vimeo-videos.rb',
72
74
  'lib/refinerycms_vimeo_videos',
75
+ 'lib/refinerycms_vimeo_videos/account.rb',
73
76
  'lib/refinerycms_vimeo_videos/version.rb',
74
77
  'lib/tasks',
75
78
  'lib/tasks/vimeo_videos.rake',
@@ -83,7 +86,146 @@ Gem::Specification.new do |s|
83
86
  'public/stylesheets/admin/vimeo_videos.css',
84
87
  'refinerycms-vimeo-videos.gemspec',
85
88
  'spec',
89
+ 'spec/controllers',
90
+ 'spec/controllers/admin',
91
+ 'spec/controllers/admin/vimeo_account_controller_spec.rb',
92
+ 'spec/fixtures',
93
+ 'spec/fixtures/advanced',
94
+ 'spec/fixtures/advanced/album',
95
+ 'spec/fixtures/advanced/album/add_video.json',
96
+ 'spec/fixtures/advanced/album/create.json',
97
+ 'spec/fixtures/advanced/album/delete.json',
98
+ 'spec/fixtures/advanced/album/get_all.json',
99
+ 'spec/fixtures/advanced/album/get_videos.json',
100
+ 'spec/fixtures/advanced/album/remove_video.json',
101
+ 'spec/fixtures/advanced/album/set_description.json',
102
+ 'spec/fixtures/advanced/album/set_password.json',
103
+ 'spec/fixtures/advanced/album/set_title.json',
104
+ 'spec/fixtures/advanced/auth',
105
+ 'spec/fixtures/advanced/auth/access_token.txt',
106
+ 'spec/fixtures/advanced/auth/check_access_token.json',
107
+ 'spec/fixtures/advanced/auth/check_token.json',
108
+ 'spec/fixtures/advanced/auth/get_frob.json',
109
+ 'spec/fixtures/advanced/auth/get_token.json',
110
+ 'spec/fixtures/advanced/auth/request_token.txt',
111
+ 'spec/fixtures/advanced/channel',
112
+ 'spec/fixtures/advanced/channel/add_video.json',
113
+ 'spec/fixtures/advanced/channel/get_all.json',
114
+ 'spec/fixtures/advanced/channel/get_info.json',
115
+ 'spec/fixtures/advanced/channel/get_moderators.json',
116
+ 'spec/fixtures/advanced/channel/get_subscribers.json',
117
+ 'spec/fixtures/advanced/channel/get_videos.json',
118
+ 'spec/fixtures/advanced/channel/remove_video.json',
119
+ 'spec/fixtures/advanced/channel/subscribe.json',
120
+ 'spec/fixtures/advanced/channel/unsubscribe.json',
121
+ 'spec/fixtures/advanced/contact',
122
+ 'spec/fixtures/advanced/contact/get_all.json',
123
+ 'spec/fixtures/advanced/contact/get_mutual.json',
124
+ 'spec/fixtures/advanced/contact/get_online.json',
125
+ 'spec/fixtures/advanced/contact/get_who_added.json',
126
+ 'spec/fixtures/advanced/group',
127
+ 'spec/fixtures/advanced/group/add_video.json',
128
+ 'spec/fixtures/advanced/group/get_all.json',
129
+ 'spec/fixtures/advanced/group/get_files.json',
130
+ 'spec/fixtures/advanced/group/get_info.json',
131
+ 'spec/fixtures/advanced/group/get_members.json',
132
+ 'spec/fixtures/advanced/group/get_moderators.json',
133
+ 'spec/fixtures/advanced/group/get_video_comments.json',
134
+ 'spec/fixtures/advanced/group/get_videos.json',
135
+ 'spec/fixtures/advanced/group/join.json',
136
+ 'spec/fixtures/advanced/group/leave.json',
137
+ 'spec/fixtures/advanced/group_events',
138
+ 'spec/fixtures/advanced/group_events/get_month.json',
139
+ 'spec/fixtures/advanced/group_events/get_past.json',
140
+ 'spec/fixtures/advanced/group_events/get_upcoming.json',
141
+ 'spec/fixtures/advanced/group_forums',
142
+ 'spec/fixtures/advanced/group_forums/get_topic_comments.json',
143
+ 'spec/fixtures/advanced/group_forums/get_topics.json',
144
+ 'spec/fixtures/advanced/person',
145
+ 'spec/fixtures/advanced/person/add_contact.json',
146
+ 'spec/fixtures/advanced/person/add_subscription.json',
147
+ 'spec/fixtures/advanced/person/find_by_email.json',
148
+ 'spec/fixtures/advanced/person/get_hd_embeds.json',
149
+ 'spec/fixtures/advanced/person/get_info.json',
150
+ 'spec/fixtures/advanced/person/get_portrait_urls.json',
151
+ 'spec/fixtures/advanced/person/remove_contact.json',
152
+ 'spec/fixtures/advanced/person/remove_subscription.json',
153
+ 'spec/fixtures/advanced/test',
154
+ 'spec/fixtures/advanced/test/echo.json',
155
+ 'spec/fixtures/advanced/test/login.json',
156
+ 'spec/fixtures/advanced/test/null.json',
157
+ 'spec/fixtures/advanced/upload',
158
+ 'spec/fixtures/advanced/upload/get_quota.json',
159
+ 'spec/fixtures/advanced/upload/get_ticket.json',
160
+ 'spec/fixtures/advanced/upload/sample_iTunes.mov',
161
+ 'spec/fixtures/advanced/video',
162
+ 'spec/fixtures/advanced/video/add_cast.json',
163
+ 'spec/fixtures/advanced/video/add_comment.json',
164
+ 'spec/fixtures/advanced/video/add_photos.json',
165
+ 'spec/fixtures/advanced/video/add_tags.json',
166
+ 'spec/fixtures/advanced/video/clear_tags.json',
167
+ 'spec/fixtures/advanced/video/delete.json',
168
+ 'spec/fixtures/advanced/video/delete_comment.json',
169
+ 'spec/fixtures/advanced/video/edit_comment.json',
170
+ 'spec/fixtures/advanced/video/get_all.json',
171
+ 'spec/fixtures/advanced/video/get_appears_in.json',
172
+ 'spec/fixtures/advanced/video/get_by_tag.json',
173
+ 'spec/fixtures/advanced/video/get_cast.json',
174
+ 'spec/fixtures/advanced/video/get_comments_list.json',
175
+ 'spec/fixtures/advanced/video/get_contacts_liked.json',
176
+ 'spec/fixtures/advanced/video/get_contacts_uploaded.json',
177
+ 'spec/fixtures/advanced/video/get_info.json',
178
+ 'spec/fixtures/advanced/video/get_likes.json',
179
+ 'spec/fixtures/advanced/video/get_subscriptions.json',
180
+ 'spec/fixtures/advanced/video/get_thumbnail_urls.json',
181
+ 'spec/fixtures/advanced/video/get_uploaded.json',
182
+ 'spec/fixtures/advanced/video/remove_cast.json',
183
+ 'spec/fixtures/advanced/video/remove_tag.json',
184
+ 'spec/fixtures/advanced/video/search.json',
185
+ 'spec/fixtures/advanced/video/set_description.json',
186
+ 'spec/fixtures/advanced/video/set_like.json',
187
+ 'spec/fixtures/advanced/video/set_privacy.json',
188
+ 'spec/fixtures/advanced/video/set_title.json',
189
+ 'spec/fixtures/advanced/video_embed',
190
+ 'spec/fixtures/advanced/video_embed/get_presets.json',
191
+ 'spec/fixtures/advanced/video_embed/set_preset.json',
192
+ 'spec/fixtures/oembed',
193
+ 'spec/fixtures/oembed/oembed.json',
194
+ 'spec/fixtures/simple',
195
+ 'spec/fixtures/simple/activity',
196
+ 'spec/fixtures/simple/activity/contacts_did.json',
197
+ 'spec/fixtures/simple/activity/everyone_did.json',
198
+ 'spec/fixtures/simple/activity/happened_to_contacts.json',
199
+ 'spec/fixtures/simple/activity/happened_to_user.json',
200
+ 'spec/fixtures/simple/activity/user_did.json',
201
+ 'spec/fixtures/simple/album',
202
+ 'spec/fixtures/simple/album/info.json',
203
+ 'spec/fixtures/simple/album/videos.json',
204
+ 'spec/fixtures/simple/channel',
205
+ 'spec/fixtures/simple/channel/info.json',
206
+ 'spec/fixtures/simple/channel/videos.json',
207
+ 'spec/fixtures/simple/group',
208
+ 'spec/fixtures/simple/group/info.json',
209
+ 'spec/fixtures/simple/group/users.json',
210
+ 'spec/fixtures/simple/group/videos.json',
211
+ 'spec/fixtures/simple/user',
212
+ 'spec/fixtures/simple/user/albums.json',
213
+ 'spec/fixtures/simple/user/all_videos.json',
214
+ 'spec/fixtures/simple/user/appears_in.json',
215
+ 'spec/fixtures/simple/user/channels.json',
216
+ 'spec/fixtures/simple/user/contacts_like.json',
217
+ 'spec/fixtures/simple/user/contacts_videos.json',
218
+ 'spec/fixtures/simple/user/groups.json',
219
+ 'spec/fixtures/simple/user/info.json',
220
+ 'spec/fixtures/simple/user/likes.json',
221
+ 'spec/fixtures/simple/user/subscriptions.json',
222
+ 'spec/fixtures/simple/user/videos.json',
223
+ 'spec/fixtures/simple/video',
224
+ 'spec/fixtures/simple/video/info.json',
86
225
  'spec/models',
87
- 'spec/models/vimeo_video_spec.rb'
226
+ 'spec/models/vimeo_embed_cache_spec.rb',
227
+ 'spec/models/vimeo_meta_cache_spec.rb',
228
+ 'spec/models/vimeo_video_spec.rb',
229
+ 'spec/vimeo_helper.rb'
88
230
  ]
89
231
  end
@@ -0,0 +1,4 @@
1
+ {
2
+ "generated_in":"0.4800",
3
+ "stat":"ok"
4
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "generated_in":"0.5089",
3
+ "stat":"ok",
4
+ "album":{
5
+ "id":"129683"
6
+ }
7
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "generated_in":"0.3576",
3
+ "stat":"ok"
4
+ }
@@ -0,0 +1,111 @@
1
+ {
2
+ "generated_in":"0.6876",
3
+ "stat":"ok",
4
+ "albums":{
5
+ "on_this_page":"3",
6
+ "page":"1",
7
+ "perpage":"25",
8
+ "total":"3",
9
+ "album":[
10
+ {
11
+ "id":"129683",
12
+ "title":"Test Album Vimeo Gem",
13
+ "description":"Test",
14
+ "created_on":"2009-09-24 17:35:26",
15
+ "total_videos":"2",
16
+ "url":"http:\/\/vimeo.com\/album\/129683",
17
+ "video_sort_method":"arranged",
18
+ "thumbnail_video":{
19
+ "id":"2529363",
20
+ "owner":"888046",
21
+ "title":"Test Video",
22
+ "thumbnails":{
23
+ "thumbnail":[
24
+ {
25
+ "height":"75",
26
+ "width":"100",
27
+ "_content":"http:\/\/images.vimeo.com\/21\/88\/91\/218891849\/218891849_100.jpg"
28
+ },
29
+ {
30
+ "height":"150",
31
+ "width":"200",
32
+ "_content":"http:\/\/images.vimeo.com\/21\/88\/91\/218891849\/218891849_200.jpg"
33
+ },
34
+ {
35
+ "height":"480",
36
+ "width":"640",
37
+ "_content":"http:\/\/bitcast.vimeo.com\/vimeo\/thumbnails\/defaults\/default.300x400.jpg"
38
+ }
39
+ ]
40
+ }
41
+ }
42
+ },
43
+ {
44
+ "id":"129692",
45
+ "title":"Test Album Vimeo Gem22223",
46
+ "description":"Test",
47
+ "created_on":"2009-09-24 17:52:17",
48
+ "total_videos":"2",
49
+ "url":"http:\/\/vimeo.com\/album\/129692",
50
+ "video_sort_method":"arranged",
51
+ "thumbnail_video":{
52
+ "id":"2529363",
53
+ "owner":"888046",
54
+ "title":"Test Video",
55
+ "thumbnails":{
56
+ "thumbnail":[
57
+ {
58
+ "height":"75",
59
+ "width":"100",
60
+ "_content":"http:\/\/images.vimeo.com\/21\/88\/91\/218891849\/218891849_100.jpg"
61
+ },
62
+ {
63
+ "height":"150",
64
+ "width":"200",
65
+ "_content":"http:\/\/images.vimeo.com\/21\/88\/91\/218891849\/218891849_200.jpg"
66
+ },
67
+ {
68
+ "height":"480",
69
+ "width":"640",
70
+ "_content":"http:\/\/bitcast.vimeo.com\/vimeo\/thumbnails\/defaults\/default.300x400.jpg"
71
+ }
72
+ ]
73
+ }
74
+ }
75
+ },
76
+ {
77
+ "id":"129689",
78
+ "title":"Test Album Vimeo Gem21312",
79
+ "description":"Test",
80
+ "created_on":"2009-09-24 17:46:46",
81
+ "total_videos":"2",
82
+ "url":"http:\/\/vimeo.com\/album\/129689",
83
+ "video_sort_method":"arranged",
84
+ "thumbnail_video":{
85
+ "id":"2529363",
86
+ "owner":"888046",
87
+ "title":"Test Video",
88
+ "thumbnails":{
89
+ "thumbnail":[
90
+ {
91
+ "height":"75",
92
+ "width":"100",
93
+ "_content":"http:\/\/images.vimeo.com\/21\/88\/91\/218891849\/218891849_100.jpg"
94
+ },
95
+ {
96
+ "height":"150",
97
+ "width":"200",
98
+ "_content":"http:\/\/images.vimeo.com\/21\/88\/91\/218891849\/218891849_200.jpg"
99
+ },
100
+ {
101
+ "height":"480",
102
+ "width":"640",
103
+ "_content":"http:\/\/bitcast.vimeo.com\/vimeo\/thumbnails\/defaults\/default.300x400.jpg"
104
+ }
105
+ ]
106
+ }
107
+ }
108
+ }
109
+ ]
110
+ }
111
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "generated_in":"0.2487",
3
+ "stat":"ok",
4
+ "videos":{
5
+ "on_this_page":"2",
6
+ "page":"1",
7
+ "perpage":"25",
8
+ "total":"2",
9
+ "video":[
10
+ {
11
+ "embed_privacy":"anywhere",
12
+ "id":"411684",
13
+ "is_hd":"1",
14
+ "owner":"151382",
15
+ "privacy":"anybody",
16
+ "title":"my home (minn heima)",
17
+ "upload_date":"2007-12-01 16:11:19"
18
+ },
19
+ {
20
+ "embed_privacy":"anywhere",
21
+ "id":"2529363",
22
+ "is_hd":"0",
23
+ "owner":"888046",
24
+ "privacy":"anybody",
25
+ "title":"Test Video",
26
+ "upload_date":"2008-12-14 23:57:19"
27
+ }
28
+ ]
29
+ }
30
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "generated_in":"0.5773",
3
+ "stat":"ok"
4
+ }