nineflats-api 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/nineflats-api/requests.rb +13 -1
- data/lib/nineflats-api/version.rb +1 -1
- metadata +11 -11
@@ -5,6 +5,17 @@ module Nineflats
|
|
5
5
|
end
|
6
6
|
|
7
7
|
module ClassMethods
|
8
|
+
|
9
|
+
def user(user_id)
|
10
|
+
url = "/api/v1/users/#{user_id}?#{Nineflats::QueryStringNormalizer.normalize({:client_id => consumer.key})}"
|
11
|
+
response = if client.access_token
|
12
|
+
client.access_token.request(:get, url)
|
13
|
+
else
|
14
|
+
consumer.request(:get, url)
|
15
|
+
end
|
16
|
+
JSON.parse(response.body)
|
17
|
+
end # user
|
18
|
+
|
8
19
|
def bookings(user_id)
|
9
20
|
params = {:client_id => consumer.key}
|
10
21
|
if client.access_token
|
@@ -13,7 +24,8 @@ module Nineflats
|
|
13
24
|
else
|
14
25
|
raise "So what?"
|
15
26
|
end
|
16
|
-
end
|
27
|
+
end # bookings
|
28
|
+
|
17
29
|
end
|
18
30
|
end
|
19
31
|
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.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -15,7 +15,7 @@ default_executable:
|
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: oauth
|
18
|
-
requirement: &
|
18
|
+
requirement: &2152423640 !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: *2152423640
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
|
-
requirement: &
|
29
|
+
requirement: &2152422700 !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: *2152422700
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: rspec
|
40
|
-
requirement: &
|
40
|
+
requirement: &2152421900 !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: *2152421900
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: fakeweb
|
51
|
-
requirement: &
|
51
|
+
requirement: &2152403820 !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: *2152403820
|
60
60
|
description: Let's you use the 9flats API'
|
61
61
|
email:
|
62
62
|
- lena@zeromail.org
|
@@ -117,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
segments:
|
119
119
|
- 0
|
120
|
-
hash: -
|
120
|
+
hash: -279830250257948186
|
121
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
122
|
none: false
|
123
123
|
requirements:
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
version: '0'
|
127
127
|
segments:
|
128
128
|
- 0
|
129
|
-
hash: -
|
129
|
+
hash: -279830250257948186
|
130
130
|
requirements: []
|
131
131
|
rubyforge_project:
|
132
132
|
rubygems_version: 1.6.2
|