nationbuilder-rb 1.3.5 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/api_spec/lib/api_spec/generator.rb +6 -11
- data/lib/api_spec/lib/api_spec/specs/basic_pages.rb +12 -22
- data/lib/api_spec/lib/api_spec/specs/blog_posts.rb +15 -28
- data/lib/api_spec/lib/api_spec/specs/blogs.rb +15 -27
- data/lib/api_spec/lib/api_spec/specs/calendars.rb +15 -27
- data/lib/api_spec/lib/api_spec/specs/campaign_data.rb +3 -7
- data/lib/api_spec/lib/api_spec/specs/contacts.rb +25 -45
- data/lib/api_spec/lib/api_spec/specs/donations.rb +15 -17
- data/lib/api_spec/lib/api_spec/specs/events.rb +31 -38
- data/lib/api_spec/lib/api_spec/specs/exports.rb +16 -11
- data/lib/api_spec/lib/api_spec/specs/imports.rb +9 -11
- data/lib/api_spec/lib/api_spec/specs/lists.rb +47 -49
- data/lib/api_spec/lib/api_spec/specs/memberships.rb +6 -8
- data/lib/api_spec/lib/api_spec/specs/page_attachments.rb +22 -24
- data/lib/api_spec/lib/api_spec/specs/people.rb +88 -92
- data/lib/api_spec/lib/api_spec/specs/people_tags.rb +6 -8
- data/lib/api_spec/lib/api_spec/specs/precincts.rb +19 -21
- data/lib/api_spec/lib/api_spec/specs/sites.rb +3 -5
- data/lib/api_spec/lib/api_spec/specs/survey_responses.rb +7 -11
- data/lib/api_spec/lib/api_spec/specs/surveys.rb +13 -23
- data/lib/api_spec/lib/api_spec/specs/webhooks.rb +12 -21
- data/lib/api_spec/spec.json +71 -64
- data/nationbuilder-rb.gemspec +3 -3
- metadata +2 -2
@@ -3,9 +3,9 @@ class ApiSpec::Spec
|
|
3
3
|
endpoint 'Sites' do |tags|
|
4
4
|
|
5
5
|
tags.method('Index') do |method|
|
6
|
-
method.synopsis =
|
7
|
-
method.http_method =
|
8
|
-
method.uri =
|
6
|
+
method.synopsis = 'Returns a list of all sites'
|
7
|
+
method.http_method = 'GET'
|
8
|
+
method.uri = '/sites'
|
9
9
|
|
10
10
|
method.parameter('__token') do |p|
|
11
11
|
p.required = 'N'
|
@@ -26,7 +26,5 @@ class ApiSpec::Spec
|
|
26
26
|
p.description = 'maximum number of results to return'
|
27
27
|
end
|
28
28
|
end
|
29
|
-
|
30
29
|
end
|
31
|
-
|
32
30
|
end
|
@@ -3,10 +3,9 @@ class ApiSpec::Spec
|
|
3
3
|
endpoint 'Survey Responses' do |surveys|
|
4
4
|
|
5
5
|
surveys.method('Index') do |m|
|
6
|
-
|
7
|
-
m.
|
8
|
-
m.
|
9
|
-
m.uri = "/survey_responses"
|
6
|
+
m.synopsis = 'Lists all survey responses'
|
7
|
+
m.http_method = 'GET'
|
8
|
+
m.uri = '/survey_responses'
|
10
9
|
|
11
10
|
m.parameter('start_time') do |p|
|
12
11
|
p.required = 'N'
|
@@ -23,7 +22,7 @@ class ApiSpec::Spec
|
|
23
22
|
m.parameter('survey_id') do |p|
|
24
23
|
p.required = 'N'
|
25
24
|
p.type = 'int'
|
26
|
-
p.description = 'the
|
25
|
+
p.description = 'the ID for a parent survey'
|
27
26
|
end
|
28
27
|
|
29
28
|
m.parameter('__token') do |p|
|
@@ -44,13 +43,12 @@ class ApiSpec::Spec
|
|
44
43
|
p.type = 'int'
|
45
44
|
p.description = 'maximum number of results to return'
|
46
45
|
end
|
47
|
-
|
48
46
|
end
|
49
47
|
|
50
48
|
surveys.method('Create') do |m|
|
51
|
-
m.synopsis =
|
52
|
-
m.http_method =
|
53
|
-
m.uri =
|
49
|
+
m.synopsis = 'Creates responses for a survey'
|
50
|
+
m.http_method = 'POST'
|
51
|
+
m.uri = '/survey_responses'
|
54
52
|
|
55
53
|
m.parameter('body') do |p|
|
56
54
|
p.required = 'Y'
|
@@ -59,6 +57,4 @@ class ApiSpec::Spec
|
|
59
57
|
end
|
60
58
|
end
|
61
59
|
end
|
62
|
-
|
63
|
-
|
64
60
|
end
|
@@ -3,10 +3,9 @@ class ApiSpec::Spec
|
|
3
3
|
endpoint 'Surveys' do |surveys|
|
4
4
|
|
5
5
|
surveys.method('Index') do |m|
|
6
|
-
|
7
|
-
m.
|
8
|
-
m.
|
9
|
-
m.uri = "/sites/:site_slug/pages/surveys"
|
6
|
+
m.synopsis = 'Shows a list of all surveys for the a site'
|
7
|
+
m.http_method = 'GET'
|
8
|
+
m.uri = '/sites/:site_slug/pages/surveys'
|
10
9
|
|
11
10
|
m.parameter('site_slug') do |p|
|
12
11
|
p.required = 'Y'
|
@@ -32,14 +31,12 @@ class ApiSpec::Spec
|
|
32
31
|
p.type = 'int'
|
33
32
|
p.description = 'maximum number of results to return'
|
34
33
|
end
|
35
|
-
|
36
34
|
end
|
37
35
|
|
38
36
|
surveys.method('Create') do |m|
|
39
|
-
|
40
|
-
m.
|
41
|
-
m.
|
42
|
-
m.uri = "/sites/:site_slug/pages/surveys"
|
37
|
+
m.synopsis = 'Creates a survey for a site'
|
38
|
+
m.http_method = 'POST'
|
39
|
+
m.uri = '/sites/:site_slug/pages/surveys'
|
43
40
|
|
44
41
|
m.parameter('site_slug') do |p|
|
45
42
|
p.required = 'Y'
|
@@ -50,16 +47,14 @@ class ApiSpec::Spec
|
|
50
47
|
m.parameter('body') do |p|
|
51
48
|
p.required = 'Y'
|
52
49
|
p.type = 'json'
|
53
|
-
p.description = '
|
50
|
+
p.description = 'A JSON representation of the new survey'
|
54
51
|
end
|
55
|
-
|
56
52
|
end
|
57
53
|
|
58
54
|
surveys.method('Update') do |m|
|
59
|
-
|
60
|
-
m.
|
61
|
-
m.
|
62
|
-
m.uri = "/sites/:site_slug/pages/surveys/:id"
|
55
|
+
m.synopsis = 'Updates the attributes of a survey'
|
56
|
+
m.http_method = 'PUT'
|
57
|
+
m.uri = '/sites/:site_slug/pages/surveys/:id'
|
63
58
|
|
64
59
|
m.parameter('site_slug') do |p|
|
65
60
|
p.required = 'Y'
|
@@ -78,14 +73,12 @@ class ApiSpec::Spec
|
|
78
73
|
p.type = 'json'
|
79
74
|
p.description = 'JSON containing updates'
|
80
75
|
end
|
81
|
-
|
82
76
|
end
|
83
77
|
|
84
78
|
surveys.method('Destroy') do |m|
|
85
|
-
|
86
|
-
m.
|
87
|
-
m.
|
88
|
-
m.uri = "/sites/:site_slug/pages/surveys/:id"
|
79
|
+
m.synopsis = 'Removes a survey'
|
80
|
+
m.http_method = 'DELETE'
|
81
|
+
m.uri = '/sites/:site_slug/pages/surveys/:id'
|
89
82
|
|
90
83
|
m.parameter('site_slug') do |p|
|
91
84
|
p.required = 'Y'
|
@@ -98,9 +91,6 @@ class ApiSpec::Spec
|
|
98
91
|
p.type = 'int'
|
99
92
|
p.description = 'the ID of the survey'
|
100
93
|
end
|
101
|
-
|
102
94
|
end
|
103
|
-
|
104
95
|
end
|
105
|
-
|
106
96
|
end
|
@@ -3,10 +3,9 @@ class ApiSpec::Spec
|
|
3
3
|
endpoint 'Webhooks' do |surveys|
|
4
4
|
|
5
5
|
surveys.method('Index') do |m|
|
6
|
-
|
7
|
-
m.
|
8
|
-
m.
|
9
|
-
m.uri = "/webhooks"
|
6
|
+
m.synopsis = 'Lists all webhooks'
|
7
|
+
m.http_method = 'GET'
|
8
|
+
m.uri = '/webhooks'
|
10
9
|
|
11
10
|
m.parameter('__token') do |p|
|
12
11
|
p.required = 'N'
|
@@ -26,27 +25,24 @@ class ApiSpec::Spec
|
|
26
25
|
p.type = 'int'
|
27
26
|
p.description = 'maximum number of results to return'
|
28
27
|
end
|
29
|
-
|
30
28
|
end
|
31
29
|
|
32
30
|
surveys.method('Show') do |m|
|
33
|
-
|
34
|
-
m.
|
35
|
-
m.
|
36
|
-
m.uri = "/webhooks/:id"
|
31
|
+
m.synopsis = 'Shows the details of an individual webhook'
|
32
|
+
m.http_method = 'GET'
|
33
|
+
m.uri = '/webhooks/:id'
|
37
34
|
|
38
35
|
m.parameter('id') do |p|
|
39
36
|
p.required = 'Y'
|
40
37
|
p.type = 'string'
|
41
38
|
p.description = 'the ID of the webhook to display'
|
42
39
|
end
|
43
|
-
|
44
40
|
end
|
45
41
|
|
46
42
|
surveys.method('Create') do |m|
|
47
|
-
m.synopsis =
|
48
|
-
m.http_method =
|
49
|
-
m.uri =
|
43
|
+
m.synopsis = 'Creates a new webhook'
|
44
|
+
m.http_method = 'POST'
|
45
|
+
m.uri = '/webhooks'
|
50
46
|
|
51
47
|
m.parameter('body') do |p|
|
52
48
|
p.required = 'Y'
|
@@ -56,20 +52,15 @@ class ApiSpec::Spec
|
|
56
52
|
end
|
57
53
|
|
58
54
|
surveys.method('Destroy') do |m|
|
59
|
-
|
60
|
-
m.
|
61
|
-
m.
|
62
|
-
m.uri = "/webhooks/:id"
|
55
|
+
m.synopsis = 'Destroys a webhook'
|
56
|
+
m.http_method = 'DELETE'
|
57
|
+
m.uri = '/webhooks/:id'
|
63
58
|
|
64
59
|
m.parameter('id') do |p|
|
65
60
|
p.required = 'Y'
|
66
61
|
p.type = 'int'
|
67
62
|
p.description = 'the ID a webhook'
|
68
63
|
end
|
69
|
-
|
70
64
|
end
|
71
|
-
|
72
65
|
end
|
73
|
-
|
74
|
-
|
75
66
|
end
|