sirlantis-vimeo 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,17 @@
1
+ module Vimeo
2
+ module Simple
3
+
4
+ class Album < Vimeo::Simple::Base
5
+ # Returns this album's clips.
6
+ def self.clips(album_id)
7
+ get("/album/#{album_id}/clips.json")
8
+ end
9
+
10
+ # Returns this album's information.
11
+ def self.info(album_id)
12
+ get("/album/#{album_id}/info.json")
13
+ end
14
+ end
15
+
16
+ end # Simple
17
+ end # Vimeo
@@ -0,0 +1,12 @@
1
+ module Vimeo
2
+ module Simple
3
+
4
+ class Base
5
+ include HTTParty
6
+ base_uri 'vimeo.com/api'
7
+
8
+ # TODO: Format options
9
+ end
10
+
11
+ end # Simple
12
+ end # Vimeo
@@ -0,0 +1,17 @@
1
+ module Vimeo
2
+ module Simple
3
+
4
+ class Channel < Vimeo::Simple::Base
5
+ # Returns this channel's clips.
6
+ def self.clips(channelname)
7
+ get("/channel/#{channelname}/clips.json")
8
+ end
9
+
10
+ # Returns this channel's information.
11
+ def self.info(channelname)
12
+ get("/channel/#{channelname}/info.json")
13
+ end
14
+ end
15
+
16
+ end # Simple
17
+ end # Vimeo
@@ -0,0 +1,12 @@
1
+ module Vimeo
2
+ module Simple
3
+
4
+ class Clip < Vimeo::Simple::Base
5
+ # Returns this clip's information.
6
+ def self.info(video_id)
7
+ get("/clip/#{video_id}.json")
8
+ end
9
+ end
10
+
11
+ end # End Simple
12
+ end # End Vimeo
@@ -0,0 +1,22 @@
1
+ module Vimeo
2
+ module Simple
3
+
4
+ class Group < Vimeo::Simple::Base
5
+ # Returns this group's clips.
6
+ def self.clips(groupname)
7
+ get("/group/#{groupname}/clips.json")
8
+ end
9
+
10
+ # Returns this group's users.
11
+ def self.users(groupname)
12
+ get("/group/#{groupname}/users.json")
13
+ end
14
+
15
+ # Returns this group's information.
16
+ def self.info(groupname)
17
+ get("/group/#{groupname}/info.json")
18
+ end
19
+ end
20
+
21
+ end # Simple
22
+ end # Vimeo
@@ -0,0 +1,62 @@
1
+ module Vimeo
2
+ module Simple
3
+
4
+ class User < Vimeo::Simple::Base
5
+ # Returns this user's information.
6
+ def self.info(username)
7
+ get("/#{username}/info.json")
8
+ end
9
+
10
+ # Returns this user's clips.
11
+ def self.clips(username)
12
+ get("/#{username}/clips.json")
13
+ end
14
+
15
+ # Returns this user's liked clips.
16
+ def self.likes(username)
17
+ get("/#{username}/likes.json")
18
+ end
19
+
20
+ # Returns the clips this user appears in.
21
+ def self.appears_in(username)
22
+ get("/#{username}/appears_in.json")
23
+ end
24
+
25
+ # Returns all clips related to this user.
26
+ def self.all_clips(username)
27
+ get("/#{username}/all_clips.json")
28
+ end
29
+
30
+ # Returns this user's subscriptions.
31
+ def self.subscriptions(username)
32
+ get("/#{username}/subscriptions.json")
33
+ end
34
+
35
+ # Returns this user's albums.
36
+ def self.albums(username)
37
+ get("/#{username}/albums.json")
38
+ end
39
+
40
+ # Returns this user's channels.
41
+ def self.channels(username)
42
+ get("/#{username}/channels.json")
43
+ end
44
+
45
+ # Returns this user's groups.
46
+ def self.groups(username)
47
+ get("/#{username}/groups.json")
48
+ end
49
+
50
+ # Returns this user's contact's clips.
51
+ def self.contacts_clips(username)
52
+ get("/#{username}/contacts_clips.json")
53
+ end
54
+
55
+ # Returns the clips that this user's contact's liked.
56
+ def self.contacts_like(username)
57
+ get("/#{username}/contacts_like.json")
58
+ end
59
+ end
60
+
61
+ end # End Simple
62
+ end # End Vimeo
@@ -0,0 +1,37 @@
1
+ require 'test_helper'
2
+ require 'vimeo/advanced/upload'
3
+
4
+ module Vimeo
5
+ module Advanced
6
+ class UploadTest < ::Test::Unit::TestCase
7
+ class Vimeo::Advanced::Upload
8
+ class HTTP < Struct.new(:host, :port)
9
+ class Post
10
+ def initialize uri
11
+ @uri = uri
12
+ @params = {}
13
+ end
14
+
15
+ def []= k,v
16
+ @params[k] = v
17
+ end
18
+ end
19
+ end
20
+ end
21
+
22
+ def test_upload
23
+ ul = Vimeo::Advanced::Upload.new('a', 'b')
24
+
25
+ def ul.get_upload_ticket *args
26
+ 'foo'
27
+ end
28
+
29
+ def ul.NET
30
+ FakeHTTP
31
+ end
32
+
33
+ ul.upload(__FILE__, 'test', 'testing')
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,3 @@
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+ require 'vimeo'
@@ -0,0 +1,40 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{vimeo}
5
+ s.version = "1.3.1"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Matt Hooks"]
9
+ s.date = %q{2009-08-03}
10
+ s.description = %q{}
11
+ s.email = ["matthooks@gmail.com"]
12
+ s.extra_rdoc_files = ["Manifest.txt", "CHANGELOG.rdoc", "README.rdoc"]
13
+ s.files = ["CHANGELOG.rdoc", "LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "VERSION.yml", "lib/vimeo.rb", "lib/vimeo/advanced.rb", "lib/vimeo/advanced/auth.rb", "lib/vimeo/advanced/base.rb", "lib/vimeo/advanced/contact.rb", "lib/vimeo/advanced/group.rb", "lib/vimeo/advanced/person.rb", "lib/vimeo/advanced/test.rb", "lib/vimeo/advanced/upload.rb", "lib/vimeo/advanced/video.rb", "lib/vimeo/simple.rb", "lib/vimeo/simple/activity.rb", "lib/vimeo/simple/album.rb", "lib/vimeo/simple/base.rb", "lib/vimeo/simple/channel.rb", "lib/vimeo/simple/clip.rb", "lib/vimeo/simple/group.rb", "lib/vimeo/simple/user.rb", "test/advanced/test_upload.rb", "test/test_helper.rb", "vimeo.gemspec"]
14
+ s.homepage = %q{http://github.com/matthooks/vimeo}
15
+ s.rdoc_options = ["--main", "README.rdoc"]
16
+ s.require_paths = ["lib"]
17
+ s.rubyforge_project = %q{vimeo}
18
+ s.rubygems_version = %q{1.3.4}
19
+ s.summary = %q{}
20
+ s.test_files = ["test/advanced/test_upload.rb", "test/test_helper.rb"]
21
+
22
+ if s.respond_to? :specification_version then
23
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
24
+ s.specification_version = 3
25
+
26
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
27
+ s.add_runtime_dependency(%q<jnunemaker-httparty>, [">= 0.2.6"])
28
+ s.add_runtime_dependency(%q<curb>, [">= 0"])
29
+ s.add_development_dependency(%q<hoe>, [">= 2.3.2"])
30
+ else
31
+ s.add_dependency(%q<jnunemaker-httparty>, [">= 0.2.6"])
32
+ s.add_dependency(%q<curb>, [">= 0"])
33
+ s.add_dependency(%q<hoe>, [">= 2.3.2"])
34
+ end
35
+ else
36
+ s.add_dependency(%q<jnunemaker-httparty>, [">= 0.2.6"])
37
+ s.add_dependency(%q<curb>, [">= 0"])
38
+ s.add_dependency(%q<hoe>, [">= 2.3.2"])
39
+ end
40
+ end
metadata ADDED
@@ -0,0 +1,114 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sirlantis-vimeo
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.3.1
5
+ platform: ruby
6
+ authors:
7
+ - Matt Hooks
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-08-03 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: jnunemaker-httparty
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.2.6
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: curb
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: hoe
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 2.3.2
44
+ version:
45
+ description: ""
46
+ email:
47
+ - matthooks@gmail.com
48
+ executables: []
49
+
50
+ extensions: []
51
+
52
+ extra_rdoc_files:
53
+ - Manifest.txt
54
+ - CHANGELOG.rdoc
55
+ - README.rdoc
56
+ files:
57
+ - CHANGELOG.rdoc
58
+ - LICENSE
59
+ - Manifest.txt
60
+ - README.rdoc
61
+ - Rakefile
62
+ - VERSION.yml
63
+ - lib/vimeo.rb
64
+ - lib/vimeo/advanced.rb
65
+ - lib/vimeo/advanced/auth.rb
66
+ - lib/vimeo/advanced/base.rb
67
+ - lib/vimeo/advanced/contact.rb
68
+ - lib/vimeo/advanced/group.rb
69
+ - lib/vimeo/advanced/person.rb
70
+ - lib/vimeo/advanced/test.rb
71
+ - lib/vimeo/advanced/upload.rb
72
+ - lib/vimeo/advanced/video.rb
73
+ - lib/vimeo/simple.rb
74
+ - lib/vimeo/simple/activity.rb
75
+ - lib/vimeo/simple/album.rb
76
+ - lib/vimeo/simple/base.rb
77
+ - lib/vimeo/simple/channel.rb
78
+ - lib/vimeo/simple/clip.rb
79
+ - lib/vimeo/simple/group.rb
80
+ - lib/vimeo/simple/user.rb
81
+ - test/advanced/test_upload.rb
82
+ - test/test_helper.rb
83
+ - vimeo.gemspec
84
+ has_rdoc: false
85
+ homepage: http://github.com/matthooks/vimeo
86
+ licenses:
87
+ post_install_message:
88
+ rdoc_options:
89
+ - --main
90
+ - README.rdoc
91
+ require_paths:
92
+ - lib
93
+ required_ruby_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: "0"
98
+ version:
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: "0"
104
+ version:
105
+ requirements: []
106
+
107
+ rubyforge_project: vimeo
108
+ rubygems_version: 1.3.5
109
+ signing_key:
110
+ specification_version: 3
111
+ summary: ""
112
+ test_files:
113
+ - test/advanced/test_upload.rb
114
+ - test/test_helper.rb