my_society-map_it 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/my_society/map_it/version.rb +1 -1
- data/lib/my_society/map_it.rb +10 -0
- metadata +2 -2
data/lib/my_society/map_it.rb
CHANGED
@@ -41,6 +41,12 @@ module MySociety
|
|
41
41
|
attr_accessor :attributes
|
42
42
|
private :attributes=, :attributes
|
43
43
|
|
44
|
+
def self.find uri
|
45
|
+
u = URI.parse uri
|
46
|
+
r = Net::HTTP.get_response u
|
47
|
+
new JSON.parse r.body
|
48
|
+
end
|
49
|
+
|
44
50
|
def initialize attributes
|
45
51
|
self.attributes = attributes
|
46
52
|
end
|
@@ -52,6 +58,10 @@ module MySociety
|
|
52
58
|
def id
|
53
59
|
attributes['id']
|
54
60
|
end
|
61
|
+
|
62
|
+
def uri
|
63
|
+
[ MySociety::MapIt.base_url, 'area', id ].join '/'
|
64
|
+
end
|
55
65
|
end
|
56
66
|
|
57
67
|
class Point
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: my_society-map_it
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-13 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: API for MySociety's MapIt service
|
15
15
|
email:
|