pupa 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +6 -0
- data/.travis.yml +5 -0
- data/.yardopts +4 -0
- data/Gemfile +4 -0
- data/LICENSE +20 -0
- data/README.md +52 -0
- data/Rakefile +37 -0
- data/USAGE +1 -0
- data/lib/pupa/errors.rb +30 -0
- data/lib/pupa/logger.rb +37 -0
- data/lib/pupa/models/base.rb +190 -0
- data/lib/pupa/models/concerns/contactable.rb +34 -0
- data/lib/pupa/models/concerns/identifiable.rb +26 -0
- data/lib/pupa/models/concerns/linkable.rb +26 -0
- data/lib/pupa/models/concerns/nameable.rb +34 -0
- data/lib/pupa/models/concerns/sourceable.rb +26 -0
- data/lib/pupa/models/concerns/timestamps.rb +22 -0
- data/lib/pupa/models/contact_detail_list.rb +28 -0
- data/lib/pupa/models/membership.rb +37 -0
- data/lib/pupa/models/organization.rb +40 -0
- data/lib/pupa/models/person.rb +35 -0
- data/lib/pupa/models/post.rb +28 -0
- data/lib/pupa/processor/client.rb +42 -0
- data/lib/pupa/processor/dependency_graph.rb +18 -0
- data/lib/pupa/processor/helper.rb +15 -0
- data/lib/pupa/processor/middleware/logger.rb +37 -0
- data/lib/pupa/processor/middleware/parse_html.rb +16 -0
- data/lib/pupa/processor/persistence.rb +80 -0
- data/lib/pupa/processor/yielder.rb +50 -0
- data/lib/pupa/processor.rb +351 -0
- data/lib/pupa/refinements/faraday_middleware.rb +32 -0
- data/lib/pupa/refinements/json-schema.rb +36 -0
- data/lib/pupa/runner.rb +185 -0
- data/lib/pupa/version.rb +3 -0
- data/lib/pupa.rb +31 -0
- data/pupa.gemspec +34 -0
- data/schemas/popolo/contact_detail.json +44 -0
- data/schemas/popolo/identifier.json +18 -0
- data/schemas/popolo/link.json +19 -0
- data/schemas/popolo/membership.json +86 -0
- data/schemas/popolo/organization.json +104 -0
- data/schemas/popolo/other_name.json +28 -0
- data/schemas/popolo/person.json +130 -0
- data/schemas/popolo/post.json +78 -0
- data/spec/cassettes/31ac91ccad069eefc07d96cfbe66fa66c1b41fcf.yml +56 -0
- data/spec/cassettes/4ff54d737afb5d693653752d7bf234a405a80172.yml +48 -0
- data/spec/cassettes/898049a22e6ca51dfa2510d9e0e0207a5c396524.yml +54 -0
- data/spec/cassettes/ce69ff734ce852d2bfaa482bbf55d7ffb4762e87.yml +26 -0
- data/spec/cassettes/da629b01e0836deda8a5540a4e6a08783dd7aef9.yml +46 -0
- data/spec/cassettes/e398f35bea86b3d4c87a6934bae1eb7fca8744f9.yml +26 -0
- data/spec/logger_spec.rb +4 -0
- data/spec/models/base_spec.rb +194 -0
- data/spec/models/concerns/contactable_spec.rb +37 -0
- data/spec/models/concerns/identifiable_spec.rb +25 -0
- data/spec/models/concerns/linkable_spec.rb +25 -0
- data/spec/models/concerns/nameable_spec.rb +25 -0
- data/spec/models/concerns/sourceable_spec.rb +25 -0
- data/spec/models/concerns/timestamps_spec.rb +32 -0
- data/spec/models/contact_detail_list_spec.rb +44 -0
- data/spec/models/membership_spec.rb +30 -0
- data/spec/models/organization_spec.rb +24 -0
- data/spec/models/person_spec.rb +24 -0
- data/spec/models/post_spec.rb +19 -0
- data/spec/processor/client_spec.rb +4 -0
- data/spec/processor/dependency_graph_spec.rb +4 -0
- data/spec/processor/helper_spec.rb +4 -0
- data/spec/processor/middleware/logger_spec.rb +87 -0
- data/spec/processor/middleware/parse_html_spec.rb +92 -0
- data/spec/processor/persistence_spec.rb +41 -0
- data/spec/processor/yielder_spec.rb +55 -0
- data/spec/processor_spec.rb +268 -0
- data/spec/runner_spec.rb +85 -0
- data/spec/spec_helper.rb +17 -0
- metadata +342 -0
@@ -0,0 +1,44 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-03/schema#",
|
3
|
+
"id": "http://popoloproject.com/schemas/contact_detail.json#",
|
4
|
+
"title": "Contact detail",
|
5
|
+
"description": "A means of contacting an entity",
|
6
|
+
"type": "object",
|
7
|
+
"properties": {
|
8
|
+
"label": {
|
9
|
+
"description": "A human-readable label for the contact detail",
|
10
|
+
"type": ["string", "null"]
|
11
|
+
},
|
12
|
+
"type": {
|
13
|
+
"description": "A type of medium, e.g. 'fax' or 'email'",
|
14
|
+
"type": "string",
|
15
|
+
"required": true
|
16
|
+
},
|
17
|
+
"value": {
|
18
|
+
"description": "A value, e.g. a phone number or email address",
|
19
|
+
"type": "string",
|
20
|
+
"required": true
|
21
|
+
},
|
22
|
+
"note": {
|
23
|
+
"description": "A note, e.g. for grouping contact details by physical location",
|
24
|
+
"type": ["string", "null"]
|
25
|
+
},
|
26
|
+
"created_at": {
|
27
|
+
"description": "The time at which the resource was created",
|
28
|
+
"type": ["string", "null"],
|
29
|
+
"format": "date-time"
|
30
|
+
},
|
31
|
+
"updated_at": {
|
32
|
+
"description": "The time at which the resource was last modified",
|
33
|
+
"type": ["string", "null"],
|
34
|
+
"format": "date-time"
|
35
|
+
},
|
36
|
+
"sources": {
|
37
|
+
"description": "URLs to documents from which the contact detail is derived",
|
38
|
+
"type": "array",
|
39
|
+
"items": {
|
40
|
+
"$ref": "http://popoloproject.com/schemas/link.json#"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-03/schema#",
|
3
|
+
"id": "http://popoloproject.com/schemas/identifier.json#",
|
4
|
+
"title": "Identifier",
|
5
|
+
"description": "An issued identifier",
|
6
|
+
"type": "object",
|
7
|
+
"properties": {
|
8
|
+
"identifier": {
|
9
|
+
"description": "An issued identifier, e.g. a DUNS number",
|
10
|
+
"type": "string",
|
11
|
+
"required": true
|
12
|
+
},
|
13
|
+
"scheme": {
|
14
|
+
"description": "An identifier scheme, e.g. DUNS",
|
15
|
+
"type": ["string", "null"]
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-03/schema#",
|
3
|
+
"id": "http://popoloproject.com/schemas/link.json#",
|
4
|
+
"title": "Link",
|
5
|
+
"description": "A URL",
|
6
|
+
"type": "object",
|
7
|
+
"properties": {
|
8
|
+
"url": {
|
9
|
+
"description": "A URL",
|
10
|
+
"type": "string",
|
11
|
+
"format": "uri",
|
12
|
+
"required": true
|
13
|
+
},
|
14
|
+
"note": {
|
15
|
+
"description": "A note, e.g. 'Wikipedia page'",
|
16
|
+
"type": ["string", "null"]
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-03/schema#",
|
3
|
+
"id": "http://popoloproject.com/schemas/membership.json#",
|
4
|
+
"title": "Membership",
|
5
|
+
"description": "A relationship between a person and an organization",
|
6
|
+
"type": "object",
|
7
|
+
"properties": {
|
8
|
+
"id": {
|
9
|
+
"description": "The membership's unique identifier",
|
10
|
+
"type": ["string", "null"]
|
11
|
+
},
|
12
|
+
"label": {
|
13
|
+
"description": "A label describing the membership",
|
14
|
+
"type": ["string", "null"]
|
15
|
+
},
|
16
|
+
"role": {
|
17
|
+
"description": "The role that the person fulfills in the organization",
|
18
|
+
"type": ["string", "null"]
|
19
|
+
},
|
20
|
+
"person_id": {
|
21
|
+
"description": "The ID of the person who is a party to the relationship",
|
22
|
+
"type": ["string", "null"]
|
23
|
+
},
|
24
|
+
"person": {
|
25
|
+
"description": "The person who is a party to the relationship",
|
26
|
+
"$ref": "http://popoloproject.com/schemas/person.json#"
|
27
|
+
},
|
28
|
+
"organization_id": {
|
29
|
+
"description": "The ID of the organization that is a party to the relationship",
|
30
|
+
"type": ["string", "null"]
|
31
|
+
},
|
32
|
+
"organization": {
|
33
|
+
"description": "The organization that is a party to the relationship",
|
34
|
+
"$ref": "http://popoloproject.com/schemas/organization.json#"
|
35
|
+
},
|
36
|
+
"post_id": {
|
37
|
+
"description": "The ID of the post held by the person in the organization through this membership",
|
38
|
+
"type": ["string", "null"]
|
39
|
+
},
|
40
|
+
"post": {
|
41
|
+
"description": "The post held by the person in the organization through this membership",
|
42
|
+
"$ref": "http://popoloproject.com/schemas/post.json#"
|
43
|
+
},
|
44
|
+
"start_date": {
|
45
|
+
"description": "The date on which the relationship began",
|
46
|
+
"type": ["string", "null"],
|
47
|
+
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
48
|
+
},
|
49
|
+
"end_date": {
|
50
|
+
"description": "The date on which the relationship ended",
|
51
|
+
"type": ["string", "null"],
|
52
|
+
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
53
|
+
},
|
54
|
+
"contact_details": {
|
55
|
+
"description": "Means of contacting the person who is a party to the relationship",
|
56
|
+
"type": "array",
|
57
|
+
"items": {
|
58
|
+
"$ref": "http://popoloproject.com/schemas/contact_detail.json#"
|
59
|
+
}
|
60
|
+
},
|
61
|
+
"links": {
|
62
|
+
"description": "URLs to documents about the membership",
|
63
|
+
"type": "array",
|
64
|
+
"items": {
|
65
|
+
"$ref": "http://popoloproject.com/schemas/link.json#"
|
66
|
+
}
|
67
|
+
},
|
68
|
+
"created_at": {
|
69
|
+
"description": "The time at which the resource was created",
|
70
|
+
"type": ["string", "null"],
|
71
|
+
"format": "date-time"
|
72
|
+
},
|
73
|
+
"updated_at": {
|
74
|
+
"description": "The time at which the resource was last modified",
|
75
|
+
"type": ["string", "null"],
|
76
|
+
"format": "date-time"
|
77
|
+
},
|
78
|
+
"sources": {
|
79
|
+
"description": "URLs to documents from which the membership is derived",
|
80
|
+
"type": "array",
|
81
|
+
"items": {
|
82
|
+
"$ref": "http://popoloproject.com/schemas/link.json#"
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
@@ -0,0 +1,104 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-03/schema#",
|
3
|
+
"id": "http://popoloproject.com/schemas/organization.json#",
|
4
|
+
"title": "Organization",
|
5
|
+
"description": "A group with a common purpose or reason for existence that goes beyond the set of people belonging to it",
|
6
|
+
"type": "object",
|
7
|
+
"properties": {
|
8
|
+
"id": {
|
9
|
+
"description": "The organization's unique identifier",
|
10
|
+
"type": ["string", "null"]
|
11
|
+
},
|
12
|
+
"name": {
|
13
|
+
"description": "A primary name, e.g. a legally recognized name",
|
14
|
+
"type": "string",
|
15
|
+
"required": true
|
16
|
+
},
|
17
|
+
"other_names": {
|
18
|
+
"description": "Alternate or former names",
|
19
|
+
"type": "array",
|
20
|
+
"items": {
|
21
|
+
"$ref": "http://popoloproject.com/schemas/other_name.json#"
|
22
|
+
}
|
23
|
+
},
|
24
|
+
"identifiers": {
|
25
|
+
"description": "Issued identifiers",
|
26
|
+
"type": "array",
|
27
|
+
"items": {
|
28
|
+
"$ref": "http://popoloproject.com/schemas/identifier.json#"
|
29
|
+
}
|
30
|
+
},
|
31
|
+
"classification": {
|
32
|
+
"description": "An organization category, e.g. committee",
|
33
|
+
"type": ["string", "null"]
|
34
|
+
},
|
35
|
+
"parent_id": {
|
36
|
+
"description": "The ID of the organization that contains this organization",
|
37
|
+
"type": ["string", "null"]
|
38
|
+
},
|
39
|
+
"parent": {
|
40
|
+
"description": "The organization that contains this organization",
|
41
|
+
"$ref": "http://popoloproject.com/schemas/organization.json#"
|
42
|
+
},
|
43
|
+
"founding_date": {
|
44
|
+
"description": "A date of founding",
|
45
|
+
"type": ["string", "null"],
|
46
|
+
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
47
|
+
},
|
48
|
+
"dissolution_date": {
|
49
|
+
"description": "A date of dissolution",
|
50
|
+
"type": ["string", "null"],
|
51
|
+
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
52
|
+
},
|
53
|
+
"image": {
|
54
|
+
"description": "A URL of an image",
|
55
|
+
"type": ["string", "null"],
|
56
|
+
"format": "uri"
|
57
|
+
},
|
58
|
+
"contact_details": {
|
59
|
+
"description": "Means of contacting the organization",
|
60
|
+
"type": "array",
|
61
|
+
"items": {
|
62
|
+
"$ref": "http://popoloproject.com/schemas/contact_detail.json#"
|
63
|
+
}
|
64
|
+
},
|
65
|
+
"links": {
|
66
|
+
"description": "URLs to documents about the organization",
|
67
|
+
"type": "array",
|
68
|
+
"items": {
|
69
|
+
"$ref": "http://popoloproject.com/schemas/link.json#"
|
70
|
+
}
|
71
|
+
},
|
72
|
+
"memberships": {
|
73
|
+
"description": "The relationships to which the organization is a party",
|
74
|
+
"type": "array",
|
75
|
+
"items": {
|
76
|
+
"$ref": "http://popoloproject.com/schemas/membership.json#"
|
77
|
+
}
|
78
|
+
},
|
79
|
+
"posts": {
|
80
|
+
"description": "Posts within the organization",
|
81
|
+
"type": "array",
|
82
|
+
"items": {
|
83
|
+
"$ref": "http://popoloproject.com/schemas/post.json#"
|
84
|
+
}
|
85
|
+
},
|
86
|
+
"created_at": {
|
87
|
+
"description": "The time at which the resource was created",
|
88
|
+
"type": ["string", "null"],
|
89
|
+
"format": "date-time"
|
90
|
+
},
|
91
|
+
"updated_at": {
|
92
|
+
"description": "The time at which the resource was last modified",
|
93
|
+
"type": ["string", "null"],
|
94
|
+
"format": "date-time"
|
95
|
+
},
|
96
|
+
"sources": {
|
97
|
+
"description": "URLs to documents from which the organization is derived",
|
98
|
+
"type": "array",
|
99
|
+
"items": {
|
100
|
+
"$ref": "http://popoloproject.com/schemas/link.json#"
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
104
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-03/schema#",
|
3
|
+
"id": "http://popoloproject.com/schemas/other_name.json#",
|
4
|
+
"title": "Other name",
|
5
|
+
"description": "An alternate or former name",
|
6
|
+
"type": "object",
|
7
|
+
"properties": {
|
8
|
+
"name": {
|
9
|
+
"description": "An alternate or former name",
|
10
|
+
"type": "string",
|
11
|
+
"required": true
|
12
|
+
},
|
13
|
+
"start_date": {
|
14
|
+
"description": "The date on which the name was adopted",
|
15
|
+
"type": ["string", "null"],
|
16
|
+
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
17
|
+
},
|
18
|
+
"end_date": {
|
19
|
+
"description": "The date on which the name was abandoned",
|
20
|
+
"type": ["string", "null"],
|
21
|
+
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
22
|
+
},
|
23
|
+
"note": {
|
24
|
+
"description": "A note, e.g. 'Birth name'",
|
25
|
+
"type": ["string", "null"]
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,130 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-03/schema#",
|
3
|
+
"id": "http://popoloproject.com/schemas/person.json#",
|
4
|
+
"title": "Person",
|
5
|
+
"description": "A real person, alive or dead",
|
6
|
+
"type": "object",
|
7
|
+
"properties": {
|
8
|
+
"id": {
|
9
|
+
"description": "The person's unique identifier",
|
10
|
+
"type": ["string", "null"]
|
11
|
+
},
|
12
|
+
"name": {
|
13
|
+
"description": "A person's preferred full name",
|
14
|
+
"type": "string",
|
15
|
+
"required": true
|
16
|
+
},
|
17
|
+
"other_names": {
|
18
|
+
"description": "Alternate or former names",
|
19
|
+
"type": "array",
|
20
|
+
"items": {
|
21
|
+
"$ref": "http://popoloproject.com/schemas/other_name.json#"
|
22
|
+
}
|
23
|
+
},
|
24
|
+
"identifiers": {
|
25
|
+
"description": "Issued identifiers",
|
26
|
+
"type": "array",
|
27
|
+
"items": {
|
28
|
+
"$ref": "http://popoloproject.com/schemas/identifier.json#"
|
29
|
+
}
|
30
|
+
},
|
31
|
+
"family_name": {
|
32
|
+
"description": "One or more family names",
|
33
|
+
"type": ["string", "null"]
|
34
|
+
},
|
35
|
+
"given_name": {
|
36
|
+
"description": "One or more primary given names",
|
37
|
+
"type": ["string", "null"]
|
38
|
+
},
|
39
|
+
"additional_name": {
|
40
|
+
"description": "One or more secondary given names",
|
41
|
+
"type": ["string", "null"]
|
42
|
+
},
|
43
|
+
"honorific_prefix": {
|
44
|
+
"description": "One or more honorifics preceding a person's name",
|
45
|
+
"type": ["string", "null"]
|
46
|
+
},
|
47
|
+
"honorific_suffix": {
|
48
|
+
"description": "One or more honorifics following a person's name",
|
49
|
+
"type": ["string", "null"]
|
50
|
+
},
|
51
|
+
"patronymic_name": {
|
52
|
+
"description": "One or more patronymic names",
|
53
|
+
"type": ["string", "null"]
|
54
|
+
},
|
55
|
+
"sort_name": {
|
56
|
+
"description": "A name to use in an lexicographically ordered list",
|
57
|
+
"type": ["string", "null"]
|
58
|
+
},
|
59
|
+
"email": {
|
60
|
+
"description": "A preferred email address",
|
61
|
+
"type": ["string", "null"],
|
62
|
+
"format": "email"
|
63
|
+
},
|
64
|
+
"gender": {
|
65
|
+
"description": "A gender",
|
66
|
+
"type": ["string", "null"]
|
67
|
+
},
|
68
|
+
"birth_date": {
|
69
|
+
"description": "A date of birth",
|
70
|
+
"type": ["string", "null"],
|
71
|
+
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
72
|
+
},
|
73
|
+
"death_date": {
|
74
|
+
"description": "A date of death",
|
75
|
+
"type": ["string", "null"],
|
76
|
+
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
77
|
+
},
|
78
|
+
"image": {
|
79
|
+
"description": "A URL of a head shot",
|
80
|
+
"type": ["string", "null"],
|
81
|
+
"format": "uri"
|
82
|
+
},
|
83
|
+
"summary": {
|
84
|
+
"description": "A one-line account of a person's life",
|
85
|
+
"type": ["string", "null"]
|
86
|
+
},
|
87
|
+
"biography": {
|
88
|
+
"description": "An extended account of a person's life",
|
89
|
+
"type": ["string", "null"]
|
90
|
+
},
|
91
|
+
"contact_details": {
|
92
|
+
"description": "Means of contacting the person",
|
93
|
+
"type": "array",
|
94
|
+
"items": {
|
95
|
+
"$ref": "http://popoloproject.com/schemas/contact_detail.json#"
|
96
|
+
}
|
97
|
+
},
|
98
|
+
"links": {
|
99
|
+
"description": "URLs to documents about the person",
|
100
|
+
"type": "array",
|
101
|
+
"items": {
|
102
|
+
"$ref": "http://popoloproject.com/schemas/link.json#"
|
103
|
+
}
|
104
|
+
},
|
105
|
+
"memberships": {
|
106
|
+
"description": "The relationships to which the person is a party",
|
107
|
+
"type": "array",
|
108
|
+
"items": {
|
109
|
+
"$ref": "http://popoloproject.com/schemas/membership.json#"
|
110
|
+
}
|
111
|
+
},
|
112
|
+
"created_at": {
|
113
|
+
"description": "The time at which the resource was created",
|
114
|
+
"type": ["string", "null"],
|
115
|
+
"format": "date-time"
|
116
|
+
},
|
117
|
+
"updated_at": {
|
118
|
+
"description": "The time at which the resource was last modified",
|
119
|
+
"type": ["string", "null"],
|
120
|
+
"format": "date-time"
|
121
|
+
},
|
122
|
+
"sources": {
|
123
|
+
"description": "URLs to documents from which the person is derived",
|
124
|
+
"type": "array",
|
125
|
+
"items": {
|
126
|
+
"$ref": "http://popoloproject.com/schemas/link.json#"
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
}
|
@@ -0,0 +1,78 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-03/schema#",
|
3
|
+
"id": "http://popoloproject.com/schemas/post.json#",
|
4
|
+
"title": "Post",
|
5
|
+
"description": "A position that exists independent of the person holding it",
|
6
|
+
"type": "object",
|
7
|
+
"properties": {
|
8
|
+
"id": {
|
9
|
+
"description": "The post's unique identifier",
|
10
|
+
"type": ["string", "null"]
|
11
|
+
},
|
12
|
+
"label": {
|
13
|
+
"description": "A label describing the post",
|
14
|
+
"type": "string",
|
15
|
+
"required": true
|
16
|
+
},
|
17
|
+
"role": {
|
18
|
+
"description": "The function that the holder of the post fulfills",
|
19
|
+
"type": ["string", "null"]
|
20
|
+
},
|
21
|
+
"organization_id": {
|
22
|
+
"description": "The ID of the organization in which the post is held",
|
23
|
+
"type": ["string", "null"]
|
24
|
+
},
|
25
|
+
"organization": {
|
26
|
+
"description": "The organization in which the post is held",
|
27
|
+
"$ref": "http://popoloproject.com/schemas/organization.json#"
|
28
|
+
},
|
29
|
+
"start_date": {
|
30
|
+
"description": "The date on which the post was created",
|
31
|
+
"type": ["string", "null"],
|
32
|
+
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
33
|
+
},
|
34
|
+
"end_date": {
|
35
|
+
"description": "The date on which the post was eliminated",
|
36
|
+
"type": ["string", "null"],
|
37
|
+
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
|
38
|
+
},
|
39
|
+
"contact_details": {
|
40
|
+
"description": "Means of contacting the holder of the post",
|
41
|
+
"type": "array",
|
42
|
+
"items": {
|
43
|
+
"$ref": "http://popoloproject.com/schemas/contact_detail.json#"
|
44
|
+
}
|
45
|
+
},
|
46
|
+
"links": {
|
47
|
+
"description": "URLs to documents about the post",
|
48
|
+
"type": "array",
|
49
|
+
"items": {
|
50
|
+
"$ref": "http://popoloproject.com/schemas/link.json#"
|
51
|
+
}
|
52
|
+
},
|
53
|
+
"memberships": {
|
54
|
+
"description": "The memberships through which people hold the post in the organization",
|
55
|
+
"type": "array",
|
56
|
+
"items": {
|
57
|
+
"$ref": "http://popoloproject.com/schemas/membership.json#"
|
58
|
+
}
|
59
|
+
},
|
60
|
+
"created_at": {
|
61
|
+
"description": "The time at which the resource was created",
|
62
|
+
"type": ["string", "null"],
|
63
|
+
"format": "date-time"
|
64
|
+
},
|
65
|
+
"updated_at": {
|
66
|
+
"description": "The time at which the resource was last modified",
|
67
|
+
"type": ["string", "null"],
|
68
|
+
"format": "date-time"
|
69
|
+
},
|
70
|
+
"sources": {
|
71
|
+
"description": "URLs to documents from which the post is derived",
|
72
|
+
"type": "array",
|
73
|
+
"items": {
|
74
|
+
"$ref": "http://popoloproject.com/schemas/link.json#"
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://httpbin.org/post
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: foo=bar
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Content-Type:
|
13
|
+
- application/x-www-form-urlencoded
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message:
|
18
|
+
headers:
|
19
|
+
access-control-allow-origin:
|
20
|
+
- '*'
|
21
|
+
content-type:
|
22
|
+
- application/json
|
23
|
+
date:
|
24
|
+
- Sun, 15 Sep 2013 22:37:07 GMT
|
25
|
+
server:
|
26
|
+
- gunicorn/0.17.4
|
27
|
+
content-length:
|
28
|
+
- '439'
|
29
|
+
connection:
|
30
|
+
- Close
|
31
|
+
body:
|
32
|
+
encoding: UTF-8
|
33
|
+
string: |-
|
34
|
+
{
|
35
|
+
"args": {},
|
36
|
+
"data": "",
|
37
|
+
"json": null,
|
38
|
+
"origin": "70.49.74.123",
|
39
|
+
"files": {},
|
40
|
+
"form": {
|
41
|
+
"foo": "bar"
|
42
|
+
},
|
43
|
+
"headers": {
|
44
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
45
|
+
"User-Agent": "Faraday v0.8.8",
|
46
|
+
"Connection": "close",
|
47
|
+
"Host": "httpbin.org",
|
48
|
+
"Content-Length": "7",
|
49
|
+
"Accept": "*/*",
|
50
|
+
"Accept-Encoding": "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
|
51
|
+
},
|
52
|
+
"url": "http://httpbin.org/post"
|
53
|
+
}
|
54
|
+
http_version:
|
55
|
+
recorded_at: Sun, 15 Sep 2013 22:37:07 GMT
|
56
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://httpbin.org/get?foo=bar
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message:
|
16
|
+
headers:
|
17
|
+
access-control-allow-origin:
|
18
|
+
- '*'
|
19
|
+
content-type:
|
20
|
+
- application/json
|
21
|
+
date:
|
22
|
+
- Sun, 15 Sep 2013 22:37:07 GMT
|
23
|
+
server:
|
24
|
+
- gunicorn/0.17.4
|
25
|
+
content-length:
|
26
|
+
- '303'
|
27
|
+
connection:
|
28
|
+
- Close
|
29
|
+
body:
|
30
|
+
encoding: UTF-8
|
31
|
+
string: |-
|
32
|
+
{
|
33
|
+
"origin": "70.49.74.123",
|
34
|
+
"url": "http://httpbin.org/get?foo=bar",
|
35
|
+
"args": {
|
36
|
+
"foo": "bar"
|
37
|
+
},
|
38
|
+
"headers": {
|
39
|
+
"Accept": "*/*",
|
40
|
+
"Accept-Encoding": "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
41
|
+
"Host": "httpbin.org",
|
42
|
+
"User-Agent": "Faraday v0.8.8",
|
43
|
+
"Connection": "close"
|
44
|
+
}
|
45
|
+
}
|
46
|
+
http_version:
|
47
|
+
recorded_at: Sun, 15 Sep 2013 22:37:07 GMT
|
48
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://httpbin.org/post
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Content-Type:
|
13
|
+
- application/x-www-form-urlencoded
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message:
|
18
|
+
headers:
|
19
|
+
access-control-allow-origin:
|
20
|
+
- '*'
|
21
|
+
content-type:
|
22
|
+
- application/json
|
23
|
+
date:
|
24
|
+
- Sun, 15 Sep 2013 22:37:07 GMT
|
25
|
+
server:
|
26
|
+
- gunicorn/0.17.4
|
27
|
+
content-length:
|
28
|
+
- '419'
|
29
|
+
connection:
|
30
|
+
- Close
|
31
|
+
body:
|
32
|
+
encoding: UTF-8
|
33
|
+
string: |-
|
34
|
+
{
|
35
|
+
"json": null,
|
36
|
+
"form": {},
|
37
|
+
"data": "",
|
38
|
+
"files": {},
|
39
|
+
"headers": {
|
40
|
+
"Accept-Encoding": "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
41
|
+
"Content-Length": "0",
|
42
|
+
"User-Agent": "Faraday v0.8.8",
|
43
|
+
"Accept": "*/*",
|
44
|
+
"Connection": "close",
|
45
|
+
"Host": "httpbin.org",
|
46
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
47
|
+
},
|
48
|
+
"url": "http://httpbin.org/post",
|
49
|
+
"args": {},
|
50
|
+
"origin": "70.49.74.123"
|
51
|
+
}
|
52
|
+
http_version:
|
53
|
+
recorded_at: Sun, 15 Sep 2013 22:37:07 GMT
|
54
|
+
recorded_with: VCR 2.5.0
|