nationbuilder-rb 1.3.5 → 1.3.6

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.
@@ -3,9 +3,9 @@ class ApiSpec::Spec
3
3
  endpoint 'Events' do |event|
4
4
 
5
5
  event.method('Index') do |method|
6
- method.synopsis = "Returns a list of events"
7
- method.http_method = "GET"
8
- method.uri = "/sites/:site_slug/pages/events"
6
+ method.synopsis = 'Returns a list of events'
7
+ method.http_method = 'GET'
8
+ method.uri = '/sites/:site_slug/pages/events'
9
9
 
10
10
  method.parameter('site_slug') do |p|
11
11
  p.required = 'Y'
@@ -55,13 +55,12 @@ class ApiSpec::Spec
55
55
  p.type = 'int'
56
56
  p.description = 'the ID of the calendar from which events should be scoped'
57
57
  end
58
-
59
58
  end
60
59
 
61
60
  event.method('Show') do |method|
62
- method.synopsis = "Returns an event"
63
- method.http_method = "GET"
64
- method.uri = "/sites/:site_slug/pages/events/:id"
61
+ method.synopsis = 'Returns an event'
62
+ method.http_method = 'GET'
63
+ method.uri = '/sites/:site_slug/pages/events/:id'
65
64
 
66
65
  method.parameter('site_slug') do |p|
67
66
  p.required = 'Y'
@@ -72,15 +71,14 @@ class ApiSpec::Spec
72
71
  method.parameter('id') do |p|
73
72
  p.required = 'Y'
74
73
  p.type = 'int'
75
- p.description = 'the ID of the event'
74
+ p.description = "the event's ID"
76
75
  end
77
-
78
76
  end
79
77
 
80
78
  event.method('Create') do |method|
81
- method.synopsis = "Creates a event with the provided data"
82
- method.http_method = "POST"
83
- method.uri = "/sites/:site_slug/pages/events"
79
+ method.synopsis = 'Creates a event with the provided data'
80
+ method.http_method = 'POST'
81
+ method.uri = '/sites/:site_slug/pages/events'
84
82
 
85
83
  method.parameter('site_slug') do |p|
86
84
  p.required = 'Y'
@@ -97,9 +95,9 @@ class ApiSpec::Spec
97
95
  end
98
96
 
99
97
  event.method('Update') do |method|
100
- method.synopsis = "Updates a event with the provided data"
101
- method.http_method = "PUT"
102
- method.uri = "/sites/:site_slug/pages/events/:id"
98
+ method.synopsis = 'Updates a event with the provided data'
99
+ method.http_method = 'PUT'
100
+ method.uri = '/sites/:site_slug/pages/events/:id'
103
101
 
104
102
  method.parameter('site_slug') do |p|
105
103
  p.required = 'Y'
@@ -110,7 +108,7 @@ class ApiSpec::Spec
110
108
  method.parameter('id') do |p|
111
109
  p.required = 'Y'
112
110
  p.type = 'int'
113
- p.description = "The event's ID"
111
+ p.description = "the event's ID"
114
112
  end
115
113
 
116
114
  method.parameter('body') do |p|
@@ -122,9 +120,9 @@ class ApiSpec::Spec
122
120
  end
123
121
 
124
122
  event.method('Destroy') do |method|
125
- method.synopsis = "Removes the event with the matching ID"
126
- method.http_method = "DELETE"
127
- method.uri = "/sites/:site_slug/pages/events/:id"
123
+ method.synopsis = 'Removes the event with the matching ID'
124
+ method.http_method = 'DELETE'
125
+ method.uri = '/sites/:site_slug/pages/events/:id'
128
126
 
129
127
  method.parameter('site_slug') do |p|
130
128
  p.required = 'Y'
@@ -135,14 +133,14 @@ class ApiSpec::Spec
135
133
  method.parameter('id') do |p|
136
134
  p.required = 'Y'
137
135
  p.type = 'int'
138
- p.description = "The event's ID"
136
+ p.description = "the event's ID"
139
137
  end
140
138
  end
141
139
 
142
140
  event.method('RSVPs') do |method|
143
- method.synopsis = "Lists all RSVPs for an event"
144
- method.http_method = "GET"
145
- method.uri = "/sites/:site_slug/pages/events/:id/rsvps"
141
+ method.synopsis = 'Lists all RSVPs for an event'
142
+ method.http_method = 'GET'
143
+ method.uri = '/sites/:site_slug/pages/events/:id/rsvps'
146
144
 
147
145
  method.parameter('site_slug') do |p|
148
146
  p.required = 'Y'
@@ -153,7 +151,7 @@ class ApiSpec::Spec
153
151
  method.parameter('id') do |p|
154
152
  p.required = 'Y'
155
153
  p.type = 'int'
156
- p.description = "The event's ID"
154
+ p.description = "the event's ID"
157
155
  end
158
156
 
159
157
  method.parameter('__token') do |p|
@@ -174,13 +172,12 @@ class ApiSpec::Spec
174
172
  p.type = 'int'
175
173
  p.description = 'maximum number of results to return'
176
174
  end
177
-
178
175
  end
179
176
 
180
177
  event.method('RSVP Create') do |method|
181
- method.synopsis = "Creates an RSVP for an event"
182
- method.http_method = "POST"
183
- method.uri = "/sites/:site_slug/pages/events/:id/rsvps"
178
+ method.synopsis = 'Creates an RSVP for an event'
179
+ method.http_method = 'POST'
180
+ method.uri = '/sites/:site_slug/pages/events/:id/rsvps'
184
181
 
185
182
  method.parameter('site_slug') do |p|
186
183
  p.required = 'Y'
@@ -191,7 +188,7 @@ class ApiSpec::Spec
191
188
  method.parameter('id') do |p|
192
189
  p.required = 'Y'
193
190
  p.type = 'int'
194
- p.description = "The event's ID"
191
+ p.description = "the event's ID"
195
192
  end
196
193
 
197
194
  method.parameter('body') do |p|
@@ -199,13 +196,12 @@ class ApiSpec::Spec
199
196
  p.type = 'json'
200
197
  p.description = 'A JSON representation of the new post'
201
198
  end
202
-
203
199
  end
204
200
 
205
201
  event.method('RSVP Update') do |method|
206
- method.synopsis = "Updates an existing RSVP"
207
- method.http_method = "PUT"
208
- method.uri = "/sites/:site_slug/pages/events/:event_id/rsvps/:rsvp_id"
202
+ method.synopsis = 'Updates an existing RSVP'
203
+ method.http_method = 'PUT'
204
+ method.uri = '/sites/:site_slug/pages/events/:event_id/rsvps/:rsvp_id'
209
205
 
210
206
  method.parameter('site_slug') do |p|
211
207
  p.required = 'Y'
@@ -216,13 +212,13 @@ class ApiSpec::Spec
216
212
  method.parameter('event_id') do |p|
217
213
  p.required = 'Y'
218
214
  p.type = 'int'
219
- p.description = "The event's ID"
215
+ p.description = "the event's ID"
220
216
  end
221
217
 
222
218
  method.parameter('rsvp_id') do |p|
223
219
  p.required = 'Y'
224
220
  p.type = 'int'
225
- p.description = "The RSVP's ID"
221
+ p.description = "the RSVP's ID"
226
222
  end
227
223
 
228
224
  method.parameter('body') do |p|
@@ -230,9 +226,6 @@ class ApiSpec::Spec
230
226
  p.type = 'json'
231
227
  p.description = 'JSON attributes for updating the RSVP'
232
228
  end
233
-
234
229
  end
235
-
236
230
  end
237
-
238
231
  end
@@ -2,10 +2,16 @@ class ApiSpec::Spec
2
2
 
3
3
  endpoint 'Exports' do |export|
4
4
 
5
- export.method('Create List') do |method|
6
- method.synopsis = "Creates a list export with the provided data"
7
- method.http_method = "POST"
8
- method.uri = "/list/:list_id/exports"
5
+ export.method('Export List') do |method|
6
+ method.synopsis = 'Starts an export of a list'
7
+ method.http_method = 'POST'
8
+ method.uri = '/lists/:list_id/exports'
9
+
10
+ method.parameter('list_id') do |p|
11
+ p.required = 'Y'
12
+ p.type = 'int'
13
+ p.description = 'ID of the list to export'
14
+ end
9
15
 
10
16
  method.parameter('body') do |p|
11
17
  p.required = 'Y'
@@ -15,9 +21,9 @@ class ApiSpec::Spec
15
21
  end
16
22
 
17
23
  export.method('Show') do |method|
18
- method.synopsis = "Shows the status of a list export."
19
- method.http_method = "GET"
20
- method.uri = "/exports/:id"
24
+ method.synopsis = 'Shows the status of a list export.'
25
+ method.http_method = 'GET'
26
+ method.uri = '/exports/:id'
21
27
 
22
28
  method.parameter('id') do |p|
23
29
  p.required = 'Y'
@@ -27,9 +33,9 @@ class ApiSpec::Spec
27
33
  end
28
34
 
29
35
  export.method('Delete') do |method|
30
- method.synopsis = "Delete the export"
31
- method.http_method = "DELETE"
32
- method.uri = "/exports/:id"
36
+ method.synopsis = 'Delete the export'
37
+ method.http_method = 'DELETE'
38
+ method.uri = '/exports/:id'
33
39
 
34
40
  method.parameter('id') do |p|
35
41
  p.required = 'Y'
@@ -38,5 +44,4 @@ class ApiSpec::Spec
38
44
  end
39
45
  end
40
46
  end
41
-
42
47
  end
@@ -3,22 +3,21 @@ class ApiSpec::Spec
3
3
  endpoint 'Imports' do |import|
4
4
 
5
5
  import.method('Show') do |method|
6
- method.synopsis = "Shows the status of an import"
7
- method.http_method = "GET"
8
- method.uri = "/imports/:id"
6
+ method.synopsis = 'Shows the status of an import'
7
+ method.http_method = 'GET'
8
+ method.uri = '/imports/:id'
9
9
 
10
10
  method.parameter('id') do |p|
11
11
  p.required = 'Y'
12
12
  p.type = 'int'
13
13
  p.description = 'the ID of the import'
14
14
  end
15
-
16
15
  end
17
16
 
18
17
  import.method('Create') do |method|
19
- method.synopsis = "Creates a import with the provided data"
20
- method.http_method = "POST"
21
- method.uri = "/imports"
18
+ method.synopsis = 'Creates a import with the provided data'
19
+ method.http_method = 'POST'
20
+ method.uri = '/imports'
22
21
 
23
22
  method.parameter('body') do |p|
24
23
  p.required = 'Y'
@@ -28,9 +27,9 @@ class ApiSpec::Spec
28
27
  end
29
28
 
30
29
  import.method('Result') do |method|
31
- method.synopsis = "Gets the import results and error csv file."
32
- method.http_method = "GET"
33
- method.uri = "/imports/:id/result"
30
+ method.synopsis = 'Gets the import results and error csv file.'
31
+ method.http_method = 'GET'
32
+ method.uri = '/imports/:id/result'
34
33
 
35
34
  method.parameter('id') do |p|
36
35
  p.required = 'Y'
@@ -39,5 +38,4 @@ class ApiSpec::Spec
39
38
  end
40
39
  end
41
40
  end
42
-
43
41
  end
@@ -3,9 +3,9 @@ class ApiSpec::Spec
3
3
  endpoint 'Lists' do |lists|
4
4
 
5
5
  lists.method('Index') do |method|
6
- method.synopsis = "Returns a list of created custom lists"
7
- method.http_method = "GET"
8
- method.uri = "/lists"
6
+ method.synopsis = 'Returns a list of created custom lists'
7
+ method.http_method = 'GET'
8
+ method.uri = '/lists'
9
9
 
10
10
  method.parameter('__token') do |p|
11
11
  p.required = 'N'
@@ -28,14 +28,14 @@ class ApiSpec::Spec
28
28
  end
29
29
 
30
30
  lists.method('People') do |method|
31
- method.synopsis = "Returns people stored in a list"
32
- method.http_method = "GET"
33
- method.uri = "/lists/:id/people"
31
+ method.synopsis = 'Returns people stored in a list'
32
+ method.http_method = 'GET'
33
+ method.uri = '/lists/:id/people'
34
34
 
35
35
  method.parameter('id') do |p|
36
36
  p.required = 'Y'
37
37
  p.type = 'int'
38
- p.description = "The list's ID"
38
+ p.description = "the list's ID"
39
39
  end
40
40
 
41
41
  method.parameter('__token') do |p|
@@ -59,27 +59,27 @@ class ApiSpec::Spec
59
59
  end
60
60
 
61
61
  lists.method('Create') do |method|
62
- method.synopsis = "Creates a list with the provided data"
63
- method.http_method = "POST"
64
- method.uri = "/lists"
62
+ method.synopsis = 'Creates a list with the provided data'
63
+ method.http_method = 'POST'
64
+ method.uri = '/lists'
65
65
 
66
66
  method.parameter('body') do |p|
67
67
  p.required = 'Y'
68
68
  p.default = '{}'
69
69
  p.type = 'json'
70
- p.description = 'JSON representation of the list to create'
70
+ p.description = 'a JSON representation of the list to create'
71
71
  end
72
72
  end
73
73
 
74
74
  lists.method('Update') do |method|
75
- method.synopsis = "Updates a list with the provided data"
76
- method.http_method = "PUT"
77
- method.uri = "/lists/:id"
75
+ method.synopsis = 'Updates a list with the provided data'
76
+ method.http_method = 'PUT'
77
+ method.uri = '/lists/:id'
78
78
 
79
79
  method.parameter('id') do |p|
80
80
  p.required = 'Y'
81
81
  p.type = 'int'
82
- p.description = "The list's ID"
82
+ p.description = "the list's ID"
83
83
  end
84
84
 
85
85
  method.parameter('body') do |p|
@@ -91,26 +91,26 @@ class ApiSpec::Spec
91
91
  end
92
92
 
93
93
  lists.method('Destroy') do |method|
94
- method.synopsis = "Removes the list with the matching ID"
95
- method.http_method = "DELETE"
96
- method.uri = "/lists/:id"
94
+ method.synopsis = 'Removes the list with the matching ID'
95
+ method.http_method = 'DELETE'
96
+ method.uri = '/lists/:id'
97
97
 
98
98
  method.parameter('id') do |p|
99
99
  p.required = 'Y'
100
100
  p.type = 'int'
101
- p.description = "The list's ID"
101
+ p.description = "the list's ID"
102
102
  end
103
103
  end
104
104
 
105
105
  lists.method('Add people') do |method|
106
- method.synopsis = "Adds people to a list"
107
- method.http_method = "POST"
108
- method.uri = "/lists/:list_id/people"
106
+ method.synopsis = 'Adds people to a list'
107
+ method.http_method = 'POST'
108
+ method.uri = '/lists/:list_id/people'
109
109
 
110
110
  method.parameter('list_id') do |p|
111
111
  p.required = 'Y'
112
112
  p.type = 'int'
113
- p.description = 'The ID of the list'
113
+ p.description = "the list's ID"
114
114
  end
115
115
 
116
116
  method.parameter('body') do |p|
@@ -121,14 +121,14 @@ class ApiSpec::Spec
121
121
  end
122
122
 
123
123
  lists.method('Destroy people') do |method|
124
- method.synopsis = "Removes people from a list"
125
- method.http_method = "DELETE"
126
- method.uri = "/lists/:list_id/people"
124
+ method.synopsis = 'Removes people from a list'
125
+ method.http_method = 'DELETE'
126
+ method.uri = '/lists/:list_id/people'
127
127
 
128
128
  method.parameter('list_id') do |p|
129
129
  p.required = 'Y'
130
130
  p.type = 'int'
131
- p.description = 'The ID of the list'
131
+ p.description = "the list's ID"
132
132
  end
133
133
 
134
134
  method.parameter('body') do |p|
@@ -139,77 +139,75 @@ class ApiSpec::Spec
139
139
  end
140
140
 
141
141
  lists.method('Listing Create (deprecated)') do |method|
142
- method.synopsis = "Adds a person to a list"
143
- method.http_method = "POST"
144
- method.uri = "/lists/:list_id/listings"
142
+ method.synopsis = 'Adds a person to a list'
143
+ method.http_method = 'POST'
144
+ method.uri = '/lists/:list_id/listings'
145
145
 
146
146
  method.parameter('list_id') do |p|
147
147
  p.required = 'Y'
148
148
  p.type = 'int'
149
- p.description = 'The ID of the list'
149
+ p.description = "the list's ID"
150
150
  end
151
151
 
152
152
  method.parameter('person_id') do |p|
153
153
  p.required = 'Y'
154
154
  p.type = 'int'
155
- p.description = 'The ID of the person to add to the list'
155
+ p.description = 'the ID of the person to add to the list'
156
156
  end
157
157
  end
158
158
 
159
159
  lists.method('Listing Deletion (deprecated)') do |method|
160
- method.synopsis = "Drops a person from a list"
161
- method.http_method = "DELETE"
162
- method.uri = "/lists/:list_id/listings/:person_id"
160
+ method.synopsis = 'Drops a person from a list'
161
+ method.http_method = 'DELETE'
162
+ method.uri = '/lists/:list_id/listings/:person_id'
163
163
 
164
164
  method.parameter('list_id') do |p|
165
165
  p.required = 'Y'
166
166
  p.type = 'int'
167
- p.description = 'The ID of the list'
167
+ p.description = "the list's ID"
168
168
  end
169
169
 
170
170
  method.parameter('person_id') do |p|
171
171
  p.required = 'Y'
172
172
  p.type = 'int'
173
- p.description = 'The ID of the person to drop from the list'
173
+ p.description = 'the ID of the person to drop from the list'
174
174
  end
175
175
  end
176
176
 
177
177
  lists.method('Add tag') do |method|
178
- method.synopsis = "Adds a tag to all of the list members"
179
- method.http_method = "POST"
180
- method.uri = "/lists/:list_id/tag/:tag"
178
+ method.synopsis = 'Adds a tag to all of the list members'
179
+ method.http_method = 'POST'
180
+ method.uri = '/lists/:list_id/tag/:tag'
181
181
 
182
182
  method.parameter('list_id') do |p|
183
183
  p.required = 'Y'
184
184
  p.type = 'int'
185
- p.description = 'The ID of the list'
185
+ p.description = "the list's ID"
186
186
  end
187
187
 
188
188
  method.parameter('tag') do |p|
189
189
  p.required = 'Y'
190
190
  p.type = 'string'
191
- p.description = 'The name of the tag to use'
191
+ p.description = 'the name of the tag to use'
192
192
  end
193
193
  end
194
194
 
195
195
  lists.method('Delete tag') do |method|
196
- method.synopsis = "Deletes the tag from all of the list members"
197
- method.http_method = "DELETE"
198
- method.uri = "/lists/:list_id/tag/:tag"
196
+ method.synopsis = 'Deletes the tag from all of the list members'
197
+ method.http_method = 'DELETE'
198
+ method.uri = '/lists/:list_id/tag/:tag'
199
199
 
200
200
  method.parameter('list_id') do |p|
201
201
  p.required = 'Y'
202
202
  p.type = 'int'
203
- p.description = 'The ID of the list'
203
+ p.description = "the list's ID"
204
204
  end
205
205
 
206
206
  method.parameter('tag') do |p|
207
207
  p.required = 'Y'
208
208
  p.type = 'string'
209
- p.description = 'The name of the tag to use'
209
+ p.description = 'the name of the tag to use'
210
210
  end
211
211
  end
212
-
213
212
  end
214
-
215
213
  end
@@ -1,7 +1,7 @@
1
1
  class ApiSpec::Spec
2
2
 
3
3
  endpoint 'Memberships' do |memberships|
4
-
4
+
5
5
  memberships.method('Index') do |method|
6
6
  method.synopsis = 'Lists all memberships for a person'
7
7
  method.http_method = 'GET'
@@ -10,7 +10,7 @@ class ApiSpec::Spec
10
10
  method.parameter('person_id') do |p|
11
11
  p.required = 'Y'
12
12
  p.type = 'int'
13
- p.description = 'The person\'s ID'
13
+ p.description = "the person's ID"
14
14
  end
15
15
 
16
16
  method.parameter('__token') do |p|
@@ -41,7 +41,7 @@ class ApiSpec::Spec
41
41
  method.parameter('person_id') do |p|
42
42
  p.required = 'Y'
43
43
  p.type = 'int'
44
- p.description = 'The person\'s ID'
44
+ p.description = "the person's ID"
45
45
  end
46
46
 
47
47
  method.parameter('body') do |p|
@@ -60,7 +60,7 @@ class ApiSpec::Spec
60
60
  method.parameter('person_id') do |p|
61
61
  p.required = 'Y'
62
62
  p.type = 'int'
63
- p.description = 'The person\'s ID'
63
+ p.description = "the person's ID"
64
64
  end
65
65
 
66
66
  method.parameter('body') do |p|
@@ -79,16 +79,14 @@ class ApiSpec::Spec
79
79
  method.parameter('person_id') do |p|
80
80
  p.required = 'Y'
81
81
  p.type = 'int'
82
- p.description = 'The person\'s ID'
82
+ p.description = "the person's ID"
83
83
  end
84
84
 
85
85
  method.parameter('name') do |p|
86
86
  p.required = 'Y'
87
87
  p.type = 'string'
88
- p.description = 'The name of the membership'
88
+ p.description = 'the name of the membership'
89
89
  end
90
90
  end
91
-
92
91
  end
93
-
94
92
  end