nineflats-api 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/nineflats-api/client.rb +4 -0
- data/lib/nineflats-api/errors.rb +3 -0
- data/lib/nineflats-api/requests.rb +4 -6
- data/lib/nineflats-api/version.rb +1 -1
- metadata +13 -12
data/lib/nineflats-api/client.rb
CHANGED
@@ -17,13 +17,11 @@ module Nineflats
|
|
17
17
|
end # user
|
18
18
|
|
19
19
|
def bookings(user_id)
|
20
|
+
raise Nineflats::NotAuthenticatedException.new("User is not authenticated yet!") unless Client.client.authorized?
|
21
|
+
|
20
22
|
params = {:client_id => consumer.key}
|
21
|
-
|
22
|
-
|
23
|
-
JSON.parse(response.body)
|
24
|
-
else
|
25
|
-
raise "So what?"
|
26
|
-
end
|
23
|
+
response = client.access_token.request(:get, "/api/v1/users/#{user_id}/bookings?#{Nineflats::QueryStringNormalizer.normalize(params)}")
|
24
|
+
JSON.parse(response.body)
|
27
25
|
end # bookings
|
28
26
|
|
29
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nineflats-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,12 +10,12 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2011-11-
|
13
|
+
date: 2011-11-03 00:00:00.000000000 +01:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: oauth
|
18
|
-
requirement: &
|
18
|
+
requirement: &2152501520 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ! '>='
|
@@ -23,10 +23,10 @@ dependencies:
|
|
23
23
|
version: '0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements: *
|
26
|
+
version_requirements: *2152501520
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
|
-
requirement: &
|
29
|
+
requirement: &2152500600 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
32
|
- - ~>
|
@@ -34,10 +34,10 @@ dependencies:
|
|
34
34
|
version: 0.9.0
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
|
-
version_requirements: *
|
37
|
+
version_requirements: *2152500600
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: rspec
|
40
|
-
requirement: &
|
40
|
+
requirement: &2152499760 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ! '>='
|
@@ -45,10 +45,10 @@ dependencies:
|
|
45
45
|
version: '0'
|
46
46
|
type: :development
|
47
47
|
prerelease: false
|
48
|
-
version_requirements: *
|
48
|
+
version_requirements: *2152499760
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: fakeweb
|
51
|
-
requirement: &
|
51
|
+
requirement: &2152499060 !ruby/object:Gem::Requirement
|
52
52
|
none: false
|
53
53
|
requirements:
|
54
54
|
- - ! '>='
|
@@ -56,7 +56,7 @@ dependencies:
|
|
56
56
|
version: '0'
|
57
57
|
type: :development
|
58
58
|
prerelease: false
|
59
|
-
version_requirements: *
|
59
|
+
version_requirements: *2152499060
|
60
60
|
description: Let's you use the 9flats API'
|
61
61
|
email:
|
62
62
|
- lena@zeromail.org
|
@@ -73,6 +73,7 @@ files:
|
|
73
73
|
- lib/nineflats-api/base.rb
|
74
74
|
- lib/nineflats-api/calendar.rb
|
75
75
|
- lib/nineflats-api/client.rb
|
76
|
+
- lib/nineflats-api/errors.rb
|
76
77
|
- lib/nineflats-api/helpers.rb
|
77
78
|
- lib/nineflats-api/paginated_array.rb
|
78
79
|
- lib/nineflats-api/photo.rb
|
@@ -117,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
117
118
|
version: '0'
|
118
119
|
segments:
|
119
120
|
- 0
|
120
|
-
hash:
|
121
|
+
hash: 4559477721164976265
|
121
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
123
|
none: false
|
123
124
|
requirements:
|
@@ -126,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
127
|
version: '0'
|
127
128
|
segments:
|
128
129
|
- 0
|
129
|
-
hash:
|
130
|
+
hash: 4559477721164976265
|
130
131
|
requirements: []
|
131
132
|
rubyforge_project:
|
132
133
|
rubygems_version: 1.6.2
|