whos_got_dirt 0.0.2 → 0.0.3
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.
- checksums.yaml +4 -4
- data/Gemfile +0 -3
- data/README.md +1 -1
- data/Rakefile +0 -53
- data/lib/whos_got_dirt/requests/entity/poderopedia.rb +4 -4
- data/lib/whos_got_dirt/response.rb +11 -0
- data/lib/whos_got_dirt/responses/entity/little_sis.rb +1 -1
- data/lib/whos_got_dirt/responses/entity/open_corporates.rb +7 -6
- data/lib/whos_got_dirt/responses/entity/open_duka.rb +8 -0
- data/lib/whos_got_dirt/responses/entity/poderopedia.rb +1 -1
- data/lib/whos_got_dirt/responses/helpers/little_sis.rb +19 -0
- data/lib/whos_got_dirt/responses/list/little_sis.rb +2 -2
- data/lib/whos_got_dirt/responses/list/open_corporates.rb +2 -2
- data/lib/whos_got_dirt/responses/relation/open_oil.rb +13 -3
- data/lib/whos_got_dirt/result.rb +2 -2
- data/lib/whos_got_dirt/validator.rb +1 -1
- data/lib/whos_got_dirt/version.rb +1 -1
- data/schemas/schema.json +388 -0
- data/spec/cassettes/little_sis_entity_error.yml +57 -0
- data/spec/cassettes/little_sis_list_error.yml +57 -0
- data/spec/cassettes/open_duka_entity_error.yml +37 -0
- data/spec/response_spec.rb +20 -10
- data/spec/responses/entity/little_sis_spec.rb +35 -17
- data/spec/responses/entity/open_duka_spec.rb +31 -13
- data/spec/responses/list/little_sis_spec.rb +35 -17
- data/spec/result_spec.rb +6 -6
- data/spec/validator_spec.rb +5 -5
- data/whos_got_dirt.gemspec +2 -1
- metadata +24 -4
- data/schemas/popolo.json +0 -1619
data/spec/validator_spec.rb
CHANGED
@@ -4,8 +4,8 @@ module WhosGotDirt
|
|
4
4
|
RSpec.describe Validator do
|
5
5
|
let :invalid do
|
6
6
|
{
|
7
|
-
'id' => 123,
|
8
7
|
'name' => 'John Smith',
|
8
|
+
'birth_date' => 2015,
|
9
9
|
'identifiers' => [{
|
10
10
|
'scheme' => 'ACME',
|
11
11
|
}, {
|
@@ -18,8 +18,8 @@ module WhosGotDirt
|
|
18
18
|
|
19
19
|
let :valid do
|
20
20
|
{
|
21
|
-
'id' => '123',
|
22
21
|
'name' => 'John Smith',
|
22
|
+
'birth_date' => '2015',
|
23
23
|
'identifiers' => [{
|
24
24
|
'identifier' => 'john-smith',
|
25
25
|
}],
|
@@ -28,15 +28,15 @@ module WhosGotDirt
|
|
28
28
|
|
29
29
|
describe '.validate' do
|
30
30
|
it 'should return errors for invalid data' do
|
31
|
-
expect(Validator.validate(invalid, '
|
32
|
-
['#/
|
31
|
+
expect(Validator.validate(invalid, 'entity').map{|error| [error[:fragment], error[:failed_attribute]]}).to eq([
|
32
|
+
['#/birth_date', 'Type'],
|
33
33
|
['#/identifiers/0', 'Properties'],
|
34
34
|
['#/identifiers/2', 'Properties'],
|
35
35
|
])
|
36
36
|
end
|
37
37
|
|
38
38
|
it 'should not return errors for valid data' do
|
39
|
-
expect(Validator.validate(valid, '
|
39
|
+
expect(Validator.validate(valid, 'entity')).to eq([])
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
data/whos_got_dirt.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.authors = ["James McKinney"]
|
9
9
|
s.homepage = "https://github.com/influencemapping/whos_got_dirt"
|
10
|
-
s.summary = %q{A federated search API for
|
10
|
+
s.summary = %q{A federated search API for influence data}
|
11
11
|
s.license = 'MIT'
|
12
12
|
|
13
13
|
s.files = `git ls-files`.split("\n")
|
@@ -25,4 +25,5 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.add_development_dependency('faraday')
|
26
26
|
s.add_development_dependency('rake')
|
27
27
|
s.add_development_dependency('rspec', '~> 3.1')
|
28
|
+
s.add_development_dependency('vcr')
|
28
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whos_got_dirt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James McKinney
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '3.1'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: vcr
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
139
153
|
description:
|
140
154
|
email:
|
141
155
|
executables: []
|
@@ -183,14 +197,17 @@ files:
|
|
183
197
|
- lib/whos_got_dirt/result.rb
|
184
198
|
- lib/whos_got_dirt/validator.rb
|
185
199
|
- lib/whos_got_dirt/version.rb
|
186
|
-
- schemas/
|
200
|
+
- schemas/schema.json
|
187
201
|
- spec/cassettes/corp_watch_entity.yml
|
188
202
|
- spec/cassettes/little_sis_entity.yml
|
203
|
+
- spec/cassettes/little_sis_entity_error.yml
|
189
204
|
- spec/cassettes/little_sis_list.yml
|
205
|
+
- spec/cassettes/little_sis_list_error.yml
|
190
206
|
- spec/cassettes/open_corporates_entity.yml
|
191
207
|
- spec/cassettes/open_corporates_list.yml
|
192
208
|
- spec/cassettes/open_corporates_relation.yml
|
193
209
|
- spec/cassettes/open_duka_entity.yml
|
210
|
+
- spec/cassettes/open_duka_entity_error.yml
|
194
211
|
- spec/cassettes/open_oil_relation.yml
|
195
212
|
- spec/cassettes/poderopedia_entity.yml
|
196
213
|
- spec/renderer_spec.rb
|
@@ -242,15 +259,18 @@ rubyforge_project:
|
|
242
259
|
rubygems_version: 2.4.5
|
243
260
|
signing_key:
|
244
261
|
specification_version: 4
|
245
|
-
summary: A federated search API for
|
262
|
+
summary: A federated search API for influence data
|
246
263
|
test_files:
|
247
264
|
- spec/cassettes/corp_watch_entity.yml
|
248
265
|
- spec/cassettes/little_sis_entity.yml
|
266
|
+
- spec/cassettes/little_sis_entity_error.yml
|
249
267
|
- spec/cassettes/little_sis_list.yml
|
268
|
+
- spec/cassettes/little_sis_list_error.yml
|
250
269
|
- spec/cassettes/open_corporates_entity.yml
|
251
270
|
- spec/cassettes/open_corporates_list.yml
|
252
271
|
- spec/cassettes/open_corporates_relation.yml
|
253
272
|
- spec/cassettes/open_duka_entity.yml
|
273
|
+
- spec/cassettes/open_duka_entity_error.yml
|
254
274
|
- spec/cassettes/open_oil_relation.yml
|
255
275
|
- spec/cassettes/poderopedia_entity.yml
|
256
276
|
- spec/renderer_spec.rb
|
data/schemas/popolo.json
DELETED
@@ -1,1619 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
3
|
-
"definitions": {
|
4
|
-
"entity": {
|
5
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
6
|
-
"type": "object"
|
7
|
-
},
|
8
|
-
"list": {
|
9
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
10
|
-
"type": "object"
|
11
|
-
},
|
12
|
-
"relation": {
|
13
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
14
|
-
"type": "object"
|
15
|
-
},
|
16
|
-
"organization": {
|
17
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
18
|
-
"title": "Organization",
|
19
|
-
"description": "A group with a common purpose or reason for existence that goes beyond the set of people belonging to it",
|
20
|
-
"type": "object",
|
21
|
-
"properties": {
|
22
|
-
"id": {
|
23
|
-
"description": "The organization's unique identifier",
|
24
|
-
"type": [
|
25
|
-
"string",
|
26
|
-
"null"
|
27
|
-
]
|
28
|
-
},
|
29
|
-
"name": {
|
30
|
-
"description": "A primary name, e.g. a legally recognized name",
|
31
|
-
"type": [
|
32
|
-
"string",
|
33
|
-
"null"
|
34
|
-
]
|
35
|
-
},
|
36
|
-
"other_names": {
|
37
|
-
"description": "Alternate or former names",
|
38
|
-
"type": "array",
|
39
|
-
"items": {
|
40
|
-
"$ref": "#/definitions/other_name"
|
41
|
-
}
|
42
|
-
},
|
43
|
-
"identifiers": {
|
44
|
-
"description": "Issued identifiers",
|
45
|
-
"type": "array",
|
46
|
-
"items": {
|
47
|
-
"$ref": "#/definitions/identifier"
|
48
|
-
}
|
49
|
-
},
|
50
|
-
"classification": {
|
51
|
-
"description": "An organization category, e.g. committee",
|
52
|
-
"type": [
|
53
|
-
"string",
|
54
|
-
"null"
|
55
|
-
]
|
56
|
-
},
|
57
|
-
"parent_id": {
|
58
|
-
"description": "The ID of the organization that contains this organization",
|
59
|
-
"type": [
|
60
|
-
"string",
|
61
|
-
"null"
|
62
|
-
]
|
63
|
-
},
|
64
|
-
"parent": {
|
65
|
-
"description": "The organization that contains this organization",
|
66
|
-
"$ref": "#/definitions/organization"
|
67
|
-
},
|
68
|
-
"area_id": {
|
69
|
-
"description": "The ID of the geographic area to which this organization is related",
|
70
|
-
"type": [
|
71
|
-
"string",
|
72
|
-
"null"
|
73
|
-
]
|
74
|
-
},
|
75
|
-
"area": {
|
76
|
-
"description": "The geographic area to which this organization is related",
|
77
|
-
"$ref": "#/definitions/area"
|
78
|
-
},
|
79
|
-
"abstract": {
|
80
|
-
"description": "A one-line description of an organization",
|
81
|
-
"type": [
|
82
|
-
"string",
|
83
|
-
"null"
|
84
|
-
]
|
85
|
-
},
|
86
|
-
"description": {
|
87
|
-
"description": "An extended description of an organization",
|
88
|
-
"type": [
|
89
|
-
"string",
|
90
|
-
"null"
|
91
|
-
]
|
92
|
-
},
|
93
|
-
"founding_date": {
|
94
|
-
"description": "A date of founding",
|
95
|
-
"type": [
|
96
|
-
"string",
|
97
|
-
"null"
|
98
|
-
],
|
99
|
-
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
100
|
-
},
|
101
|
-
"dissolution_date": {
|
102
|
-
"description": "A date of dissolution",
|
103
|
-
"type": [
|
104
|
-
"string",
|
105
|
-
"null"
|
106
|
-
],
|
107
|
-
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
108
|
-
},
|
109
|
-
"image": {
|
110
|
-
"description": "A URL of an image",
|
111
|
-
"type": [
|
112
|
-
"string",
|
113
|
-
"null"
|
114
|
-
],
|
115
|
-
"format": "uri"
|
116
|
-
},
|
117
|
-
"contact_details": {
|
118
|
-
"description": "Means of contacting the organization",
|
119
|
-
"type": "array",
|
120
|
-
"items": {
|
121
|
-
"$ref": "#/definitions/contact_detail"
|
122
|
-
}
|
123
|
-
},
|
124
|
-
"links": {
|
125
|
-
"description": "URLs to documents about the organization",
|
126
|
-
"type": "array",
|
127
|
-
"items": {
|
128
|
-
"$ref": "#/definitions/link"
|
129
|
-
}
|
130
|
-
},
|
131
|
-
"memberships": {
|
132
|
-
"description": "The memberships of the members of the organization and of the organization itself",
|
133
|
-
"type": "array",
|
134
|
-
"items": {
|
135
|
-
"$ref": "#/definitions/membership"
|
136
|
-
}
|
137
|
-
},
|
138
|
-
"posts": {
|
139
|
-
"description": "Posts within the organization",
|
140
|
-
"type": "array",
|
141
|
-
"items": {
|
142
|
-
"$ref": "#/definitions/post"
|
143
|
-
}
|
144
|
-
},
|
145
|
-
"motions": {
|
146
|
-
"description": "Motions within the organization",
|
147
|
-
"type": "array",
|
148
|
-
"items": {
|
149
|
-
"$ref": "#/definitions/motion"
|
150
|
-
}
|
151
|
-
},
|
152
|
-
"vote_events": {
|
153
|
-
"description": "Vote events in which members of the organization are voting",
|
154
|
-
"type": "array",
|
155
|
-
"items": {
|
156
|
-
"$ref": "#/definitions/vote_event"
|
157
|
-
}
|
158
|
-
},
|
159
|
-
"votes": {
|
160
|
-
"description": "Votes cast by the organization",
|
161
|
-
"type": "array",
|
162
|
-
"items": {
|
163
|
-
"$ref": "#/definitions/vote"
|
164
|
-
}
|
165
|
-
},
|
166
|
-
"children": {
|
167
|
-
"description": "The sub-organizations of the organization",
|
168
|
-
"type": "array",
|
169
|
-
"items": {
|
170
|
-
"$ref": "#/definitions/organization"
|
171
|
-
}
|
172
|
-
},
|
173
|
-
"created_at": {
|
174
|
-
"description": "The time at which the resource was created",
|
175
|
-
"type": [
|
176
|
-
"string",
|
177
|
-
"null"
|
178
|
-
],
|
179
|
-
"format": "date-time"
|
180
|
-
},
|
181
|
-
"updated_at": {
|
182
|
-
"description": "The time at which the resource was last modified",
|
183
|
-
"type": [
|
184
|
-
"string",
|
185
|
-
"null"
|
186
|
-
],
|
187
|
-
"format": "date-time"
|
188
|
-
},
|
189
|
-
"sources": {
|
190
|
-
"description": "URLs to documents from which the resource is derived",
|
191
|
-
"type": "array",
|
192
|
-
"items": {
|
193
|
-
"$ref": "#/definitions/link"
|
194
|
-
}
|
195
|
-
}
|
196
|
-
}
|
197
|
-
},
|
198
|
-
"other_name": {
|
199
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
200
|
-
"title": "Other name",
|
201
|
-
"description": "An alternate or former name",
|
202
|
-
"type": "object",
|
203
|
-
"properties": {
|
204
|
-
"name": {
|
205
|
-
"description": "An alternate or former name",
|
206
|
-
"type": "string"
|
207
|
-
},
|
208
|
-
"family_name": {
|
209
|
-
"description": "One or more family names",
|
210
|
-
"type": [
|
211
|
-
"string",
|
212
|
-
"null"
|
213
|
-
]
|
214
|
-
},
|
215
|
-
"given_name": {
|
216
|
-
"description": "One or more primary given names",
|
217
|
-
"type": [
|
218
|
-
"string",
|
219
|
-
"null"
|
220
|
-
]
|
221
|
-
},
|
222
|
-
"additional_name": {
|
223
|
-
"description": "One or more secondary given names",
|
224
|
-
"type": [
|
225
|
-
"string",
|
226
|
-
"null"
|
227
|
-
]
|
228
|
-
},
|
229
|
-
"honorific_prefix": {
|
230
|
-
"description": "One or more honorifics preceding a person's name",
|
231
|
-
"type": [
|
232
|
-
"string",
|
233
|
-
"null"
|
234
|
-
]
|
235
|
-
},
|
236
|
-
"honorific_suffix": {
|
237
|
-
"description": "One or more honorifics following a person's name",
|
238
|
-
"type": [
|
239
|
-
"string",
|
240
|
-
"null"
|
241
|
-
]
|
242
|
-
},
|
243
|
-
"patronymic_name": {
|
244
|
-
"description": "One or more patronymic names",
|
245
|
-
"type": [
|
246
|
-
"string",
|
247
|
-
"null"
|
248
|
-
]
|
249
|
-
},
|
250
|
-
"start_date": {
|
251
|
-
"description": "The date on which the name was adopted",
|
252
|
-
"type": [
|
253
|
-
"string",
|
254
|
-
"null"
|
255
|
-
],
|
256
|
-
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
257
|
-
},
|
258
|
-
"end_date": {
|
259
|
-
"description": "The date on which the name was abandoned",
|
260
|
-
"type": [
|
261
|
-
"string",
|
262
|
-
"null"
|
263
|
-
],
|
264
|
-
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
265
|
-
},
|
266
|
-
"note": {
|
267
|
-
"description": "A note, e.g. 'Birth name'",
|
268
|
-
"type": [
|
269
|
-
"string",
|
270
|
-
"null"
|
271
|
-
]
|
272
|
-
}
|
273
|
-
}
|
274
|
-
},
|
275
|
-
"identifier": {
|
276
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
277
|
-
"title": "Identifier",
|
278
|
-
"description": "An issued identifier",
|
279
|
-
"type": "object",
|
280
|
-
"properties": {
|
281
|
-
"identifier": {
|
282
|
-
"description": "An issued identifier, e.g. a DUNS number",
|
283
|
-
"type": "string",
|
284
|
-
"required": true
|
285
|
-
},
|
286
|
-
"scheme": {
|
287
|
-
"description": "An identifier scheme, e.g. DUNS",
|
288
|
-
"type": [
|
289
|
-
"string",
|
290
|
-
"null"
|
291
|
-
]
|
292
|
-
}
|
293
|
-
}
|
294
|
-
},
|
295
|
-
"area": {
|
296
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
297
|
-
"title": "Area",
|
298
|
-
"description": "A geographic area whose geometry may change over time",
|
299
|
-
"type": "object",
|
300
|
-
"properties": {
|
301
|
-
"id": {
|
302
|
-
"description": "The area's unique identifier",
|
303
|
-
"type": [
|
304
|
-
"string",
|
305
|
-
"null"
|
306
|
-
]
|
307
|
-
},
|
308
|
-
"name": {
|
309
|
-
"description": "A primary name",
|
310
|
-
"type": [
|
311
|
-
"string",
|
312
|
-
"null"
|
313
|
-
]
|
314
|
-
},
|
315
|
-
"identifier": {
|
316
|
-
"description": "An issued identifier",
|
317
|
-
"type": [
|
318
|
-
"string",
|
319
|
-
"null"
|
320
|
-
]
|
321
|
-
},
|
322
|
-
"classification": {
|
323
|
-
"description": "An area category, e.g. city",
|
324
|
-
"type": [
|
325
|
-
"string",
|
326
|
-
"null"
|
327
|
-
]
|
328
|
-
},
|
329
|
-
"parent_id": {
|
330
|
-
"description": "The ID of the area that contains this area",
|
331
|
-
"type": [
|
332
|
-
"string",
|
333
|
-
"null"
|
334
|
-
]
|
335
|
-
},
|
336
|
-
"parent": {
|
337
|
-
"description": "The area that contains this area",
|
338
|
-
"$ref": "#/definitions/area"
|
339
|
-
},
|
340
|
-
"geometry": {
|
341
|
-
"description": "A geometry",
|
342
|
-
"type": [
|
343
|
-
"object",
|
344
|
-
"null"
|
345
|
-
]
|
346
|
-
},
|
347
|
-
"memberships": {
|
348
|
-
"description": "The memberships to which this area is related",
|
349
|
-
"type": "array",
|
350
|
-
"items": {
|
351
|
-
"$ref": "#/definitions/membership"
|
352
|
-
}
|
353
|
-
},
|
354
|
-
"organizations": {
|
355
|
-
"description": "The organizations to which this area is related",
|
356
|
-
"type": "array",
|
357
|
-
"items": {
|
358
|
-
"$ref": "#/definitions/organization"
|
359
|
-
}
|
360
|
-
},
|
361
|
-
"posts": {
|
362
|
-
"description": "The posts to which this area is related",
|
363
|
-
"type": "array",
|
364
|
-
"items": {
|
365
|
-
"$ref": "#/definitions/post"
|
366
|
-
}
|
367
|
-
},
|
368
|
-
"children": {
|
369
|
-
"description": "The sub-areas of the area",
|
370
|
-
"type": "array",
|
371
|
-
"items": {
|
372
|
-
"$ref": "#/definitions/area"
|
373
|
-
}
|
374
|
-
},
|
375
|
-
"created_at": {
|
376
|
-
"description": "The time at which the resource was created",
|
377
|
-
"type": [
|
378
|
-
"string",
|
379
|
-
"null"
|
380
|
-
],
|
381
|
-
"format": "date-time"
|
382
|
-
},
|
383
|
-
"updated_at": {
|
384
|
-
"description": "The time at which the resource was last modified",
|
385
|
-
"type": [
|
386
|
-
"string",
|
387
|
-
"null"
|
388
|
-
],
|
389
|
-
"format": "date-time"
|
390
|
-
},
|
391
|
-
"sources": {
|
392
|
-
"description": "URLs to documents from which the resource is derived",
|
393
|
-
"type": "array",
|
394
|
-
"items": {
|
395
|
-
"$ref": "#/definitions/link"
|
396
|
-
}
|
397
|
-
}
|
398
|
-
}
|
399
|
-
},
|
400
|
-
"membership": {
|
401
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
402
|
-
"title": "Membership",
|
403
|
-
"description": "A relationship between a member and an organization",
|
404
|
-
"type": "object",
|
405
|
-
"properties": {
|
406
|
-
"id": {
|
407
|
-
"description": "The membership's unique identifier",
|
408
|
-
"type": [
|
409
|
-
"string",
|
410
|
-
"null"
|
411
|
-
]
|
412
|
-
},
|
413
|
-
"label": {
|
414
|
-
"description": "A label describing the membership",
|
415
|
-
"type": [
|
416
|
-
"string",
|
417
|
-
"null"
|
418
|
-
]
|
419
|
-
},
|
420
|
-
"role": {
|
421
|
-
"description": "The role that the member fulfills in the organization",
|
422
|
-
"type": [
|
423
|
-
"string",
|
424
|
-
"null"
|
425
|
-
]
|
426
|
-
},
|
427
|
-
"member": {
|
428
|
-
"description": "The person or organization that is a member of the organization",
|
429
|
-
"type": [
|
430
|
-
"object",
|
431
|
-
"null"
|
432
|
-
]
|
433
|
-
},
|
434
|
-
"person_id": {
|
435
|
-
"description": "The ID of the person who is a member of the organization",
|
436
|
-
"type": [
|
437
|
-
"string",
|
438
|
-
"null"
|
439
|
-
]
|
440
|
-
},
|
441
|
-
"person": {
|
442
|
-
"description": "The person who is a member of the organization",
|
443
|
-
"$ref": "#/definitions/person"
|
444
|
-
},
|
445
|
-
"organization_id": {
|
446
|
-
"description": "The ID of the organization in which the person or organization is a member",
|
447
|
-
"type": [
|
448
|
-
"string",
|
449
|
-
"null"
|
450
|
-
]
|
451
|
-
},
|
452
|
-
"organization": {
|
453
|
-
"description": "The organization in which the person or organization is a member",
|
454
|
-
"$ref": "#/definitions/organization"
|
455
|
-
},
|
456
|
-
"post_id": {
|
457
|
-
"description": "The ID of the post held by the member in the organization through this membership",
|
458
|
-
"type": [
|
459
|
-
"string",
|
460
|
-
"null"
|
461
|
-
]
|
462
|
-
},
|
463
|
-
"post": {
|
464
|
-
"description": "The post held by the member in the organization through this membership",
|
465
|
-
"$ref": "#/definitions/post"
|
466
|
-
},
|
467
|
-
"on_behalf_of_id": {
|
468
|
-
"description": "The ID of the organization on whose behalf the person is a member of the organization",
|
469
|
-
"type": [
|
470
|
-
"string",
|
471
|
-
"null"
|
472
|
-
]
|
473
|
-
},
|
474
|
-
"on_behalf_of": {
|
475
|
-
"description": "The organization on whose behalf the person is a member of the organization",
|
476
|
-
"$ref": "#/definitions/organization"
|
477
|
-
},
|
478
|
-
"area_id": {
|
479
|
-
"description": "The ID of the geographic area to which this membership is related",
|
480
|
-
"type": [
|
481
|
-
"string",
|
482
|
-
"null"
|
483
|
-
]
|
484
|
-
},
|
485
|
-
"area": {
|
486
|
-
"description": "The geographic area to which this membership is related",
|
487
|
-
"$ref": "#/definitions/area"
|
488
|
-
},
|
489
|
-
"start_date": {
|
490
|
-
"description": "The date on which the relationship began",
|
491
|
-
"type": [
|
492
|
-
"string",
|
493
|
-
"null"
|
494
|
-
],
|
495
|
-
"pattern": "^[0-9]{4}((-[0-9]{2}){0,2}|(-[0-9]{2}){2}(T[0-9]{2}(:[0-9]{2}(:[0-9]{2})?)?Z)?)$"
|
496
|
-
},
|
497
|
-
"end_date": {
|
498
|
-
"description": "The date on which the relationship ended",
|
499
|
-
"type": [
|
500
|
-
"string",
|
501
|
-
"null"
|
502
|
-
],
|
503
|
-
"pattern": "^[0-9]{4}((-[0-9]{2}){0,2}|(-[0-9]{2}){2}(T[0-9]{2}(:[0-9]{2}(:[0-9]{2})?)?Z)?)$"
|
504
|
-
},
|
505
|
-
"contact_details": {
|
506
|
-
"description": "Means of contacting the member of the organization",
|
507
|
-
"type": "array",
|
508
|
-
"items": {
|
509
|
-
"$ref": "#/definitions/contact_detail"
|
510
|
-
}
|
511
|
-
},
|
512
|
-
"links": {
|
513
|
-
"description": "URLs to documents about the membership",
|
514
|
-
"type": "array",
|
515
|
-
"items": {
|
516
|
-
"$ref": "#/definitions/link"
|
517
|
-
}
|
518
|
-
},
|
519
|
-
"created_at": {
|
520
|
-
"description": "The time at which the resource was created",
|
521
|
-
"type": [
|
522
|
-
"string",
|
523
|
-
"null"
|
524
|
-
],
|
525
|
-
"format": "date-time"
|
526
|
-
},
|
527
|
-
"updated_at": {
|
528
|
-
"description": "The time at which the resource was last modified",
|
529
|
-
"type": [
|
530
|
-
"string",
|
531
|
-
"null"
|
532
|
-
],
|
533
|
-
"format": "date-time"
|
534
|
-
},
|
535
|
-
"sources": {
|
536
|
-
"description": "URLs to documents from which the resource is derived",
|
537
|
-
"type": "array",
|
538
|
-
"items": {
|
539
|
-
"$ref": "#/definitions/link"
|
540
|
-
}
|
541
|
-
}
|
542
|
-
}
|
543
|
-
},
|
544
|
-
"person": {
|
545
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
546
|
-
"title": "Person",
|
547
|
-
"description": "A real person, alive or dead",
|
548
|
-
"type": "object",
|
549
|
-
"properties": {
|
550
|
-
"id": {
|
551
|
-
"description": "The person's unique identifier",
|
552
|
-
"type": [
|
553
|
-
"string",
|
554
|
-
"null"
|
555
|
-
]
|
556
|
-
},
|
557
|
-
"name": {
|
558
|
-
"description": "A person's preferred full name",
|
559
|
-
"type": [
|
560
|
-
"string",
|
561
|
-
"null"
|
562
|
-
]
|
563
|
-
},
|
564
|
-
"other_names": {
|
565
|
-
"description": "Alternate or former names",
|
566
|
-
"type": "array",
|
567
|
-
"items": {
|
568
|
-
"$ref": "#/definitions/other_name"
|
569
|
-
}
|
570
|
-
},
|
571
|
-
"identifiers": {
|
572
|
-
"description": "Issued identifiers",
|
573
|
-
"type": "array",
|
574
|
-
"items": {
|
575
|
-
"$ref": "#/definitions/identifier"
|
576
|
-
}
|
577
|
-
},
|
578
|
-
"family_name": {
|
579
|
-
"description": "One or more family names",
|
580
|
-
"type": [
|
581
|
-
"string",
|
582
|
-
"null"
|
583
|
-
]
|
584
|
-
},
|
585
|
-
"given_name": {
|
586
|
-
"description": "One or more primary given names",
|
587
|
-
"type": [
|
588
|
-
"string",
|
589
|
-
"null"
|
590
|
-
]
|
591
|
-
},
|
592
|
-
"additional_name": {
|
593
|
-
"description": "One or more secondary given names",
|
594
|
-
"type": [
|
595
|
-
"string",
|
596
|
-
"null"
|
597
|
-
]
|
598
|
-
},
|
599
|
-
"honorific_prefix": {
|
600
|
-
"description": "One or more honorifics preceding a person's name",
|
601
|
-
"type": [
|
602
|
-
"string",
|
603
|
-
"null"
|
604
|
-
]
|
605
|
-
},
|
606
|
-
"honorific_suffix": {
|
607
|
-
"description": "One or more honorifics following a person's name",
|
608
|
-
"type": [
|
609
|
-
"string",
|
610
|
-
"null"
|
611
|
-
]
|
612
|
-
},
|
613
|
-
"patronymic_name": {
|
614
|
-
"description": "One or more patronymic names",
|
615
|
-
"type": [
|
616
|
-
"string",
|
617
|
-
"null"
|
618
|
-
]
|
619
|
-
},
|
620
|
-
"sort_name": {
|
621
|
-
"description": "A name to use in a lexicographically ordered list",
|
622
|
-
"type": [
|
623
|
-
"string",
|
624
|
-
"null"
|
625
|
-
]
|
626
|
-
},
|
627
|
-
"email": {
|
628
|
-
"description": "A preferred email address",
|
629
|
-
"type": [
|
630
|
-
"string",
|
631
|
-
"null"
|
632
|
-
],
|
633
|
-
"format": "email"
|
634
|
-
},
|
635
|
-
"gender": {
|
636
|
-
"description": "A gender",
|
637
|
-
"type": [
|
638
|
-
"string",
|
639
|
-
"null"
|
640
|
-
]
|
641
|
-
},
|
642
|
-
"birth_date": {
|
643
|
-
"description": "A date of birth",
|
644
|
-
"type": [
|
645
|
-
"string",
|
646
|
-
"null"
|
647
|
-
],
|
648
|
-
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
649
|
-
},
|
650
|
-
"death_date": {
|
651
|
-
"description": "A date of death",
|
652
|
-
"type": [
|
653
|
-
"string",
|
654
|
-
"null"
|
655
|
-
],
|
656
|
-
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
657
|
-
},
|
658
|
-
"image": {
|
659
|
-
"description": "A URL of a head shot",
|
660
|
-
"type": [
|
661
|
-
"string",
|
662
|
-
"null"
|
663
|
-
],
|
664
|
-
"format": "uri"
|
665
|
-
},
|
666
|
-
"summary": {
|
667
|
-
"description": "A one-line account of a person's life",
|
668
|
-
"type": [
|
669
|
-
"string",
|
670
|
-
"null"
|
671
|
-
]
|
672
|
-
},
|
673
|
-
"biography": {
|
674
|
-
"description": "An extended account of a person's life",
|
675
|
-
"type": [
|
676
|
-
"string",
|
677
|
-
"null"
|
678
|
-
]
|
679
|
-
},
|
680
|
-
"national_identity": {
|
681
|
-
"description": "A national identity",
|
682
|
-
"type": [
|
683
|
-
"string",
|
684
|
-
"null"
|
685
|
-
]
|
686
|
-
},
|
687
|
-
"contact_details": {
|
688
|
-
"description": "Means of contacting the person",
|
689
|
-
"type": "array",
|
690
|
-
"items": {
|
691
|
-
"$ref": "#/definitions/contact_detail"
|
692
|
-
}
|
693
|
-
},
|
694
|
-
"links": {
|
695
|
-
"description": "URLs to documents about the person",
|
696
|
-
"type": "array",
|
697
|
-
"items": {
|
698
|
-
"$ref": "#/definitions/link"
|
699
|
-
}
|
700
|
-
},
|
701
|
-
"memberships": {
|
702
|
-
"description": "The person's memberships",
|
703
|
-
"type": "array",
|
704
|
-
"items": {
|
705
|
-
"$ref": "#/definitions/membership"
|
706
|
-
}
|
707
|
-
},
|
708
|
-
"motions": {
|
709
|
-
"description": "The person's motions",
|
710
|
-
"type": "array",
|
711
|
-
"items": {
|
712
|
-
"$ref": "#/definitions/motion"
|
713
|
-
}
|
714
|
-
},
|
715
|
-
"speeches": {
|
716
|
-
"description": "The person's speeches",
|
717
|
-
"type": "array",
|
718
|
-
"items": {
|
719
|
-
"$ref": "#/definitions/speech"
|
720
|
-
}
|
721
|
-
},
|
722
|
-
"votes": {
|
723
|
-
"description": "Votes cast by the person",
|
724
|
-
"type": "array",
|
725
|
-
"items": {
|
726
|
-
"$ref": "#/definitions/vote"
|
727
|
-
}
|
728
|
-
},
|
729
|
-
"created_at": {
|
730
|
-
"description": "The time at which the resource was created",
|
731
|
-
"type": [
|
732
|
-
"string",
|
733
|
-
"null"
|
734
|
-
],
|
735
|
-
"format": "date-time"
|
736
|
-
},
|
737
|
-
"updated_at": {
|
738
|
-
"description": "The time at which the resource was last modified",
|
739
|
-
"type": [
|
740
|
-
"string",
|
741
|
-
"null"
|
742
|
-
],
|
743
|
-
"format": "date-time"
|
744
|
-
},
|
745
|
-
"sources": {
|
746
|
-
"description": "URLs to documents from which the resource is derived",
|
747
|
-
"type": "array",
|
748
|
-
"items": {
|
749
|
-
"$ref": "#/definitions/link"
|
750
|
-
}
|
751
|
-
}
|
752
|
-
}
|
753
|
-
},
|
754
|
-
"contact_detail": {
|
755
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
756
|
-
"title": "Contact detail",
|
757
|
-
"description": "A means of contacting an entity",
|
758
|
-
"type": "object",
|
759
|
-
"properties": {
|
760
|
-
"label": {
|
761
|
-
"description": "A human-readable label for the contact detail",
|
762
|
-
"type": [
|
763
|
-
"string",
|
764
|
-
"null"
|
765
|
-
]
|
766
|
-
},
|
767
|
-
"type": {
|
768
|
-
"description": "A type of medium, e.g. 'fax' or 'email'",
|
769
|
-
"type": "string",
|
770
|
-
"required": true
|
771
|
-
},
|
772
|
-
"value": {
|
773
|
-
"description": "A value, e.g. a phone number or email address",
|
774
|
-
"type": "string",
|
775
|
-
"required": true
|
776
|
-
},
|
777
|
-
"note": {
|
778
|
-
"description": "A note, e.g. for grouping contact details by physical location",
|
779
|
-
"type": [
|
780
|
-
"string",
|
781
|
-
"null"
|
782
|
-
]
|
783
|
-
},
|
784
|
-
"valid_from": {
|
785
|
-
"description": "The date from which the contact detail is valid",
|
786
|
-
"type": [
|
787
|
-
"string",
|
788
|
-
"null"
|
789
|
-
],
|
790
|
-
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
791
|
-
},
|
792
|
-
"valid_until": {
|
793
|
-
"description": "The date from which the contact detail is no longer valid",
|
794
|
-
"type": [
|
795
|
-
"string",
|
796
|
-
"null"
|
797
|
-
],
|
798
|
-
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
799
|
-
},
|
800
|
-
"created_at": {
|
801
|
-
"description": "The time at which the resource was created",
|
802
|
-
"type": [
|
803
|
-
"string",
|
804
|
-
"null"
|
805
|
-
],
|
806
|
-
"format": "date-time"
|
807
|
-
},
|
808
|
-
"updated_at": {
|
809
|
-
"description": "The time at which the resource was last modified",
|
810
|
-
"type": [
|
811
|
-
"string",
|
812
|
-
"null"
|
813
|
-
],
|
814
|
-
"format": "date-time"
|
815
|
-
},
|
816
|
-
"sources": {
|
817
|
-
"description": "URLs to documents from which the resource is derived",
|
818
|
-
"type": "array",
|
819
|
-
"items": {
|
820
|
-
"$ref": "#/definitions/link"
|
821
|
-
}
|
822
|
-
}
|
823
|
-
}
|
824
|
-
},
|
825
|
-
"link": {
|
826
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
827
|
-
"title": "Link",
|
828
|
-
"description": "A URL",
|
829
|
-
"type": "object",
|
830
|
-
"properties": {
|
831
|
-
"url": {
|
832
|
-
"description": "A URL",
|
833
|
-
"type": "string",
|
834
|
-
"format": "uri",
|
835
|
-
"required": true
|
836
|
-
},
|
837
|
-
"note": {
|
838
|
-
"description": "A note, e.g. 'Wikipedia page'",
|
839
|
-
"type": [
|
840
|
-
"string",
|
841
|
-
"null"
|
842
|
-
]
|
843
|
-
}
|
844
|
-
}
|
845
|
-
},
|
846
|
-
"motion": {
|
847
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
848
|
-
"title": "Motion",
|
849
|
-
"description": "A formal step to introduce a matter for consideration by an organization",
|
850
|
-
"type": "object",
|
851
|
-
"properties": {
|
852
|
-
"id": {
|
853
|
-
"description": "The motion's unique identifier",
|
854
|
-
"type": [
|
855
|
-
"string",
|
856
|
-
"null"
|
857
|
-
]
|
858
|
-
},
|
859
|
-
"organization_id": {
|
860
|
-
"description": "The ID of the organization in which the motion is proposed",
|
861
|
-
"type": [
|
862
|
-
"string",
|
863
|
-
"null"
|
864
|
-
]
|
865
|
-
},
|
866
|
-
"organization": {
|
867
|
-
"description": "The organization in which the motion is proposed",
|
868
|
-
"$ref": "#/definitions/organization"
|
869
|
-
},
|
870
|
-
"legislative_session_id": {
|
871
|
-
"description": "The ID of the legislative session in which the motion is proposed",
|
872
|
-
"type": [
|
873
|
-
"string",
|
874
|
-
"null"
|
875
|
-
]
|
876
|
-
},
|
877
|
-
"legislative_session": {
|
878
|
-
"description": "The legislative session in which the motion is proposed",
|
879
|
-
"$ref": "#/definitions/event"
|
880
|
-
},
|
881
|
-
"creator_id": {
|
882
|
-
"description": "The ID of the person who proposed the motion",
|
883
|
-
"type": [
|
884
|
-
"string",
|
885
|
-
"null"
|
886
|
-
]
|
887
|
-
},
|
888
|
-
"creator": {
|
889
|
-
"description": "The person who proposed the motion",
|
890
|
-
"$ref": "#/definitions/person"
|
891
|
-
},
|
892
|
-
"text": {
|
893
|
-
"description": "The transcript or text of the motion",
|
894
|
-
"type": [
|
895
|
-
"string",
|
896
|
-
"null"
|
897
|
-
]
|
898
|
-
},
|
899
|
-
"identifier": {
|
900
|
-
"description": "An issued identifier",
|
901
|
-
"type": [
|
902
|
-
"string",
|
903
|
-
"null"
|
904
|
-
]
|
905
|
-
},
|
906
|
-
"classification": {
|
907
|
-
"description": "A motion category, e.g. adjournment",
|
908
|
-
"type": [
|
909
|
-
"string",
|
910
|
-
"null"
|
911
|
-
]
|
912
|
-
},
|
913
|
-
"date": {
|
914
|
-
"description": "The date on which the motion was proposed",
|
915
|
-
"type": [
|
916
|
-
"string",
|
917
|
-
"null"
|
918
|
-
],
|
919
|
-
"format": "date-time"
|
920
|
-
},
|
921
|
-
"requirement": {
|
922
|
-
"description": "The requirement for the motion to be adopted",
|
923
|
-
"type": [
|
924
|
-
"string",
|
925
|
-
"null"
|
926
|
-
]
|
927
|
-
},
|
928
|
-
"result": {
|
929
|
-
"description": "The result of the motion",
|
930
|
-
"type": [
|
931
|
-
"string",
|
932
|
-
"null"
|
933
|
-
]
|
934
|
-
},
|
935
|
-
"vote_events": {
|
936
|
-
"description": "Events at which people vote on the motion",
|
937
|
-
"type": "array",
|
938
|
-
"items": {
|
939
|
-
"$ref": "#/definitions/vote_event"
|
940
|
-
}
|
941
|
-
},
|
942
|
-
"created_at": {
|
943
|
-
"description": "The time at which the resource was created",
|
944
|
-
"type": [
|
945
|
-
"string",
|
946
|
-
"null"
|
947
|
-
],
|
948
|
-
"format": "date-time"
|
949
|
-
},
|
950
|
-
"updated_at": {
|
951
|
-
"description": "The time at which the resource was last modified",
|
952
|
-
"type": [
|
953
|
-
"string",
|
954
|
-
"null"
|
955
|
-
],
|
956
|
-
"format": "date-time"
|
957
|
-
},
|
958
|
-
"sources": {
|
959
|
-
"description": "URLs to documents from which the resource is derived",
|
960
|
-
"type": "array",
|
961
|
-
"items": {
|
962
|
-
"$ref": "#/definitions/link"
|
963
|
-
}
|
964
|
-
}
|
965
|
-
}
|
966
|
-
},
|
967
|
-
"event": {
|
968
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
969
|
-
"title": "Event",
|
970
|
-
"description": "An occurrence that people may attend",
|
971
|
-
"type": "object",
|
972
|
-
"properties": {
|
973
|
-
"id": {
|
974
|
-
"description": "The event's unique identifier",
|
975
|
-
"type": [
|
976
|
-
"string",
|
977
|
-
"null"
|
978
|
-
]
|
979
|
-
},
|
980
|
-
"name": {
|
981
|
-
"description": "The event's name",
|
982
|
-
"type": [
|
983
|
-
"string",
|
984
|
-
"null"
|
985
|
-
]
|
986
|
-
},
|
987
|
-
"description": {
|
988
|
-
"description": "The event's description",
|
989
|
-
"type": [
|
990
|
-
"string",
|
991
|
-
"null"
|
992
|
-
]
|
993
|
-
},
|
994
|
-
"start_date": {
|
995
|
-
"description": "The time at which the event starts",
|
996
|
-
"type": [
|
997
|
-
"string",
|
998
|
-
"null"
|
999
|
-
],
|
1000
|
-
"pattern": "^[0-9]{4}((-[0-9]{2}){0,2}|(-[0-9]{2}){2}(T[0-9]{2}(:[0-9]{2}(:[0-9]{2})?)?Z)?)$"
|
1001
|
-
},
|
1002
|
-
"end_date": {
|
1003
|
-
"description": "The time at which the event ends",
|
1004
|
-
"type": [
|
1005
|
-
"string",
|
1006
|
-
"null"
|
1007
|
-
],
|
1008
|
-
"pattern": "^[0-9]{4}((-[0-9]{2}){0,2}|(-[0-9]{2}){2}(T[0-9]{2}(:[0-9]{2}(:[0-9]{2})?)?Z)?)$"
|
1009
|
-
},
|
1010
|
-
"location": {
|
1011
|
-
"description": "The event's location",
|
1012
|
-
"type": [
|
1013
|
-
"string",
|
1014
|
-
"null"
|
1015
|
-
]
|
1016
|
-
},
|
1017
|
-
"status": {
|
1018
|
-
"description": "The event's status",
|
1019
|
-
"type": [
|
1020
|
-
"string",
|
1021
|
-
"null"
|
1022
|
-
]
|
1023
|
-
},
|
1024
|
-
"identifiers": {
|
1025
|
-
"description": "Issued identifiers",
|
1026
|
-
"type": "array",
|
1027
|
-
"items": {
|
1028
|
-
"$ref": "#/definitions/identifier"
|
1029
|
-
}
|
1030
|
-
},
|
1031
|
-
"classification": {
|
1032
|
-
"description": "The event's category",
|
1033
|
-
"type": [
|
1034
|
-
"string",
|
1035
|
-
"null"
|
1036
|
-
]
|
1037
|
-
},
|
1038
|
-
"organization_id": {
|
1039
|
-
"description": "The ID of the organization organizing the event",
|
1040
|
-
"type": [
|
1041
|
-
"string",
|
1042
|
-
"null"
|
1043
|
-
]
|
1044
|
-
},
|
1045
|
-
"organization": {
|
1046
|
-
"description": "The organization organizing the event",
|
1047
|
-
"$ref": "#/definitions/organization"
|
1048
|
-
},
|
1049
|
-
"attendees": {
|
1050
|
-
"description": "People attending the event",
|
1051
|
-
"type": "array",
|
1052
|
-
"items": {
|
1053
|
-
"$ref": "#/definitions/person"
|
1054
|
-
}
|
1055
|
-
},
|
1056
|
-
"parent_id": {
|
1057
|
-
"description": "The ID of an event that this event is a part of",
|
1058
|
-
"type": [
|
1059
|
-
"string",
|
1060
|
-
"null"
|
1061
|
-
]
|
1062
|
-
},
|
1063
|
-
"parent": {
|
1064
|
-
"description": "An event that this event is a part of",
|
1065
|
-
"$ref": "#/definitions/event"
|
1066
|
-
},
|
1067
|
-
"children": {
|
1068
|
-
"description": "The sub-events of the event",
|
1069
|
-
"type": "array",
|
1070
|
-
"items": {
|
1071
|
-
"$ref": "#/definitions/event"
|
1072
|
-
}
|
1073
|
-
},
|
1074
|
-
"created_at": {
|
1075
|
-
"description": "The time at which the resource was created",
|
1076
|
-
"type": [
|
1077
|
-
"string",
|
1078
|
-
"null"
|
1079
|
-
],
|
1080
|
-
"format": "date-time"
|
1081
|
-
},
|
1082
|
-
"updated_at": {
|
1083
|
-
"description": "The time at which the resource was last modified",
|
1084
|
-
"type": [
|
1085
|
-
"string",
|
1086
|
-
"null"
|
1087
|
-
],
|
1088
|
-
"format": "date-time"
|
1089
|
-
},
|
1090
|
-
"sources": {
|
1091
|
-
"description": "URLs to documents from which the resource is derived",
|
1092
|
-
"type": "array",
|
1093
|
-
"items": {
|
1094
|
-
"$ref": "#/definitions/link"
|
1095
|
-
}
|
1096
|
-
}
|
1097
|
-
}
|
1098
|
-
},
|
1099
|
-
"vote_event": {
|
1100
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
1101
|
-
"title": "Vote event",
|
1102
|
-
"description": "An event at which people's votes are recorded",
|
1103
|
-
"type": "object",
|
1104
|
-
"properties": {
|
1105
|
-
"id": {
|
1106
|
-
"description": "The vote event's unique identifier",
|
1107
|
-
"type": [
|
1108
|
-
"string",
|
1109
|
-
"null"
|
1110
|
-
]
|
1111
|
-
},
|
1112
|
-
"organization_id": {
|
1113
|
-
"description": "The ID of the organization whose members are voting",
|
1114
|
-
"type": [
|
1115
|
-
"string",
|
1116
|
-
"null"
|
1117
|
-
]
|
1118
|
-
},
|
1119
|
-
"organization": {
|
1120
|
-
"description": "The organization whose members are voting",
|
1121
|
-
"$ref": "#/definitions/organization"
|
1122
|
-
},
|
1123
|
-
"legislative_session_id": {
|
1124
|
-
"description": "The ID of the legislative session in which the vote occurs",
|
1125
|
-
"type": [
|
1126
|
-
"string",
|
1127
|
-
"null"
|
1128
|
-
]
|
1129
|
-
},
|
1130
|
-
"legislative_session": {
|
1131
|
-
"description": "The legislative session in which the vote occurs",
|
1132
|
-
"$ref": "#/definitions/event"
|
1133
|
-
},
|
1134
|
-
"identifier": {
|
1135
|
-
"description": "An issued identifier",
|
1136
|
-
"type": [
|
1137
|
-
"string",
|
1138
|
-
"null"
|
1139
|
-
]
|
1140
|
-
},
|
1141
|
-
"motion_id": {
|
1142
|
-
"description": "The ID of the motion being decided",
|
1143
|
-
"type": [
|
1144
|
-
"string",
|
1145
|
-
"null"
|
1146
|
-
]
|
1147
|
-
},
|
1148
|
-
"motion": {
|
1149
|
-
"description": "The motion being decided",
|
1150
|
-
"$ref": "#/definitions/motion"
|
1151
|
-
},
|
1152
|
-
"start_date": {
|
1153
|
-
"description": "The time at which the event begins",
|
1154
|
-
"type": [
|
1155
|
-
"string",
|
1156
|
-
"null"
|
1157
|
-
],
|
1158
|
-
"format": "date-time"
|
1159
|
-
},
|
1160
|
-
"end_date": {
|
1161
|
-
"description": "The time at which the event ends",
|
1162
|
-
"type": [
|
1163
|
-
"string",
|
1164
|
-
"null"
|
1165
|
-
],
|
1166
|
-
"format": "date-time"
|
1167
|
-
},
|
1168
|
-
"result": {
|
1169
|
-
"description": "The result of the vote event",
|
1170
|
-
"type": [
|
1171
|
-
"string",
|
1172
|
-
"null"
|
1173
|
-
]
|
1174
|
-
},
|
1175
|
-
"group_results": {
|
1176
|
-
"description": "The result of the vote event within groups of voters",
|
1177
|
-
"type": "array",
|
1178
|
-
"items": {
|
1179
|
-
"$ref": "#/definitions/group_result"
|
1180
|
-
}
|
1181
|
-
},
|
1182
|
-
"counts": {
|
1183
|
-
"description": "The number of votes for options",
|
1184
|
-
"type": "array",
|
1185
|
-
"items": {
|
1186
|
-
"$ref": "#/definitions/count"
|
1187
|
-
}
|
1188
|
-
},
|
1189
|
-
"votes": {
|
1190
|
-
"description": "Voters' votes",
|
1191
|
-
"type": "array",
|
1192
|
-
"items": {
|
1193
|
-
"$ref": "#/definitions/vote"
|
1194
|
-
}
|
1195
|
-
},
|
1196
|
-
"created_at": {
|
1197
|
-
"description": "The time at which the resource was created",
|
1198
|
-
"type": [
|
1199
|
-
"string",
|
1200
|
-
"null"
|
1201
|
-
],
|
1202
|
-
"format": "date-time"
|
1203
|
-
},
|
1204
|
-
"updated_at": {
|
1205
|
-
"description": "The time at which the resource was last modified",
|
1206
|
-
"type": [
|
1207
|
-
"string",
|
1208
|
-
"null"
|
1209
|
-
],
|
1210
|
-
"format": "date-time"
|
1211
|
-
},
|
1212
|
-
"sources": {
|
1213
|
-
"description": "URLs to documents from which the resource is derived",
|
1214
|
-
"type": "array",
|
1215
|
-
"items": {
|
1216
|
-
"$ref": "#/definitions/link"
|
1217
|
-
}
|
1218
|
-
}
|
1219
|
-
}
|
1220
|
-
},
|
1221
|
-
"group_result": {
|
1222
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
1223
|
-
"title": "Group result",
|
1224
|
-
"description": "A result of a vote event within a group of voters",
|
1225
|
-
"type": "object",
|
1226
|
-
"properties": {
|
1227
|
-
"group_id": {
|
1228
|
-
"description": "The ID of a group of voters",
|
1229
|
-
"type": [
|
1230
|
-
"string",
|
1231
|
-
"null"
|
1232
|
-
]
|
1233
|
-
},
|
1234
|
-
"group": {
|
1235
|
-
"description": "A group of voters",
|
1236
|
-
"type": [
|
1237
|
-
"object",
|
1238
|
-
"null"
|
1239
|
-
]
|
1240
|
-
},
|
1241
|
-
"result": {
|
1242
|
-
"description": "The result of the vote event within a group of voters",
|
1243
|
-
"type": "string",
|
1244
|
-
"required": true
|
1245
|
-
}
|
1246
|
-
}
|
1247
|
-
},
|
1248
|
-
"count": {
|
1249
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
1250
|
-
"title": "Count",
|
1251
|
-
"description": "The number of votes for an option in a vote event",
|
1252
|
-
"type": "object",
|
1253
|
-
"properties": {
|
1254
|
-
"option": {
|
1255
|
-
"description": "An option in a vote event",
|
1256
|
-
"type": "string",
|
1257
|
-
"required": true
|
1258
|
-
},
|
1259
|
-
"value": {
|
1260
|
-
"description": "The number of votes for an option",
|
1261
|
-
"type": "integer",
|
1262
|
-
"required": true
|
1263
|
-
},
|
1264
|
-
"group_id": {
|
1265
|
-
"description": "The ID of a group of voters",
|
1266
|
-
"type": [
|
1267
|
-
"string",
|
1268
|
-
"null"
|
1269
|
-
]
|
1270
|
-
},
|
1271
|
-
"group": {
|
1272
|
-
"description": "A group of voters",
|
1273
|
-
"type": [
|
1274
|
-
"object",
|
1275
|
-
"null"
|
1276
|
-
]
|
1277
|
-
}
|
1278
|
-
}
|
1279
|
-
},
|
1280
|
-
"vote": {
|
1281
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
1282
|
-
"title": "Vote",
|
1283
|
-
"description": "A voter's vote in a vote event",
|
1284
|
-
"type": "object",
|
1285
|
-
"properties": {
|
1286
|
-
"id": {
|
1287
|
-
"description": "The vote's unique identifier",
|
1288
|
-
"type": [
|
1289
|
-
"string",
|
1290
|
-
"null"
|
1291
|
-
]
|
1292
|
-
},
|
1293
|
-
"vote_event_id": {
|
1294
|
-
"description": "The ID of a vote event",
|
1295
|
-
"type": [
|
1296
|
-
"string",
|
1297
|
-
"null"
|
1298
|
-
]
|
1299
|
-
},
|
1300
|
-
"vote_event": {
|
1301
|
-
"description": "A vote event",
|
1302
|
-
"$ref": "#/definitions/vote_event"
|
1303
|
-
},
|
1304
|
-
"voter_id": {
|
1305
|
-
"description": "The ID of the person or organization that is voting",
|
1306
|
-
"type": [
|
1307
|
-
"string",
|
1308
|
-
"null"
|
1309
|
-
]
|
1310
|
-
},
|
1311
|
-
"voter": {
|
1312
|
-
"description": "The person or organization that is voting",
|
1313
|
-
"type": [
|
1314
|
-
"object",
|
1315
|
-
"null"
|
1316
|
-
]
|
1317
|
-
},
|
1318
|
-
"option": {
|
1319
|
-
"description": "The option chosen by the voter, whether actively or passively",
|
1320
|
-
"type": [
|
1321
|
-
"string",
|
1322
|
-
"null"
|
1323
|
-
]
|
1324
|
-
},
|
1325
|
-
"group_id": {
|
1326
|
-
"description": "The ID of the voter's primary political group",
|
1327
|
-
"type": [
|
1328
|
-
"string",
|
1329
|
-
"null"
|
1330
|
-
]
|
1331
|
-
},
|
1332
|
-
"group": {
|
1333
|
-
"description": "The voter's primary political group",
|
1334
|
-
"$ref": "#/definitions/organization"
|
1335
|
-
},
|
1336
|
-
"role": {
|
1337
|
-
"description": "The voter's role in the event",
|
1338
|
-
"type": [
|
1339
|
-
"string",
|
1340
|
-
"null"
|
1341
|
-
]
|
1342
|
-
},
|
1343
|
-
"weight": {
|
1344
|
-
"description": "The weight of the voter's vote",
|
1345
|
-
"type": [
|
1346
|
-
"number",
|
1347
|
-
"null"
|
1348
|
-
]
|
1349
|
-
},
|
1350
|
-
"pair_id": {
|
1351
|
-
"description": "The ID of the person with whom the voter is paired",
|
1352
|
-
"type": [
|
1353
|
-
"string",
|
1354
|
-
"null"
|
1355
|
-
]
|
1356
|
-
},
|
1357
|
-
"pair": {
|
1358
|
-
"description": "The person with whom the voter is paired",
|
1359
|
-
"$ref": "#/definitions/person"
|
1360
|
-
}
|
1361
|
-
}
|
1362
|
-
},
|
1363
|
-
"speech": {
|
1364
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
1365
|
-
"title": "Speech",
|
1366
|
-
"description": "A speech, a scene, a narrative, or another part of a transcript",
|
1367
|
-
"type": "object",
|
1368
|
-
"properties": {
|
1369
|
-
"id": {
|
1370
|
-
"description": "The speech's unique identifier",
|
1371
|
-
"type": [
|
1372
|
-
"string",
|
1373
|
-
"null"
|
1374
|
-
]
|
1375
|
-
},
|
1376
|
-
"creator_id": {
|
1377
|
-
"description": "The ID of the person who is speaking",
|
1378
|
-
"type": [
|
1379
|
-
"string",
|
1380
|
-
"null"
|
1381
|
-
]
|
1382
|
-
},
|
1383
|
-
"creator": {
|
1384
|
-
"description": "The person who is speaking",
|
1385
|
-
"$ref": "#/definitions/person"
|
1386
|
-
},
|
1387
|
-
"role": {
|
1388
|
-
"description": "The speaker's role while speaking",
|
1389
|
-
"type": [
|
1390
|
-
"string",
|
1391
|
-
"null"
|
1392
|
-
]
|
1393
|
-
},
|
1394
|
-
"attribution_text": {
|
1395
|
-
"description": "The text identifying the speaker",
|
1396
|
-
"type": [
|
1397
|
-
"string",
|
1398
|
-
"null"
|
1399
|
-
]
|
1400
|
-
},
|
1401
|
-
"audience_id": {
|
1402
|
-
"description": "The ID of the person to whom the speaker is speaking",
|
1403
|
-
"type": [
|
1404
|
-
"string",
|
1405
|
-
"null"
|
1406
|
-
]
|
1407
|
-
},
|
1408
|
-
"audience": {
|
1409
|
-
"description": "The person to whom the speaker is speaking",
|
1410
|
-
"$ref": "#/definitions/person"
|
1411
|
-
},
|
1412
|
-
"text": {
|
1413
|
-
"description": "The transcript or text of the speech",
|
1414
|
-
"type": [
|
1415
|
-
"string",
|
1416
|
-
"null"
|
1417
|
-
]
|
1418
|
-
},
|
1419
|
-
"audio": {
|
1420
|
-
"description": "The audio recording of the speech",
|
1421
|
-
"type": [
|
1422
|
-
"string",
|
1423
|
-
"null"
|
1424
|
-
],
|
1425
|
-
"format": "uri"
|
1426
|
-
},
|
1427
|
-
"video": {
|
1428
|
-
"description": "The video recording of the speech",
|
1429
|
-
"type": [
|
1430
|
-
"string",
|
1431
|
-
"null"
|
1432
|
-
],
|
1433
|
-
"format": "uri"
|
1434
|
-
},
|
1435
|
-
"date": {
|
1436
|
-
"description": "The time at which the speech is spoken",
|
1437
|
-
"type": [
|
1438
|
-
"string",
|
1439
|
-
"null"
|
1440
|
-
],
|
1441
|
-
"format": "date-time"
|
1442
|
-
},
|
1443
|
-
"title": {
|
1444
|
-
"description": "A name given to the speech",
|
1445
|
-
"type": [
|
1446
|
-
"string",
|
1447
|
-
"null"
|
1448
|
-
]
|
1449
|
-
},
|
1450
|
-
"type": {
|
1451
|
-
"description": "The type of the part of the transcript",
|
1452
|
-
"type": [
|
1453
|
-
"string",
|
1454
|
-
"null"
|
1455
|
-
]
|
1456
|
-
},
|
1457
|
-
"position": {
|
1458
|
-
"description": "The position of the speech within a transcript",
|
1459
|
-
"type": [
|
1460
|
-
"integer",
|
1461
|
-
"null"
|
1462
|
-
]
|
1463
|
-
},
|
1464
|
-
"event_id": {
|
1465
|
-
"description": "The ID of the event at which the speech is spoken",
|
1466
|
-
"type": [
|
1467
|
-
"string",
|
1468
|
-
"null"
|
1469
|
-
]
|
1470
|
-
},
|
1471
|
-
"event": {
|
1472
|
-
"description": "The event at which the speech is spoken",
|
1473
|
-
"$ref": "#/definitions/event"
|
1474
|
-
},
|
1475
|
-
"created_at": {
|
1476
|
-
"description": "The time at which the resource was created",
|
1477
|
-
"type": [
|
1478
|
-
"string",
|
1479
|
-
"null"
|
1480
|
-
],
|
1481
|
-
"format": "date-time"
|
1482
|
-
},
|
1483
|
-
"updated_at": {
|
1484
|
-
"description": "The time at which the resource was last modified",
|
1485
|
-
"type": [
|
1486
|
-
"string",
|
1487
|
-
"null"
|
1488
|
-
],
|
1489
|
-
"format": "date-time"
|
1490
|
-
},
|
1491
|
-
"sources": {
|
1492
|
-
"description": "URLs to documents from which the resource is derived",
|
1493
|
-
"type": "array",
|
1494
|
-
"items": {
|
1495
|
-
"$ref": "#/definitions/link"
|
1496
|
-
}
|
1497
|
-
}
|
1498
|
-
}
|
1499
|
-
},
|
1500
|
-
"post": {
|
1501
|
-
"$schema": "http://json-schema.org/draft-03/schema#",
|
1502
|
-
"title": "Post",
|
1503
|
-
"description": "A position that exists independent of the person holding it",
|
1504
|
-
"type": "object",
|
1505
|
-
"properties": {
|
1506
|
-
"id": {
|
1507
|
-
"description": "The post's unique identifier",
|
1508
|
-
"type": [
|
1509
|
-
"string",
|
1510
|
-
"null"
|
1511
|
-
]
|
1512
|
-
},
|
1513
|
-
"label": {
|
1514
|
-
"description": "A label describing the post",
|
1515
|
-
"type": [
|
1516
|
-
"string",
|
1517
|
-
"null"
|
1518
|
-
]
|
1519
|
-
},
|
1520
|
-
"other_label": {
|
1521
|
-
"description": "An alternate label",
|
1522
|
-
"type": "array",
|
1523
|
-
"items": {
|
1524
|
-
"type": "string"
|
1525
|
-
}
|
1526
|
-
},
|
1527
|
-
"role": {
|
1528
|
-
"description": "The function that the holder of the post fulfills",
|
1529
|
-
"type": [
|
1530
|
-
"string",
|
1531
|
-
"null"
|
1532
|
-
]
|
1533
|
-
},
|
1534
|
-
"organization_id": {
|
1535
|
-
"description": "The ID of the organization in which the post is held",
|
1536
|
-
"type": [
|
1537
|
-
"string",
|
1538
|
-
"null"
|
1539
|
-
]
|
1540
|
-
},
|
1541
|
-
"organization": {
|
1542
|
-
"description": "The organization in which the post is held",
|
1543
|
-
"$ref": "#/definitions/organization"
|
1544
|
-
},
|
1545
|
-
"area_id": {
|
1546
|
-
"description": "The ID of the geographic area to which this post is related",
|
1547
|
-
"type": [
|
1548
|
-
"string",
|
1549
|
-
"null"
|
1550
|
-
]
|
1551
|
-
},
|
1552
|
-
"area": {
|
1553
|
-
"description": "The geographic area to which this post is related",
|
1554
|
-
"$ref": "#/definitions/area"
|
1555
|
-
},
|
1556
|
-
"start_date": {
|
1557
|
-
"description": "The date on which the post was created",
|
1558
|
-
"type": [
|
1559
|
-
"string",
|
1560
|
-
"null"
|
1561
|
-
],
|
1562
|
-
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
1563
|
-
},
|
1564
|
-
"end_date": {
|
1565
|
-
"description": "The date on which the post was eliminated",
|
1566
|
-
"type": [
|
1567
|
-
"string",
|
1568
|
-
"null"
|
1569
|
-
],
|
1570
|
-
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
1571
|
-
},
|
1572
|
-
"contact_details": {
|
1573
|
-
"description": "Means of contacting the holder of the post",
|
1574
|
-
"type": "array",
|
1575
|
-
"items": {
|
1576
|
-
"$ref": "#/definitions/contact_detail"
|
1577
|
-
}
|
1578
|
-
},
|
1579
|
-
"links": {
|
1580
|
-
"description": "URLs to documents about the post",
|
1581
|
-
"type": "array",
|
1582
|
-
"items": {
|
1583
|
-
"$ref": "#/definitions/link"
|
1584
|
-
}
|
1585
|
-
},
|
1586
|
-
"memberships": {
|
1587
|
-
"description": "The memberships through which people hold the post in the organization",
|
1588
|
-
"type": "array",
|
1589
|
-
"items": {
|
1590
|
-
"$ref": "#/definitions/membership"
|
1591
|
-
}
|
1592
|
-
},
|
1593
|
-
"created_at": {
|
1594
|
-
"description": "The time at which the resource was created",
|
1595
|
-
"type": [
|
1596
|
-
"string",
|
1597
|
-
"null"
|
1598
|
-
],
|
1599
|
-
"format": "date-time"
|
1600
|
-
},
|
1601
|
-
"updated_at": {
|
1602
|
-
"description": "The time at which the resource was last modified",
|
1603
|
-
"type": [
|
1604
|
-
"string",
|
1605
|
-
"null"
|
1606
|
-
],
|
1607
|
-
"format": "date-time"
|
1608
|
-
},
|
1609
|
-
"sources": {
|
1610
|
-
"description": "URLs to documents from which the resource is derived",
|
1611
|
-
"type": "array",
|
1612
|
-
"items": {
|
1613
|
-
"$ref": "#/definitions/link"
|
1614
|
-
}
|
1615
|
-
}
|
1616
|
-
}
|
1617
|
-
}
|
1618
|
-
}
|
1619
|
-
}
|