nationbuilder-rb 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/.document +5 -0
- data/.rspec +1 -0
- data/.ruby-gemset +1 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +82 -0
- data/LICENSE.txt +20 -0
- data/README.md +103 -0
- data/Rakefile +30 -0
- data/VERSION +1 -0
- data/bin/nbdoc +14 -0
- data/lib/nationbuilder.rb +24 -0
- data/lib/nationbuilder/api_spec.json +2151 -0
- data/lib/nationbuilder/client.rb +97 -0
- data/lib/nationbuilder/endpoint.rb +24 -0
- data/lib/nationbuilder/method.rb +48 -0
- data/lib/nationbuilder/parameter.rb +9 -0
- data/lib/nationbuilder/spec_parser.rb +28 -0
- data/nationbuilder-rb.gemspec +80 -0
- data/spec/fixtures/delete.yml +65 -0
- data/spec/fixtures/parametered_get.yml +79 -0
- data/spec/fixtures/parametered_post.yml +68 -0
- data/spec/fixtures/parametered_put.yml +69 -0
- data/spec/nationbuilder_client_spec.rb +87 -0
- data/spec/spec_helper.rb +15 -0
- metadata +154 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 83841921d09006469ddc14f13acb12e99ba87277
|
4
|
+
data.tar.gz: 35766c21dbb833903cd33d27ebdd1b4ecebbcf1d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 92dbc9527dbb3162b1c6303e21248e7d708bb53508e62e70b8c6a53e272cd87f81b9878315c77e3bd71a3d55b425c4772bc5daf7aeaf21f9b9b27e7fa1aaf894
|
7
|
+
data.tar.gz: 4ebd640859fa7673ed3f129de176600af1fcaff2c3ce62ebd5b10396fe567d7a84178c8d75205622b4de972ef85ab9366e40ffec7ad0e3ce692c310f5fdd16bb
|
data/.document
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
nationbuilder-rb
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
addressable (2.3.6)
|
5
|
+
builder (3.2.2)
|
6
|
+
crack (0.4.2)
|
7
|
+
safe_yaml (~> 1.0.0)
|
8
|
+
descendants_tracker (0.0.4)
|
9
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
10
|
+
diff-lcs (1.1.3)
|
11
|
+
docile (1.1.5)
|
12
|
+
faraday (0.9.0)
|
13
|
+
multipart-post (>= 1.2, < 3)
|
14
|
+
git (1.2.7)
|
15
|
+
github_api (0.11.3)
|
16
|
+
addressable (~> 2.3)
|
17
|
+
descendants_tracker (~> 0.0.1)
|
18
|
+
faraday (~> 0.8, < 0.10)
|
19
|
+
hashie (>= 1.2)
|
20
|
+
multi_json (>= 1.7.5, < 2.0)
|
21
|
+
nokogiri (~> 1.6.0)
|
22
|
+
oauth2
|
23
|
+
hashie (3.1.0)
|
24
|
+
highline (1.6.21)
|
25
|
+
httpclient (2.4.0)
|
26
|
+
jeweler (2.0.1)
|
27
|
+
builder
|
28
|
+
bundler (>= 1.0)
|
29
|
+
git (>= 1.2.5)
|
30
|
+
github_api
|
31
|
+
highline (>= 1.6.15)
|
32
|
+
nokogiri (>= 1.5.10)
|
33
|
+
rake
|
34
|
+
rdoc
|
35
|
+
json (1.8.1)
|
36
|
+
jwt (1.0.0)
|
37
|
+
mini_portile (0.6.0)
|
38
|
+
multi_json (1.10.1)
|
39
|
+
multi_xml (0.5.5)
|
40
|
+
multipart-post (2.0.0)
|
41
|
+
nokogiri (1.6.2.1)
|
42
|
+
mini_portile (= 0.6.0)
|
43
|
+
oauth2 (0.9.4)
|
44
|
+
faraday (>= 0.8, < 0.10)
|
45
|
+
jwt (~> 1.0)
|
46
|
+
multi_json (~> 1.3)
|
47
|
+
multi_xml (~> 0.5)
|
48
|
+
rack (~> 1.2)
|
49
|
+
rack (1.5.2)
|
50
|
+
rake (10.3.2)
|
51
|
+
rdoc (4.1.1)
|
52
|
+
json (~> 1.4)
|
53
|
+
rspec (2.8.0)
|
54
|
+
rspec-core (~> 2.8.0)
|
55
|
+
rspec-expectations (~> 2.8.0)
|
56
|
+
rspec-mocks (~> 2.8.0)
|
57
|
+
rspec-core (2.8.0)
|
58
|
+
rspec-expectations (2.8.0)
|
59
|
+
diff-lcs (~> 1.1.2)
|
60
|
+
rspec-mocks (2.8.0)
|
61
|
+
safe_yaml (1.0.3)
|
62
|
+
simplecov (0.8.2)
|
63
|
+
docile (~> 1.1.0)
|
64
|
+
multi_json
|
65
|
+
simplecov-html (~> 0.8.0)
|
66
|
+
simplecov-html (0.8.0)
|
67
|
+
thread_safe (0.3.4)
|
68
|
+
vcr (2.9.2)
|
69
|
+
webmock (1.18.0)
|
70
|
+
addressable (>= 2.3.6)
|
71
|
+
crack (>= 0.3.2)
|
72
|
+
|
73
|
+
PLATFORMS
|
74
|
+
ruby
|
75
|
+
|
76
|
+
DEPENDENCIES
|
77
|
+
httpclient (~> 2.4.0)
|
78
|
+
jeweler (~> 2.0.1)
|
79
|
+
rspec (~> 2.8.0)
|
80
|
+
simplecov (~> 0.8.2)
|
81
|
+
vcr (~> 2.9.2)
|
82
|
+
webmock (~> 1.18.0)
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2014 NationBuilder.
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
# nationbuilder-rb
|
2
|
+
|
3
|
+
A Ruby client for the NationBuilder API.
|
4
|
+
|
5
|
+
## Installing
|
6
|
+
|
7
|
+
To install this gem to your current gemset, run:
|
8
|
+
|
9
|
+
```shell
|
10
|
+
$ gem install nationbuilder-rb
|
11
|
+
```
|
12
|
+
|
13
|
+
Or, add this to your gemfile:
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
gem 'nationbuilder-rb'
|
17
|
+
```
|
18
|
+
|
19
|
+
## Creating a client
|
20
|
+
|
21
|
+
Require the gem:
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'nationbuilder'
|
25
|
+
```
|
26
|
+
|
27
|
+
Then, create a client by specifying the name of your nation and
|
28
|
+
your API token:
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
client = NationBuilder::Client.new('my_nation_name', 'my_api_token')
|
32
|
+
```
|
33
|
+
|
34
|
+
## Calling the API
|
35
|
+
|
36
|
+
There is only a single method for calling the NationBuilder API in
|
37
|
+
`nationbuilder-rb`, and that's the `#call` method on a client. The
|
38
|
+
`#call` method takes three parameters: the name of the endpoint,
|
39
|
+
the name of the method, and an optional hash containing arguments
|
40
|
+
for the method.
|
41
|
+
|
42
|
+
## Examples
|
43
|
+
|
44
|
+
### Fetching a person
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
client.call(:people, :show, id: 15)
|
48
|
+
```
|
49
|
+
|
50
|
+
### Creating a person
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
params = {
|
54
|
+
person: {
|
55
|
+
email: "bob@example.com",
|
56
|
+
last_name: "Smith",
|
57
|
+
first_name: "Bob"
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
client.call(:people, :create, params)
|
62
|
+
```
|
63
|
+
|
64
|
+
### Destroying a person
|
65
|
+
|
66
|
+
```ruby
|
67
|
+
client.call(:people, :destroy, id: 15)
|
68
|
+
```
|
69
|
+
|
70
|
+
## Documentation
|
71
|
+
|
72
|
+
This gem includes a command line utility that prints out
|
73
|
+
all covered endpoints, methods, and parameters. To see
|
74
|
+
documentation for a single endpoint, run:
|
75
|
+
|
76
|
+
```shell
|
77
|
+
$ nbdoc ENDPOINT_NAME
|
78
|
+
```
|
79
|
+
|
80
|
+
To see all documentation, don't provide a endpoint name:
|
81
|
+
|
82
|
+
```shell
|
83
|
+
$ nbdoc
|
84
|
+
```
|
85
|
+
|
86
|
+
### Example
|
87
|
+
|
88
|
+
```
|
89
|
+
$ nbdoc basic_pages
|
90
|
+
|
91
|
+
=====================
|
92
|
+
Endpoint: basic_pages
|
93
|
+
=====================
|
94
|
+
|
95
|
+
Method: :index
|
96
|
+
Description: Shows a list of the basic pages in the system
|
97
|
+
Required parameters: :site_slug
|
98
|
+
|
99
|
+
Method: :create
|
100
|
+
Description: Creates a basic page for a site
|
101
|
+
Required parameters: :site_slug
|
102
|
+
...
|
103
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'jeweler'
|
4
|
+
|
5
|
+
Jeweler::Tasks.new do |gem|
|
6
|
+
gem.name = 'nationbuilder-rb'
|
7
|
+
gem.homepage = 'http://github.com/3dna/nationbuilder-rb'
|
8
|
+
gem.license = 'MIT'
|
9
|
+
gem.summary = 'A Ruby client to the NationBuilder API'
|
10
|
+
gem.description = 'A Ruby client to the NationBuilder API'
|
11
|
+
gem.email = 'david@nationbuilder.com'
|
12
|
+
gem.authors = ['David Huie']
|
13
|
+
end
|
14
|
+
|
15
|
+
Jeweler::RubygemsDotOrgTasks.new
|
16
|
+
|
17
|
+
require 'rspec/core'
|
18
|
+
require 'rspec/core/rake_task'
|
19
|
+
|
20
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
21
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
22
|
+
end
|
23
|
+
|
24
|
+
desc 'Code coverage detail'
|
25
|
+
task :simplecov do
|
26
|
+
ENV['COVERAGE'] = '1'
|
27
|
+
Rake::Task['spec'].execute
|
28
|
+
end
|
29
|
+
|
30
|
+
task default: :spec
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
data/bin/nbdoc
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Prints out a description of all NationBuilder API endpoints.
|
4
|
+
|
5
|
+
require 'nationbuilder'
|
6
|
+
|
7
|
+
endpoint = ARGV.shift
|
8
|
+
client = NationBuilder::Client.new('test-nation', 'test-key')
|
9
|
+
|
10
|
+
if endpoint
|
11
|
+
client.print_description(endpoint)
|
12
|
+
else
|
13
|
+
client.print_all_descriptions
|
14
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'httpclient'
|
2
|
+
require 'json'
|
3
|
+
require 'set'
|
4
|
+
require 'uri'
|
5
|
+
|
6
|
+
module NationBuilder
|
7
|
+
|
8
|
+
URL_TEMPLATE = 'https://:nation_name.nationbuilder.com'
|
9
|
+
|
10
|
+
def self.generate_url(base_url, extension, parameters)
|
11
|
+
url = URI.join(base_url, '/api/v1' + extension).to_s
|
12
|
+
parameters.each do |name, value|
|
13
|
+
url.gsub!(name.inspect, value.to_s)
|
14
|
+
end
|
15
|
+
url
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
require 'nationbuilder/client'
|
21
|
+
require 'nationbuilder/endpoint'
|
22
|
+
require 'nationbuilder/method'
|
23
|
+
require 'nationbuilder/parameter'
|
24
|
+
require 'nationbuilder/spec_parser'
|
@@ -0,0 +1,2151 @@
|
|
1
|
+
{
|
2
|
+
"endpoints": [
|
3
|
+
{
|
4
|
+
"name": "Basic Pages",
|
5
|
+
"methods": [
|
6
|
+
{
|
7
|
+
"MethodName": "Index",
|
8
|
+
"Synopsis": "Shows a list of the basic pages in the system",
|
9
|
+
"HTTPMethod": "GET",
|
10
|
+
"URI": "/sites/:site_slug/pages/basic_pages",
|
11
|
+
"parameters": [
|
12
|
+
{
|
13
|
+
"Name": "site_slug",
|
14
|
+
"Required": "Y",
|
15
|
+
"Default": null,
|
16
|
+
"Type": "string",
|
17
|
+
"Description": "the site holding the basic page"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"Name": "page",
|
21
|
+
"Required": "N",
|
22
|
+
"Default": "1",
|
23
|
+
"Type": "int",
|
24
|
+
"Description": "result page number"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"Name": "per_page",
|
28
|
+
"Required": "N",
|
29
|
+
"Default": "10",
|
30
|
+
"Type": "int",
|
31
|
+
"Description": "number of results to return"
|
32
|
+
}
|
33
|
+
]
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"MethodName": "Create",
|
37
|
+
"Synopsis": "Creates a basic page for a site",
|
38
|
+
"HTTPMethod": "POST",
|
39
|
+
"URI": "/sites/:site_slug/pages/basic_pages",
|
40
|
+
"parameters": [
|
41
|
+
{
|
42
|
+
"Name": "site_slug",
|
43
|
+
"Required": "Y",
|
44
|
+
"Default": null,
|
45
|
+
"Type": "string",
|
46
|
+
"Description": "the site holding the basic page"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"Name": "body",
|
50
|
+
"Required": "Y",
|
51
|
+
"Default": null,
|
52
|
+
"Type": "json",
|
53
|
+
"Description": "a JSON representation of the new basic page"
|
54
|
+
}
|
55
|
+
]
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"MethodName": "Update",
|
59
|
+
"Synopsis": "Updates the attributes of a basic page",
|
60
|
+
"HTTPMethod": "PUT",
|
61
|
+
"URI": "/sites/:site_slug/pages/basic_pages/:id",
|
62
|
+
"parameters": [
|
63
|
+
{
|
64
|
+
"Name": "site_slug",
|
65
|
+
"Required": "Y",
|
66
|
+
"Default": null,
|
67
|
+
"Type": "string",
|
68
|
+
"Description": "the site holding the basic page"
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"Name": "id",
|
72
|
+
"Required": "Y",
|
73
|
+
"Default": null,
|
74
|
+
"Type": "int",
|
75
|
+
"Description": "the ID of the basic page"
|
76
|
+
},
|
77
|
+
{
|
78
|
+
"Name": "body",
|
79
|
+
"Required": "Y",
|
80
|
+
"Default": null,
|
81
|
+
"Type": "json",
|
82
|
+
"Description": "JSON containing updates"
|
83
|
+
}
|
84
|
+
]
|
85
|
+
},
|
86
|
+
{
|
87
|
+
"MethodName": "Destroy",
|
88
|
+
"Synopsis": "Removes a basic page",
|
89
|
+
"HTTPMethod": "DELETE",
|
90
|
+
"URI": "/sites/:site_slug/pages/basic_pages/:id",
|
91
|
+
"parameters": [
|
92
|
+
{
|
93
|
+
"Name": "site_slug",
|
94
|
+
"Required": "Y",
|
95
|
+
"Default": null,
|
96
|
+
"Type": "string",
|
97
|
+
"Description": "the site holding the basic page"
|
98
|
+
},
|
99
|
+
{
|
100
|
+
"Name": "id",
|
101
|
+
"Required": "Y",
|
102
|
+
"Default": null,
|
103
|
+
"Type": "int",
|
104
|
+
"Description": "the ID of the basic page"
|
105
|
+
}
|
106
|
+
]
|
107
|
+
}
|
108
|
+
]
|
109
|
+
},
|
110
|
+
{
|
111
|
+
"name": "Blogs",
|
112
|
+
"methods": [
|
113
|
+
{
|
114
|
+
"MethodName": "Index",
|
115
|
+
"Synopsis": "Shows a list of all blogs",
|
116
|
+
"HTTPMethod": "GET",
|
117
|
+
"URI": "/sites/:site_slug/pages/blogs",
|
118
|
+
"parameters": [
|
119
|
+
{
|
120
|
+
"Name": "site_slug",
|
121
|
+
"Required": "Y",
|
122
|
+
"Default": null,
|
123
|
+
"Type": "string",
|
124
|
+
"Description": "the site holding the blog"
|
125
|
+
},
|
126
|
+
{
|
127
|
+
"Name": "page",
|
128
|
+
"Required": "N",
|
129
|
+
"Default": "1",
|
130
|
+
"Type": "int",
|
131
|
+
"Description": "result page number"
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"Name": "per_page",
|
135
|
+
"Required": "N",
|
136
|
+
"Default": "10",
|
137
|
+
"Type": "int",
|
138
|
+
"Description": "number of results to return"
|
139
|
+
}
|
140
|
+
]
|
141
|
+
},
|
142
|
+
{
|
143
|
+
"MethodName": "Show",
|
144
|
+
"Synopsis": "Show the details of a blog",
|
145
|
+
"HTTPMethod": "GET",
|
146
|
+
"URI": "/sites/:site_slug/pages/blogs/:id",
|
147
|
+
"parameters": [
|
148
|
+
{
|
149
|
+
"Name": "site_slug",
|
150
|
+
"Required": "Y",
|
151
|
+
"Default": null,
|
152
|
+
"Type": "string",
|
153
|
+
"Description": "the site holding the blog"
|
154
|
+
},
|
155
|
+
{
|
156
|
+
"Name": "id",
|
157
|
+
"Required": "Y",
|
158
|
+
"Default": null,
|
159
|
+
"Type": "int",
|
160
|
+
"Description": "the ID of the blog"
|
161
|
+
}
|
162
|
+
]
|
163
|
+
},
|
164
|
+
{
|
165
|
+
"MethodName": "Create",
|
166
|
+
"Synopsis": "Creates a new blog",
|
167
|
+
"HTTPMethod": "POST",
|
168
|
+
"URI": "/sites/:site_slug/pages/blogs",
|
169
|
+
"parameters": [
|
170
|
+
{
|
171
|
+
"Name": "site_slug",
|
172
|
+
"Required": "Y",
|
173
|
+
"Default": null,
|
174
|
+
"Type": "string",
|
175
|
+
"Description": "the site holding the blog"
|
176
|
+
},
|
177
|
+
{
|
178
|
+
"Name": "body",
|
179
|
+
"Required": "Y",
|
180
|
+
"Default": "1",
|
181
|
+
"Type": "json",
|
182
|
+
"Description": "a JSON representation of the new blog"
|
183
|
+
}
|
184
|
+
]
|
185
|
+
},
|
186
|
+
{
|
187
|
+
"MethodName": "Update",
|
188
|
+
"Synopsis": "Updates the attributes of a blog",
|
189
|
+
"HTTPMethod": "PUT",
|
190
|
+
"URI": "/sites/:site_slug/pages/blogs/:id",
|
191
|
+
"parameters": [
|
192
|
+
{
|
193
|
+
"Name": "site_slug",
|
194
|
+
"Required": "Y",
|
195
|
+
"Default": null,
|
196
|
+
"Type": "string",
|
197
|
+
"Description": "the site holding the blog"
|
198
|
+
},
|
199
|
+
{
|
200
|
+
"Name": "id",
|
201
|
+
"Required": "Y",
|
202
|
+
"Default": null,
|
203
|
+
"Type": "int",
|
204
|
+
"Description": "the ID of the blog"
|
205
|
+
},
|
206
|
+
{
|
207
|
+
"Name": "body",
|
208
|
+
"Required": "Y",
|
209
|
+
"Default": "1",
|
210
|
+
"Type": "json",
|
211
|
+
"Description": "JSON containing updates"
|
212
|
+
}
|
213
|
+
]
|
214
|
+
},
|
215
|
+
{
|
216
|
+
"MethodName": "Destroy",
|
217
|
+
"Synopsis": "Removes a blog",
|
218
|
+
"HTTPMethod": "DELETE",
|
219
|
+
"URI": "/sites/:site_slug/pages/blogs/:id",
|
220
|
+
"parameters": [
|
221
|
+
{
|
222
|
+
"Name": "site_slug",
|
223
|
+
"Required": "Y",
|
224
|
+
"Default": null,
|
225
|
+
"Type": "string",
|
226
|
+
"Description": "the site holding the blog"
|
227
|
+
},
|
228
|
+
{
|
229
|
+
"Name": "id",
|
230
|
+
"Required": "Y",
|
231
|
+
"Default": null,
|
232
|
+
"Type": "int",
|
233
|
+
"Description": "the ID of the blog"
|
234
|
+
}
|
235
|
+
]
|
236
|
+
}
|
237
|
+
]
|
238
|
+
},
|
239
|
+
{
|
240
|
+
"name": "Blog Posts",
|
241
|
+
"methods": [
|
242
|
+
{
|
243
|
+
"MethodName": "Index",
|
244
|
+
"Synopsis": "Shows a list of blog's posts",
|
245
|
+
"HTTPMethod": "GET",
|
246
|
+
"URI": "/sites/:site_slug/pages/blogs/:id/posts",
|
247
|
+
"parameters": [
|
248
|
+
{
|
249
|
+
"Name": "site_slug",
|
250
|
+
"Required": "Y",
|
251
|
+
"Default": null,
|
252
|
+
"Type": "string",
|
253
|
+
"Description": "the site holding the blog"
|
254
|
+
},
|
255
|
+
{
|
256
|
+
"Name": "id",
|
257
|
+
"Required": "Y",
|
258
|
+
"Default": null,
|
259
|
+
"Type": "int",
|
260
|
+
"Description": "the ID of the blog"
|
261
|
+
},
|
262
|
+
{
|
263
|
+
"Name": "page",
|
264
|
+
"Required": "N",
|
265
|
+
"Default": "1",
|
266
|
+
"Type": "int",
|
267
|
+
"Description": "result page number"
|
268
|
+
},
|
269
|
+
{
|
270
|
+
"Name": "per_page",
|
271
|
+
"Required": "N",
|
272
|
+
"Default": "10",
|
273
|
+
"Type": "int",
|
274
|
+
"Description": "number of results to return"
|
275
|
+
}
|
276
|
+
]
|
277
|
+
},
|
278
|
+
{
|
279
|
+
"MethodName": "Match",
|
280
|
+
"Synopsis": "Find a blog post by its external id",
|
281
|
+
"HTTPMethod": "GET",
|
282
|
+
"URI": "/sites/:site_slug/pages/blogs/:id/match",
|
283
|
+
"parameters": [
|
284
|
+
{
|
285
|
+
"Name": "site_slug",
|
286
|
+
"Required": "Y",
|
287
|
+
"Default": null,
|
288
|
+
"Type": "string",
|
289
|
+
"Description": "the site holding the blog"
|
290
|
+
},
|
291
|
+
{
|
292
|
+
"Name": "id",
|
293
|
+
"Required": "Y",
|
294
|
+
"Default": null,
|
295
|
+
"Type": "int",
|
296
|
+
"Description": "the ID of the blog"
|
297
|
+
},
|
298
|
+
{
|
299
|
+
"Name": "external_id",
|
300
|
+
"Required": "N",
|
301
|
+
"Default": "1",
|
302
|
+
"Type": "int",
|
303
|
+
"Description": "the external id of the post"
|
304
|
+
}
|
305
|
+
]
|
306
|
+
},
|
307
|
+
{
|
308
|
+
"MethodName": "Create",
|
309
|
+
"Synopsis": "Creates a new blog post",
|
310
|
+
"HTTPMethod": "POST",
|
311
|
+
"URI": "/sites/:site_slug/pages/blogs/:blog_id/posts",
|
312
|
+
"parameters": [
|
313
|
+
{
|
314
|
+
"Name": "site_slug",
|
315
|
+
"Required": "Y",
|
316
|
+
"Default": null,
|
317
|
+
"Type": "string",
|
318
|
+
"Description": "the site holding the blog"
|
319
|
+
},
|
320
|
+
{
|
321
|
+
"Name": "blog_id",
|
322
|
+
"Required": "Y",
|
323
|
+
"Default": null,
|
324
|
+
"Type": "int",
|
325
|
+
"Description": "the ID of the blog"
|
326
|
+
},
|
327
|
+
{
|
328
|
+
"Name": "body",
|
329
|
+
"Required": "Y",
|
330
|
+
"Default": "1",
|
331
|
+
"Type": "json",
|
332
|
+
"Description": "a JSON representation of the new post"
|
333
|
+
}
|
334
|
+
]
|
335
|
+
},
|
336
|
+
{
|
337
|
+
"MethodName": "Update",
|
338
|
+
"Synopsis": "Updates the attributes of a blog post",
|
339
|
+
"HTTPMethod": "PUT",
|
340
|
+
"URI": "/sites/:site_slug/pages/blogs/:blog_id/posts/:blog_post_id",
|
341
|
+
"parameters": [
|
342
|
+
{
|
343
|
+
"Name": "site_slug",
|
344
|
+
"Required": "Y",
|
345
|
+
"Default": null,
|
346
|
+
"Type": "string",
|
347
|
+
"Description": "the site holding the blog"
|
348
|
+
},
|
349
|
+
{
|
350
|
+
"Name": "blog_id",
|
351
|
+
"Required": "Y",
|
352
|
+
"Default": null,
|
353
|
+
"Type": "int",
|
354
|
+
"Description": "the ID of the blog"
|
355
|
+
},
|
356
|
+
{
|
357
|
+
"Name": "blog_post_id",
|
358
|
+
"Required": "Y",
|
359
|
+
"Default": null,
|
360
|
+
"Type": "int",
|
361
|
+
"Description": "the ID of the blog"
|
362
|
+
},
|
363
|
+
{
|
364
|
+
"Name": "body",
|
365
|
+
"Required": "Y",
|
366
|
+
"Default": "1",
|
367
|
+
"Type": "json",
|
368
|
+
"Description": "JSON containing updates"
|
369
|
+
}
|
370
|
+
]
|
371
|
+
},
|
372
|
+
{
|
373
|
+
"MethodName": "Destroy",
|
374
|
+
"Synopsis": "Removes a blog post",
|
375
|
+
"HTTPMethod": "DELETE",
|
376
|
+
"URI": "/sites/:site_slug/pages/blogs/:blog_id/posts/:blog_post_id",
|
377
|
+
"parameters": [
|
378
|
+
{
|
379
|
+
"Name": "site_slug",
|
380
|
+
"Required": "Y",
|
381
|
+
"Default": null,
|
382
|
+
"Type": "string",
|
383
|
+
"Description": "the site holding the blog"
|
384
|
+
},
|
385
|
+
{
|
386
|
+
"Name": "blog_id",
|
387
|
+
"Required": "Y",
|
388
|
+
"Default": null,
|
389
|
+
"Type": "int",
|
390
|
+
"Description": "the ID of the blog"
|
391
|
+
},
|
392
|
+
{
|
393
|
+
"Name": "blog_post_id",
|
394
|
+
"Required": "Y",
|
395
|
+
"Default": null,
|
396
|
+
"Type": "int",
|
397
|
+
"Description": "the ID of the blog"
|
398
|
+
}
|
399
|
+
]
|
400
|
+
}
|
401
|
+
]
|
402
|
+
},
|
403
|
+
{
|
404
|
+
"name": "Calendars",
|
405
|
+
"methods": [
|
406
|
+
{
|
407
|
+
"MethodName": "Index",
|
408
|
+
"Synopsis": "Shows a list of calendars",
|
409
|
+
"HTTPMethod": "GET",
|
410
|
+
"URI": "/sites/:site_slug/pages/calendars",
|
411
|
+
"parameters": [
|
412
|
+
{
|
413
|
+
"Name": "site_slug",
|
414
|
+
"Required": "Y",
|
415
|
+
"Default": null,
|
416
|
+
"Type": "string",
|
417
|
+
"Description": "the site holding the calendars"
|
418
|
+
},
|
419
|
+
{
|
420
|
+
"Name": "page",
|
421
|
+
"Required": "N",
|
422
|
+
"Default": "1",
|
423
|
+
"Type": "int",
|
424
|
+
"Description": "result page number"
|
425
|
+
},
|
426
|
+
{
|
427
|
+
"Name": "per_page",
|
428
|
+
"Required": "N",
|
429
|
+
"Default": "10",
|
430
|
+
"Type": "int",
|
431
|
+
"Description": "number of results to return"
|
432
|
+
}
|
433
|
+
]
|
434
|
+
},
|
435
|
+
{
|
436
|
+
"MethodName": "Show",
|
437
|
+
"Synopsis": "Show the details of a calendar",
|
438
|
+
"HTTPMethod": "GET",
|
439
|
+
"URI": "/sites/:site_slug/pages/calendars/:id",
|
440
|
+
"parameters": [
|
441
|
+
{
|
442
|
+
"Name": "site_slug",
|
443
|
+
"Required": "Y",
|
444
|
+
"Default": null,
|
445
|
+
"Type": "string",
|
446
|
+
"Description": "the site holding the calendar"
|
447
|
+
},
|
448
|
+
{
|
449
|
+
"Name": "id",
|
450
|
+
"Required": "Y",
|
451
|
+
"Default": null,
|
452
|
+
"Type": "int",
|
453
|
+
"Description": "the ID of the calendar"
|
454
|
+
}
|
455
|
+
]
|
456
|
+
},
|
457
|
+
{
|
458
|
+
"MethodName": "Create",
|
459
|
+
"Synopsis": "Creates a new calendar",
|
460
|
+
"HTTPMethod": "POST",
|
461
|
+
"URI": "/sites/:site_slug/pages/calendars",
|
462
|
+
"parameters": [
|
463
|
+
{
|
464
|
+
"Name": "site_slug",
|
465
|
+
"Required": "Y",
|
466
|
+
"Default": null,
|
467
|
+
"Type": "string",
|
468
|
+
"Description": "the site holding the calendar"
|
469
|
+
},
|
470
|
+
{
|
471
|
+
"Name": "body",
|
472
|
+
"Required": "Y",
|
473
|
+
"Default": "1",
|
474
|
+
"Type": "json",
|
475
|
+
"Description": "a JSON representation of the new calendar"
|
476
|
+
}
|
477
|
+
]
|
478
|
+
},
|
479
|
+
{
|
480
|
+
"MethodName": "Update",
|
481
|
+
"Synopsis": "Updates the attributes of a calendar",
|
482
|
+
"HTTPMethod": "PUT",
|
483
|
+
"URI": "/sites/:site_slug/pages/calendars/:id",
|
484
|
+
"parameters": [
|
485
|
+
{
|
486
|
+
"Name": "site_slug",
|
487
|
+
"Required": "Y",
|
488
|
+
"Default": null,
|
489
|
+
"Type": "string",
|
490
|
+
"Description": "the site holding the calendar"
|
491
|
+
},
|
492
|
+
{
|
493
|
+
"Name": "id",
|
494
|
+
"Required": "Y",
|
495
|
+
"Default": null,
|
496
|
+
"Type": "int",
|
497
|
+
"Description": "the ID of the calendar"
|
498
|
+
},
|
499
|
+
{
|
500
|
+
"Name": "body",
|
501
|
+
"Required": "Y",
|
502
|
+
"Default": "1",
|
503
|
+
"Type": "json",
|
504
|
+
"Description": "JSON containing updates"
|
505
|
+
}
|
506
|
+
]
|
507
|
+
},
|
508
|
+
{
|
509
|
+
"MethodName": "Destroy",
|
510
|
+
"Synopsis": "Removes a calendar",
|
511
|
+
"HTTPMethod": "DELETE",
|
512
|
+
"URI": "/sites/:site_slug/pages/calendars/:id",
|
513
|
+
"parameters": [
|
514
|
+
{
|
515
|
+
"Name": "site_slug",
|
516
|
+
"Required": "Y",
|
517
|
+
"Default": null,
|
518
|
+
"Type": "string",
|
519
|
+
"Description": "the site holding the calendar"
|
520
|
+
},
|
521
|
+
{
|
522
|
+
"Name": "id",
|
523
|
+
"Required": "Y",
|
524
|
+
"Default": null,
|
525
|
+
"Type": "int",
|
526
|
+
"Description": "the ID of the calendar"
|
527
|
+
}
|
528
|
+
]
|
529
|
+
}
|
530
|
+
]
|
531
|
+
},
|
532
|
+
{
|
533
|
+
"name": "Campaign Data",
|
534
|
+
"methods": [
|
535
|
+
{
|
536
|
+
"MethodName": "Show",
|
537
|
+
"Synopsis": "Shows campaign metadata about the nation",
|
538
|
+
"HTTPMethod": "GET",
|
539
|
+
"URI": "/campaign_data",
|
540
|
+
"parameters": [
|
541
|
+
|
542
|
+
]
|
543
|
+
}
|
544
|
+
]
|
545
|
+
},
|
546
|
+
{
|
547
|
+
"name": "Contacts",
|
548
|
+
"methods": [
|
549
|
+
{
|
550
|
+
"MethodName": "Index",
|
551
|
+
"Synopsis": "View a paginated list of a person's contacts",
|
552
|
+
"HTTPMethod": "GET",
|
553
|
+
"URI": "/people/:person_id/contacts",
|
554
|
+
"parameters": [
|
555
|
+
{
|
556
|
+
"Name": "person_id",
|
557
|
+
"Required": "Y",
|
558
|
+
"Default": null,
|
559
|
+
"Type": "int",
|
560
|
+
"Description": "the person's ID"
|
561
|
+
},
|
562
|
+
{
|
563
|
+
"Name": "page",
|
564
|
+
"Required": "N",
|
565
|
+
"Default": "1",
|
566
|
+
"Type": "int",
|
567
|
+
"Description": "result page number"
|
568
|
+
},
|
569
|
+
{
|
570
|
+
"Name": "per_page",
|
571
|
+
"Required": "N",
|
572
|
+
"Default": "10",
|
573
|
+
"Type": "int",
|
574
|
+
"Description": "number of results to return"
|
575
|
+
}
|
576
|
+
]
|
577
|
+
},
|
578
|
+
{
|
579
|
+
"MethodName": "Create",
|
580
|
+
"Synopsis": "Record a contact for a person",
|
581
|
+
"HTTPMethod": "POST",
|
582
|
+
"URI": "/people/:person_id/contacts",
|
583
|
+
"parameters": [
|
584
|
+
{
|
585
|
+
"Name": "person_id",
|
586
|
+
"Required": "Y",
|
587
|
+
"Default": null,
|
588
|
+
"Type": "int",
|
589
|
+
"Description": "the person's ID"
|
590
|
+
},
|
591
|
+
{
|
592
|
+
"Name": "body",
|
593
|
+
"Required": "Y",
|
594
|
+
"Default": null,
|
595
|
+
"Type": "json",
|
596
|
+
"Description": "a JSON representation of the new contact"
|
597
|
+
}
|
598
|
+
]
|
599
|
+
}
|
600
|
+
]
|
601
|
+
},
|
602
|
+
{
|
603
|
+
"name": "Contact Types",
|
604
|
+
"methods": [
|
605
|
+
{
|
606
|
+
"MethodName": "Index",
|
607
|
+
"Synopsis": "Returns paginated list of nation-defined contact types",
|
608
|
+
"HTTPMethod": "GET",
|
609
|
+
"URI": "/settings/contact_types",
|
610
|
+
"parameters": [
|
611
|
+
{
|
612
|
+
"Name": "page",
|
613
|
+
"Required": "N",
|
614
|
+
"Default": "1",
|
615
|
+
"Type": "int",
|
616
|
+
"Description": "result page number"
|
617
|
+
},
|
618
|
+
{
|
619
|
+
"Name": "per_page",
|
620
|
+
"Required": "N",
|
621
|
+
"Default": "10",
|
622
|
+
"Type": "int",
|
623
|
+
"Description": "number of results to return"
|
624
|
+
}
|
625
|
+
]
|
626
|
+
},
|
627
|
+
{
|
628
|
+
"MethodName": "Create",
|
629
|
+
"Synopsis": "Creates a new contact type",
|
630
|
+
"HTTPMethod": "POST",
|
631
|
+
"URI": "/settings/contact_types",
|
632
|
+
"parameters": [
|
633
|
+
{
|
634
|
+
"Name": "body",
|
635
|
+
"Required": "Y",
|
636
|
+
"Default": null,
|
637
|
+
"Type": "json",
|
638
|
+
"Description": "a JSON representation of the new contact type"
|
639
|
+
}
|
640
|
+
]
|
641
|
+
},
|
642
|
+
{
|
643
|
+
"MethodName": "Update",
|
644
|
+
"Synopsis": "Updates an existing contact type",
|
645
|
+
"HTTPMethod": "PUT",
|
646
|
+
"URI": "/settings/contact_types/:id",
|
647
|
+
"parameters": [
|
648
|
+
{
|
649
|
+
"Name": "id",
|
650
|
+
"Required": "Y",
|
651
|
+
"Default": null,
|
652
|
+
"Type": "int",
|
653
|
+
"Description": "the ID of the existing contact type"
|
654
|
+
},
|
655
|
+
{
|
656
|
+
"Name": "body",
|
657
|
+
"Required": "Y",
|
658
|
+
"Default": null,
|
659
|
+
"Type": "json",
|
660
|
+
"Description": "a JSON representation of the updates to make"
|
661
|
+
}
|
662
|
+
]
|
663
|
+
},
|
664
|
+
{
|
665
|
+
"MethodName": "Destroy",
|
666
|
+
"Synopsis": "Destroys a contact type",
|
667
|
+
"HTTPMethod": "DELETE",
|
668
|
+
"URI": "/settings/contact_types/:id",
|
669
|
+
"parameters": [
|
670
|
+
{
|
671
|
+
"Name": "id",
|
672
|
+
"Required": "Y",
|
673
|
+
"Default": null,
|
674
|
+
"Type": "int",
|
675
|
+
"Description": "the ID of the existing contact type"
|
676
|
+
}
|
677
|
+
]
|
678
|
+
},
|
679
|
+
{
|
680
|
+
"MethodName": "List Methods",
|
681
|
+
"Synopsis": "Lists all contact methods",
|
682
|
+
"HTTPMethod": "GET",
|
683
|
+
"URI": "/settings/contact_methods",
|
684
|
+
"parameters": [
|
685
|
+
|
686
|
+
]
|
687
|
+
},
|
688
|
+
{
|
689
|
+
"MethodName": "List Statuses",
|
690
|
+
"Synopsis": "Lists all contact status types",
|
691
|
+
"HTTPMethod": "GET",
|
692
|
+
"URI": "/settings/contact_statuses",
|
693
|
+
"parameters": [
|
694
|
+
|
695
|
+
]
|
696
|
+
}
|
697
|
+
]
|
698
|
+
},
|
699
|
+
{
|
700
|
+
"name": "Donations",
|
701
|
+
"methods": [
|
702
|
+
{
|
703
|
+
"MethodName": "Index",
|
704
|
+
"Synopsis": "Returns a list of donations",
|
705
|
+
"HTTPMethod": "GET",
|
706
|
+
"URI": "/donations",
|
707
|
+
"parameters": [
|
708
|
+
{
|
709
|
+
"Name": "page",
|
710
|
+
"Required": "N",
|
711
|
+
"Default": "1",
|
712
|
+
"Type": "int",
|
713
|
+
"Description": "result page number"
|
714
|
+
},
|
715
|
+
{
|
716
|
+
"Name": "per_page",
|
717
|
+
"Required": "N",
|
718
|
+
"Default": "10",
|
719
|
+
"Type": "int",
|
720
|
+
"Description": "number of results to return"
|
721
|
+
}
|
722
|
+
]
|
723
|
+
},
|
724
|
+
{
|
725
|
+
"MethodName": "Create",
|
726
|
+
"Synopsis": "Creates a donation with the provided data",
|
727
|
+
"HTTPMethod": "POST",
|
728
|
+
"URI": "/donations",
|
729
|
+
"parameters": [
|
730
|
+
{
|
731
|
+
"Name": "body",
|
732
|
+
"Required": "Y",
|
733
|
+
"Default": "{}",
|
734
|
+
"Type": "json",
|
735
|
+
"Description": "JSON representation of a donation"
|
736
|
+
}
|
737
|
+
]
|
738
|
+
},
|
739
|
+
{
|
740
|
+
"MethodName": "Update",
|
741
|
+
"Synopsis": "Updates a donation with the provided data",
|
742
|
+
"HTTPMethod": "PUT",
|
743
|
+
"URI": "/donations/:id",
|
744
|
+
"parameters": [
|
745
|
+
{
|
746
|
+
"Name": "id",
|
747
|
+
"Required": "Y",
|
748
|
+
"Default": null,
|
749
|
+
"Type": "int",
|
750
|
+
"Description": "The donation's ID"
|
751
|
+
},
|
752
|
+
{
|
753
|
+
"Name": "body",
|
754
|
+
"Required": "Y",
|
755
|
+
"Default": "{}",
|
756
|
+
"Type": "json",
|
757
|
+
"Description": "JSON attributes for updating the donation"
|
758
|
+
}
|
759
|
+
]
|
760
|
+
},
|
761
|
+
{
|
762
|
+
"MethodName": "Destroy",
|
763
|
+
"Synopsis": "Removes the donation with the matching ID",
|
764
|
+
"HTTPMethod": "DELETE",
|
765
|
+
"URI": "/donations/:id",
|
766
|
+
"parameters": [
|
767
|
+
{
|
768
|
+
"Name": "id",
|
769
|
+
"Required": "Y",
|
770
|
+
"Default": null,
|
771
|
+
"Type": "int",
|
772
|
+
"Description": "The donation's ID"
|
773
|
+
}
|
774
|
+
]
|
775
|
+
}
|
776
|
+
]
|
777
|
+
},
|
778
|
+
{
|
779
|
+
"name": "Events",
|
780
|
+
"methods": [
|
781
|
+
{
|
782
|
+
"MethodName": "Index",
|
783
|
+
"Synopsis": "Returns a list of events",
|
784
|
+
"HTTPMethod": "GET",
|
785
|
+
"URI": "/sites/:site_slug/pages/events",
|
786
|
+
"parameters": [
|
787
|
+
{
|
788
|
+
"Name": "site_slug",
|
789
|
+
"Required": "Y",
|
790
|
+
"Default": null,
|
791
|
+
"Type": "string",
|
792
|
+
"Description": "the site holding the event"
|
793
|
+
},
|
794
|
+
{
|
795
|
+
"Name": "page",
|
796
|
+
"Required": "N",
|
797
|
+
"Default": "1",
|
798
|
+
"Type": "int",
|
799
|
+
"Description": "result page number"
|
800
|
+
},
|
801
|
+
{
|
802
|
+
"Name": "per_page",
|
803
|
+
"Required": "N",
|
804
|
+
"Default": "10",
|
805
|
+
"Type": "int",
|
806
|
+
"Description": "number of results to return"
|
807
|
+
},
|
808
|
+
{
|
809
|
+
"Name": "tags",
|
810
|
+
"Required": "N",
|
811
|
+
"Default": null,
|
812
|
+
"Type": "string",
|
813
|
+
"Description": "tags that must be present on the event"
|
814
|
+
},
|
815
|
+
{
|
816
|
+
"Name": "starting",
|
817
|
+
"Required": "N",
|
818
|
+
"Default": null,
|
819
|
+
"Type": "string",
|
820
|
+
"Description": "earliest starting time"
|
821
|
+
},
|
822
|
+
{
|
823
|
+
"Name": "until",
|
824
|
+
"Required": "N",
|
825
|
+
"Default": null,
|
826
|
+
"Type": "string",
|
827
|
+
"Description": "latest ending time"
|
828
|
+
},
|
829
|
+
{
|
830
|
+
"Name": "calendar_id",
|
831
|
+
"Required": "N",
|
832
|
+
"Default": null,
|
833
|
+
"Type": "int",
|
834
|
+
"Description": "the ID of the calendar from which events should be scoped"
|
835
|
+
}
|
836
|
+
]
|
837
|
+
},
|
838
|
+
{
|
839
|
+
"MethodName": "Show",
|
840
|
+
"Synopsis": "Returns an event",
|
841
|
+
"HTTPMethod": "GET",
|
842
|
+
"URI": "/sites/:site_slug/pages/events/:id",
|
843
|
+
"parameters": [
|
844
|
+
{
|
845
|
+
"Name": "site_slug",
|
846
|
+
"Required": "Y",
|
847
|
+
"Default": null,
|
848
|
+
"Type": "string",
|
849
|
+
"Description": "the site holding the event"
|
850
|
+
},
|
851
|
+
{
|
852
|
+
"Name": "id",
|
853
|
+
"Required": "Y",
|
854
|
+
"Default": null,
|
855
|
+
"Type": "int",
|
856
|
+
"Description": "the ID of the event"
|
857
|
+
}
|
858
|
+
]
|
859
|
+
},
|
860
|
+
{
|
861
|
+
"MethodName": "Create",
|
862
|
+
"Synopsis": "Creates a event with the provided data",
|
863
|
+
"HTTPMethod": "POST",
|
864
|
+
"URI": "/sites/:site_slug/pages/events",
|
865
|
+
"parameters": [
|
866
|
+
{
|
867
|
+
"Name": "site_slug",
|
868
|
+
"Required": "Y",
|
869
|
+
"Default": null,
|
870
|
+
"Type": "string",
|
871
|
+
"Description": "the site holding the event"
|
872
|
+
},
|
873
|
+
{
|
874
|
+
"Name": "body",
|
875
|
+
"Required": "Y",
|
876
|
+
"Default": "{}",
|
877
|
+
"Type": "json",
|
878
|
+
"Description": "JSON representation of a event"
|
879
|
+
}
|
880
|
+
]
|
881
|
+
},
|
882
|
+
{
|
883
|
+
"MethodName": "Update",
|
884
|
+
"Synopsis": "Updates a event with the provided data",
|
885
|
+
"HTTPMethod": "PUT",
|
886
|
+
"URI": "/sites/:site_slug/pages/events/:id",
|
887
|
+
"parameters": [
|
888
|
+
{
|
889
|
+
"Name": "site_slug",
|
890
|
+
"Required": "Y",
|
891
|
+
"Default": null,
|
892
|
+
"Type": "string",
|
893
|
+
"Description": "the site holding the event"
|
894
|
+
},
|
895
|
+
{
|
896
|
+
"Name": "id",
|
897
|
+
"Required": "Y",
|
898
|
+
"Default": null,
|
899
|
+
"Type": "int",
|
900
|
+
"Description": "The event's ID"
|
901
|
+
},
|
902
|
+
{
|
903
|
+
"Name": "body",
|
904
|
+
"Required": "Y",
|
905
|
+
"Default": "{}",
|
906
|
+
"Type": "json",
|
907
|
+
"Description": "JSON attributes for updating the event"
|
908
|
+
}
|
909
|
+
]
|
910
|
+
},
|
911
|
+
{
|
912
|
+
"MethodName": "Destroy",
|
913
|
+
"Synopsis": "Removes the event with the matching ID",
|
914
|
+
"HTTPMethod": "DELETE",
|
915
|
+
"URI": "/sites/:site_slug/pages/events/:id",
|
916
|
+
"parameters": [
|
917
|
+
{
|
918
|
+
"Name": "site_slug",
|
919
|
+
"Required": "Y",
|
920
|
+
"Default": null,
|
921
|
+
"Type": "string",
|
922
|
+
"Description": "the site holding the event"
|
923
|
+
},
|
924
|
+
{
|
925
|
+
"Name": "id",
|
926
|
+
"Required": "Y",
|
927
|
+
"Default": null,
|
928
|
+
"Type": "int",
|
929
|
+
"Description": "The event's ID"
|
930
|
+
}
|
931
|
+
]
|
932
|
+
},
|
933
|
+
{
|
934
|
+
"MethodName": "RSVPs",
|
935
|
+
"Synopsis": "Lists all RSVPs for an event",
|
936
|
+
"HTTPMethod": "GET",
|
937
|
+
"URI": "/sites/:site_slug/pages/events/:id/rsvps",
|
938
|
+
"parameters": [
|
939
|
+
{
|
940
|
+
"Name": "site_slug",
|
941
|
+
"Required": "Y",
|
942
|
+
"Default": null,
|
943
|
+
"Type": "string",
|
944
|
+
"Description": "the site holding the event"
|
945
|
+
},
|
946
|
+
{
|
947
|
+
"Name": "id",
|
948
|
+
"Required": "Y",
|
949
|
+
"Default": null,
|
950
|
+
"Type": "int",
|
951
|
+
"Description": "The event's ID"
|
952
|
+
},
|
953
|
+
{
|
954
|
+
"Name": "page",
|
955
|
+
"Required": "N",
|
956
|
+
"Default": "1",
|
957
|
+
"Type": "int",
|
958
|
+
"Description": "result page number"
|
959
|
+
},
|
960
|
+
{
|
961
|
+
"Name": "per_page",
|
962
|
+
"Required": "N",
|
963
|
+
"Default": "10",
|
964
|
+
"Type": "int",
|
965
|
+
"Description": "number of results to return"
|
966
|
+
}
|
967
|
+
]
|
968
|
+
},
|
969
|
+
{
|
970
|
+
"MethodName": "RSVP Create",
|
971
|
+
"Synopsis": "Creates an RSVP for an event",
|
972
|
+
"HTTPMethod": "POST",
|
973
|
+
"URI": "/sites/:site_slug/pages/events/:id/rsvps",
|
974
|
+
"parameters": [
|
975
|
+
{
|
976
|
+
"Name": "site_slug",
|
977
|
+
"Required": "Y",
|
978
|
+
"Default": null,
|
979
|
+
"Type": "string",
|
980
|
+
"Description": "the site holding the event"
|
981
|
+
},
|
982
|
+
{
|
983
|
+
"Name": "id",
|
984
|
+
"Required": "Y",
|
985
|
+
"Default": null,
|
986
|
+
"Type": "int",
|
987
|
+
"Description": "The event's ID"
|
988
|
+
},
|
989
|
+
{
|
990
|
+
"Name": "body",
|
991
|
+
"Required": "Y",
|
992
|
+
"Default": null,
|
993
|
+
"Type": "json",
|
994
|
+
"Description": "A JSON representation of the new post"
|
995
|
+
}
|
996
|
+
]
|
997
|
+
},
|
998
|
+
{
|
999
|
+
"MethodName": "RSVP Update",
|
1000
|
+
"Synopsis": "Updates an existing RSVP",
|
1001
|
+
"HTTPMethod": "PUT",
|
1002
|
+
"URI": "/sites/:site_slug/pages/events/:event_id/rsvps/:rsvp_id",
|
1003
|
+
"parameters": [
|
1004
|
+
{
|
1005
|
+
"Name": "site_slug",
|
1006
|
+
"Required": "Y",
|
1007
|
+
"Default": null,
|
1008
|
+
"Type": "string",
|
1009
|
+
"Description": "the site holding the event"
|
1010
|
+
},
|
1011
|
+
{
|
1012
|
+
"Name": "event_id",
|
1013
|
+
"Required": "Y",
|
1014
|
+
"Default": null,
|
1015
|
+
"Type": "int",
|
1016
|
+
"Description": "The event's ID"
|
1017
|
+
},
|
1018
|
+
{
|
1019
|
+
"Name": "rsvp_id",
|
1020
|
+
"Required": "Y",
|
1021
|
+
"Default": null,
|
1022
|
+
"Type": "int",
|
1023
|
+
"Description": "The RSVP's ID"
|
1024
|
+
},
|
1025
|
+
{
|
1026
|
+
"Name": "body",
|
1027
|
+
"Required": "Y",
|
1028
|
+
"Default": null,
|
1029
|
+
"Type": "json",
|
1030
|
+
"Description": "JSON attributes for updating the RSVP"
|
1031
|
+
}
|
1032
|
+
]
|
1033
|
+
}
|
1034
|
+
]
|
1035
|
+
},
|
1036
|
+
{
|
1037
|
+
"name": "Imports",
|
1038
|
+
"methods": [
|
1039
|
+
{
|
1040
|
+
"MethodName": "Show",
|
1041
|
+
"Synopsis": "Shows the status of an import",
|
1042
|
+
"HTTPMethod": "GET",
|
1043
|
+
"URI": "/imports/:id",
|
1044
|
+
"parameters": [
|
1045
|
+
{
|
1046
|
+
"Name": "id",
|
1047
|
+
"Required": "Y",
|
1048
|
+
"Default": null,
|
1049
|
+
"Type": "int",
|
1050
|
+
"Description": "the ID of the import"
|
1051
|
+
}
|
1052
|
+
]
|
1053
|
+
},
|
1054
|
+
{
|
1055
|
+
"MethodName": "Create",
|
1056
|
+
"Synopsis": "Creates a import with the provided data",
|
1057
|
+
"HTTPMethod": "POST",
|
1058
|
+
"URI": "/imports",
|
1059
|
+
"parameters": [
|
1060
|
+
{
|
1061
|
+
"Name": "type",
|
1062
|
+
"Required": "Y",
|
1063
|
+
"Default": null,
|
1064
|
+
"Type": "string",
|
1065
|
+
"Description": "either \"voter_file\" or \"voting_history\""
|
1066
|
+
},
|
1067
|
+
{
|
1068
|
+
"Name": "file",
|
1069
|
+
"Required": "Y",
|
1070
|
+
"Default": null,
|
1071
|
+
"Type": "string",
|
1072
|
+
"Description": "Base 64 (RFC 4648) encoded version of a CSV"
|
1073
|
+
}
|
1074
|
+
]
|
1075
|
+
}
|
1076
|
+
]
|
1077
|
+
},
|
1078
|
+
{
|
1079
|
+
"name": "Lists",
|
1080
|
+
"methods": [
|
1081
|
+
{
|
1082
|
+
"MethodName": "Index",
|
1083
|
+
"Synopsis": "Returns a list of created custom lists",
|
1084
|
+
"HTTPMethod": "GET",
|
1085
|
+
"URI": "/lists",
|
1086
|
+
"parameters": [
|
1087
|
+
{
|
1088
|
+
"Name": "page",
|
1089
|
+
"Required": "N",
|
1090
|
+
"Default": "1",
|
1091
|
+
"Type": "int",
|
1092
|
+
"Description": "result page number"
|
1093
|
+
},
|
1094
|
+
{
|
1095
|
+
"Name": "per_page",
|
1096
|
+
"Required": "N",
|
1097
|
+
"Default": "10",
|
1098
|
+
"Type": "int",
|
1099
|
+
"Description": "number of results to return"
|
1100
|
+
}
|
1101
|
+
]
|
1102
|
+
},
|
1103
|
+
{
|
1104
|
+
"MethodName": "People",
|
1105
|
+
"Synopsis": "Returns people stored in a list",
|
1106
|
+
"HTTPMethod": "GET",
|
1107
|
+
"URI": "/lists/:id/people",
|
1108
|
+
"parameters": [
|
1109
|
+
{
|
1110
|
+
"Name": "id",
|
1111
|
+
"Required": "Y",
|
1112
|
+
"Default": null,
|
1113
|
+
"Type": "int",
|
1114
|
+
"Description": "The list's ID"
|
1115
|
+
},
|
1116
|
+
{
|
1117
|
+
"Name": "page",
|
1118
|
+
"Required": "N",
|
1119
|
+
"Default": "1",
|
1120
|
+
"Type": "int",
|
1121
|
+
"Description": "result page number"
|
1122
|
+
},
|
1123
|
+
{
|
1124
|
+
"Name": "per_page",
|
1125
|
+
"Required": "N",
|
1126
|
+
"Default": "10",
|
1127
|
+
"Type": "int",
|
1128
|
+
"Description": "number of results to return"
|
1129
|
+
}
|
1130
|
+
]
|
1131
|
+
},
|
1132
|
+
{
|
1133
|
+
"MethodName": "Create",
|
1134
|
+
"Synopsis": "Creates a list with the provided data",
|
1135
|
+
"HTTPMethod": "POST",
|
1136
|
+
"URI": "/lists",
|
1137
|
+
"parameters": [
|
1138
|
+
{
|
1139
|
+
"Name": "body",
|
1140
|
+
"Required": "Y",
|
1141
|
+
"Default": "{}",
|
1142
|
+
"Type": "json",
|
1143
|
+
"Description": "JSON representation of the list to create"
|
1144
|
+
}
|
1145
|
+
]
|
1146
|
+
},
|
1147
|
+
{
|
1148
|
+
"MethodName": "Update",
|
1149
|
+
"Synopsis": "Updates a list with the provided data",
|
1150
|
+
"HTTPMethod": "PUT",
|
1151
|
+
"URI": "/lists/:id",
|
1152
|
+
"parameters": [
|
1153
|
+
{
|
1154
|
+
"Name": "id",
|
1155
|
+
"Required": "Y",
|
1156
|
+
"Default": null,
|
1157
|
+
"Type": "int",
|
1158
|
+
"Description": "The list's ID"
|
1159
|
+
},
|
1160
|
+
{
|
1161
|
+
"Name": "body",
|
1162
|
+
"Required": "Y",
|
1163
|
+
"Default": "{}",
|
1164
|
+
"Type": "json",
|
1165
|
+
"Description": "JSON attributes for updating the list"
|
1166
|
+
}
|
1167
|
+
]
|
1168
|
+
},
|
1169
|
+
{
|
1170
|
+
"MethodName": "Destroy",
|
1171
|
+
"Synopsis": "Removes the list with the matching ID",
|
1172
|
+
"HTTPMethod": "DELETE",
|
1173
|
+
"URI": "/lists/:id",
|
1174
|
+
"parameters": [
|
1175
|
+
{
|
1176
|
+
"Name": "id",
|
1177
|
+
"Required": "Y",
|
1178
|
+
"Default": null,
|
1179
|
+
"Type": "int",
|
1180
|
+
"Description": "The list's ID"
|
1181
|
+
}
|
1182
|
+
]
|
1183
|
+
},
|
1184
|
+
{
|
1185
|
+
"MethodName": "Listing Create",
|
1186
|
+
"Synopsis": "Adds a person to a list",
|
1187
|
+
"HTTPMethod": "POST",
|
1188
|
+
"URI": "/lists/:list_id/listings",
|
1189
|
+
"parameters": [
|
1190
|
+
{
|
1191
|
+
"Name": "list_id",
|
1192
|
+
"Required": "Y",
|
1193
|
+
"Default": null,
|
1194
|
+
"Type": "int",
|
1195
|
+
"Description": "The ID of the list"
|
1196
|
+
},
|
1197
|
+
{
|
1198
|
+
"Name": "person_id",
|
1199
|
+
"Required": "Y",
|
1200
|
+
"Default": null,
|
1201
|
+
"Type": "int",
|
1202
|
+
"Description": "The ID of the person to add to the list"
|
1203
|
+
}
|
1204
|
+
]
|
1205
|
+
},
|
1206
|
+
{
|
1207
|
+
"MethodName": "Listing Deletion",
|
1208
|
+
"Synopsis": "Drops a person from a list",
|
1209
|
+
"HTTPMethod": "DELETE",
|
1210
|
+
"URI": "/lists/:list_id/listings/:person_id",
|
1211
|
+
"parameters": [
|
1212
|
+
{
|
1213
|
+
"Name": "list_id",
|
1214
|
+
"Required": "Y",
|
1215
|
+
"Default": null,
|
1216
|
+
"Type": "int",
|
1217
|
+
"Description": "The ID of the list"
|
1218
|
+
},
|
1219
|
+
{
|
1220
|
+
"Name": "person_id",
|
1221
|
+
"Required": "Y",
|
1222
|
+
"Default": null,
|
1223
|
+
"Type": "int",
|
1224
|
+
"Description": "The ID of the person to drop from the list"
|
1225
|
+
}
|
1226
|
+
]
|
1227
|
+
},
|
1228
|
+
{
|
1229
|
+
"MethodName": "Add tag",
|
1230
|
+
"Synopsis": "Adds a tag to all of the list members",
|
1231
|
+
"HTTPMethod": "POST",
|
1232
|
+
"URI": "/lists/:list_id/tag/:tag",
|
1233
|
+
"parameters": [
|
1234
|
+
{
|
1235
|
+
"Name": "list_id",
|
1236
|
+
"Required": "Y",
|
1237
|
+
"Default": null,
|
1238
|
+
"Type": "int",
|
1239
|
+
"Description": "The ID of the list"
|
1240
|
+
},
|
1241
|
+
{
|
1242
|
+
"Name": "tag",
|
1243
|
+
"Required": "Y",
|
1244
|
+
"Default": null,
|
1245
|
+
"Type": "string",
|
1246
|
+
"Description": "The name of the tag to use"
|
1247
|
+
}
|
1248
|
+
]
|
1249
|
+
},
|
1250
|
+
{
|
1251
|
+
"MethodName": "Delete tag",
|
1252
|
+
"Synopsis": "Deletes the tag from all of the list members",
|
1253
|
+
"HTTPMethod": "DELETE",
|
1254
|
+
"URI": "/lists/:list_id/tag/:tag",
|
1255
|
+
"parameters": [
|
1256
|
+
{
|
1257
|
+
"Name": "list_id",
|
1258
|
+
"Required": "Y",
|
1259
|
+
"Default": null,
|
1260
|
+
"Type": "int",
|
1261
|
+
"Description": "The ID of the list"
|
1262
|
+
},
|
1263
|
+
{
|
1264
|
+
"Name": "tag",
|
1265
|
+
"Required": "Y",
|
1266
|
+
"Default": null,
|
1267
|
+
"Type": "string",
|
1268
|
+
"Description": "The name of the tag to use"
|
1269
|
+
}
|
1270
|
+
]
|
1271
|
+
}
|
1272
|
+
]
|
1273
|
+
},
|
1274
|
+
{
|
1275
|
+
"name": "Page Attachments",
|
1276
|
+
"methods": [
|
1277
|
+
{
|
1278
|
+
"MethodName": "Index",
|
1279
|
+
"Synopsis": "Returns a list of a page's file attachments",
|
1280
|
+
"HTTPMethod": "GET",
|
1281
|
+
"URI": "/sites/:site_slug/pages/:page_slug/attachments",
|
1282
|
+
"parameters": [
|
1283
|
+
{
|
1284
|
+
"Name": "site_slug",
|
1285
|
+
"Required": "Y",
|
1286
|
+
"Default": null,
|
1287
|
+
"Type": "string",
|
1288
|
+
"Description": "The slug of the site the page lives on"
|
1289
|
+
},
|
1290
|
+
{
|
1291
|
+
"Name": "page_slug",
|
1292
|
+
"Required": "Y",
|
1293
|
+
"Default": "1",
|
1294
|
+
"Type": "string",
|
1295
|
+
"Description": "The page's slug"
|
1296
|
+
},
|
1297
|
+
{
|
1298
|
+
"Name": "page",
|
1299
|
+
"Required": "N",
|
1300
|
+
"Default": "1",
|
1301
|
+
"Type": "int",
|
1302
|
+
"Description": "result page number"
|
1303
|
+
},
|
1304
|
+
{
|
1305
|
+
"Name": "per_page",
|
1306
|
+
"Required": "N",
|
1307
|
+
"Default": "10",
|
1308
|
+
"Type": "int",
|
1309
|
+
"Description": "number of results to return"
|
1310
|
+
}
|
1311
|
+
]
|
1312
|
+
},
|
1313
|
+
{
|
1314
|
+
"MethodName": "Show",
|
1315
|
+
"Synopsis": "Creates a new file attachment for a page",
|
1316
|
+
"HTTPMethod": "GET",
|
1317
|
+
"URI": "/sites/:site_slug/pages/:page_slug/attachments/:id",
|
1318
|
+
"parameters": [
|
1319
|
+
{
|
1320
|
+
"Name": "site_slug",
|
1321
|
+
"Required": "Y",
|
1322
|
+
"Default": null,
|
1323
|
+
"Type": "string",
|
1324
|
+
"Description": "The slug of the site the page lives on"
|
1325
|
+
},
|
1326
|
+
{
|
1327
|
+
"Name": "page_slug",
|
1328
|
+
"Required": "Y",
|
1329
|
+
"Default": "1",
|
1330
|
+
"Type": "string",
|
1331
|
+
"Description": "The page's slug"
|
1332
|
+
},
|
1333
|
+
{
|
1334
|
+
"Name": "id",
|
1335
|
+
"Required": "Y",
|
1336
|
+
"Default": null,
|
1337
|
+
"Type": "int",
|
1338
|
+
"Description": "The ID of the page attachment"
|
1339
|
+
}
|
1340
|
+
]
|
1341
|
+
},
|
1342
|
+
{
|
1343
|
+
"MethodName": "Create",
|
1344
|
+
"Synopsis": "Creates a new file attachment for a page",
|
1345
|
+
"HTTPMethod": "POST",
|
1346
|
+
"URI": "/sites/:site_slug/pages/:page_slug/attachments",
|
1347
|
+
"parameters": [
|
1348
|
+
{
|
1349
|
+
"Name": "site_slug",
|
1350
|
+
"Required": "Y",
|
1351
|
+
"Default": null,
|
1352
|
+
"Type": "string",
|
1353
|
+
"Description": "The slug of the site the page lives on"
|
1354
|
+
},
|
1355
|
+
{
|
1356
|
+
"Name": "page_slug",
|
1357
|
+
"Required": "Y",
|
1358
|
+
"Default": "1",
|
1359
|
+
"Type": "string",
|
1360
|
+
"Description": "The page's slug"
|
1361
|
+
},
|
1362
|
+
{
|
1363
|
+
"Name": "body",
|
1364
|
+
"Required": "Y",
|
1365
|
+
"Default": "{}",
|
1366
|
+
"Type": "json",
|
1367
|
+
"Description": "A JSON representation of the attachment"
|
1368
|
+
}
|
1369
|
+
]
|
1370
|
+
},
|
1371
|
+
{
|
1372
|
+
"MethodName": "Destroy",
|
1373
|
+
"Synopsis": "Destroys a file attachment for a page",
|
1374
|
+
"HTTPMethod": "DELETE",
|
1375
|
+
"URI": "/sites/:site_slug/pages/:page_slug/attachments/:id",
|
1376
|
+
"parameters": [
|
1377
|
+
{
|
1378
|
+
"Name": "site_slug",
|
1379
|
+
"Required": "Y",
|
1380
|
+
"Default": null,
|
1381
|
+
"Type": "string",
|
1382
|
+
"Description": "The slug of the site the page lives on"
|
1383
|
+
},
|
1384
|
+
{
|
1385
|
+
"Name": "page_slug",
|
1386
|
+
"Required": "Y",
|
1387
|
+
"Default": "1",
|
1388
|
+
"Type": "string",
|
1389
|
+
"Description": "The page's slug"
|
1390
|
+
},
|
1391
|
+
{
|
1392
|
+
"Name": "id",
|
1393
|
+
"Required": "Y",
|
1394
|
+
"Default": null,
|
1395
|
+
"Type": "int",
|
1396
|
+
"Description": "The ID of the page attachment"
|
1397
|
+
}
|
1398
|
+
]
|
1399
|
+
}
|
1400
|
+
]
|
1401
|
+
},
|
1402
|
+
{
|
1403
|
+
"name": "People",
|
1404
|
+
"methods": [
|
1405
|
+
{
|
1406
|
+
"MethodName": "Index",
|
1407
|
+
"Synopsis": "Returns a list of people",
|
1408
|
+
"HTTPMethod": "GET",
|
1409
|
+
"URI": "/people",
|
1410
|
+
"parameters": [
|
1411
|
+
{
|
1412
|
+
"Name": "page",
|
1413
|
+
"Required": "N",
|
1414
|
+
"Default": "1",
|
1415
|
+
"Type": "int",
|
1416
|
+
"Description": "result page number"
|
1417
|
+
},
|
1418
|
+
{
|
1419
|
+
"Name": "per_page",
|
1420
|
+
"Required": "N",
|
1421
|
+
"Default": "10",
|
1422
|
+
"Type": "int",
|
1423
|
+
"Description": "number of results to return"
|
1424
|
+
}
|
1425
|
+
]
|
1426
|
+
},
|
1427
|
+
{
|
1428
|
+
"MethodName": "Show",
|
1429
|
+
"Synopsis": "Returns a full representation of the person",
|
1430
|
+
"HTTPMethod": "GET",
|
1431
|
+
"URI": "/people/:id",
|
1432
|
+
"parameters": [
|
1433
|
+
{
|
1434
|
+
"Name": "id",
|
1435
|
+
"Required": "Y",
|
1436
|
+
"Default": "1",
|
1437
|
+
"Type": "int",
|
1438
|
+
"Description": "the person's id"
|
1439
|
+
}
|
1440
|
+
]
|
1441
|
+
},
|
1442
|
+
{
|
1443
|
+
"MethodName": "Match",
|
1444
|
+
"Synopsis": "Finds people that match certain attributes exactly",
|
1445
|
+
"HTTPMethod": "GET",
|
1446
|
+
"URI": "/people/match",
|
1447
|
+
"parameters": [
|
1448
|
+
{
|
1449
|
+
"Name": "email",
|
1450
|
+
"Required": "N",
|
1451
|
+
"Default": null,
|
1452
|
+
"Type": "string",
|
1453
|
+
"Description": null
|
1454
|
+
},
|
1455
|
+
{
|
1456
|
+
"Name": "first_name",
|
1457
|
+
"Required": "N",
|
1458
|
+
"Default": null,
|
1459
|
+
"Type": "string",
|
1460
|
+
"Description": null
|
1461
|
+
},
|
1462
|
+
{
|
1463
|
+
"Name": "last_name",
|
1464
|
+
"Required": "N",
|
1465
|
+
"Default": null,
|
1466
|
+
"Type": "string",
|
1467
|
+
"Description": null
|
1468
|
+
},
|
1469
|
+
{
|
1470
|
+
"Name": "phone",
|
1471
|
+
"Required": "N",
|
1472
|
+
"Default": null,
|
1473
|
+
"Type": "string",
|
1474
|
+
"Description": null
|
1475
|
+
},
|
1476
|
+
{
|
1477
|
+
"Name": "mobile",
|
1478
|
+
"Required": "N",
|
1479
|
+
"Default": null,
|
1480
|
+
"Type": "string",
|
1481
|
+
"Description": null
|
1482
|
+
}
|
1483
|
+
]
|
1484
|
+
},
|
1485
|
+
{
|
1486
|
+
"MethodName": "Search",
|
1487
|
+
"Synopsis": "Search for people using non-unique traits",
|
1488
|
+
"HTTPMethod": "GET",
|
1489
|
+
"URI": "/people/search",
|
1490
|
+
"parameters": [
|
1491
|
+
{
|
1492
|
+
"Name": "first_name",
|
1493
|
+
"Required": "N",
|
1494
|
+
"Default": null,
|
1495
|
+
"Type": "string",
|
1496
|
+
"Description": null
|
1497
|
+
},
|
1498
|
+
{
|
1499
|
+
"Name": "last_name",
|
1500
|
+
"Required": "N",
|
1501
|
+
"Default": null,
|
1502
|
+
"Type": "string",
|
1503
|
+
"Description": null
|
1504
|
+
},
|
1505
|
+
{
|
1506
|
+
"Name": "city",
|
1507
|
+
"Required": "N",
|
1508
|
+
"Default": null,
|
1509
|
+
"Type": "string",
|
1510
|
+
"Description": null
|
1511
|
+
},
|
1512
|
+
{
|
1513
|
+
"Name": "state",
|
1514
|
+
"Required": "N",
|
1515
|
+
"Default": null,
|
1516
|
+
"Type": "string",
|
1517
|
+
"Description": null
|
1518
|
+
},
|
1519
|
+
{
|
1520
|
+
"Name": "sex",
|
1521
|
+
"Required": "N",
|
1522
|
+
"Default": null,
|
1523
|
+
"Type": "string",
|
1524
|
+
"Description": null
|
1525
|
+
},
|
1526
|
+
{
|
1527
|
+
"Name": "birthdate",
|
1528
|
+
"Required": "N",
|
1529
|
+
"Default": null,
|
1530
|
+
"Type": "string",
|
1531
|
+
"Description": null
|
1532
|
+
},
|
1533
|
+
{
|
1534
|
+
"Name": "updated_since",
|
1535
|
+
"Required": "N",
|
1536
|
+
"Default": null,
|
1537
|
+
"Type": "string",
|
1538
|
+
"Description": null
|
1539
|
+
},
|
1540
|
+
{
|
1541
|
+
"Name": "with_mobile",
|
1542
|
+
"Required": "N",
|
1543
|
+
"Default": null,
|
1544
|
+
"Type": "string",
|
1545
|
+
"Description": null
|
1546
|
+
},
|
1547
|
+
{
|
1548
|
+
"Name": "custom_values",
|
1549
|
+
"Required": "N",
|
1550
|
+
"Default": null,
|
1551
|
+
"Type": "string",
|
1552
|
+
"Description": null
|
1553
|
+
},
|
1554
|
+
{
|
1555
|
+
"Name": "page",
|
1556
|
+
"Required": "N",
|
1557
|
+
"Default": "1",
|
1558
|
+
"Type": "int",
|
1559
|
+
"Description": null
|
1560
|
+
},
|
1561
|
+
{
|
1562
|
+
"Name": "per_page",
|
1563
|
+
"Required": "N",
|
1564
|
+
"Default": "100",
|
1565
|
+
"Type": "int",
|
1566
|
+
"Description": null
|
1567
|
+
}
|
1568
|
+
]
|
1569
|
+
},
|
1570
|
+
{
|
1571
|
+
"MethodName": "Nearby",
|
1572
|
+
"Synopsis": "Searches for people near a location defined by latitude and longitude",
|
1573
|
+
"HTTPMethod": "GET",
|
1574
|
+
"URI": "/people/nearby",
|
1575
|
+
"parameters": [
|
1576
|
+
{
|
1577
|
+
"Name": "location",
|
1578
|
+
"Required": "Y",
|
1579
|
+
"Default": "34.049031,-118.251399",
|
1580
|
+
"Type": "string",
|
1581
|
+
"Description": "origin of search in the format \"latitude,longitude\""
|
1582
|
+
},
|
1583
|
+
{
|
1584
|
+
"Name": "distance",
|
1585
|
+
"Required": "N",
|
1586
|
+
"Default": "1",
|
1587
|
+
"Type": "int",
|
1588
|
+
"Description": "radius in miles for which to include results"
|
1589
|
+
},
|
1590
|
+
{
|
1591
|
+
"Name": "page",
|
1592
|
+
"Required": "N",
|
1593
|
+
"Default": "1",
|
1594
|
+
"Type": "int",
|
1595
|
+
"Description": "page number"
|
1596
|
+
},
|
1597
|
+
{
|
1598
|
+
"Name": "per_page",
|
1599
|
+
"Required": "N",
|
1600
|
+
"Default": "10",
|
1601
|
+
"Type": "int",
|
1602
|
+
"Description": "number of results to show per page"
|
1603
|
+
}
|
1604
|
+
]
|
1605
|
+
},
|
1606
|
+
{
|
1607
|
+
"MethodName": "Me",
|
1608
|
+
"Synopsis": "Returns the access token's resource owner's representation",
|
1609
|
+
"HTTPMethod": "GET",
|
1610
|
+
"URI": "/people/me",
|
1611
|
+
"parameters": [
|
1612
|
+
|
1613
|
+
]
|
1614
|
+
},
|
1615
|
+
{
|
1616
|
+
"MethodName": "Register",
|
1617
|
+
"Synopsis": "Starts user registration person for the given person",
|
1618
|
+
"HTTPMethod": "GET",
|
1619
|
+
"URI": "/people/:id/register",
|
1620
|
+
"parameters": [
|
1621
|
+
{
|
1622
|
+
"Name": "id",
|
1623
|
+
"Required": "Y",
|
1624
|
+
"Default": null,
|
1625
|
+
"Type": "int",
|
1626
|
+
"Description": "The person's ID"
|
1627
|
+
}
|
1628
|
+
]
|
1629
|
+
},
|
1630
|
+
{
|
1631
|
+
"MethodName": "Taggings",
|
1632
|
+
"Synopsis": "Returns all taggings for a given person",
|
1633
|
+
"HTTPMethod": "GET",
|
1634
|
+
"URI": "/people/:id/taggings",
|
1635
|
+
"parameters": [
|
1636
|
+
{
|
1637
|
+
"Name": "id",
|
1638
|
+
"Required": "Y",
|
1639
|
+
"Default": null,
|
1640
|
+
"Type": "int",
|
1641
|
+
"Description": "the ID of the person"
|
1642
|
+
}
|
1643
|
+
]
|
1644
|
+
},
|
1645
|
+
{
|
1646
|
+
"MethodName": "Tag Person",
|
1647
|
+
"Synopsis": "Tags a person",
|
1648
|
+
"HTTPMethod": "PUT",
|
1649
|
+
"URI": "/people/:id/taggings",
|
1650
|
+
"parameters": [
|
1651
|
+
{
|
1652
|
+
"Name": "id",
|
1653
|
+
"Required": "Y",
|
1654
|
+
"Default": null,
|
1655
|
+
"Type": "int",
|
1656
|
+
"Description": "the ID of the person"
|
1657
|
+
},
|
1658
|
+
{
|
1659
|
+
"Name": "body",
|
1660
|
+
"Required": "Y",
|
1661
|
+
"Default": null,
|
1662
|
+
"Type": "json",
|
1663
|
+
"Description": "JSON with tagging information"
|
1664
|
+
}
|
1665
|
+
]
|
1666
|
+
},
|
1667
|
+
{
|
1668
|
+
"MethodName": "Tag Removal",
|
1669
|
+
"Synopsis": "Removes a tag from a person",
|
1670
|
+
"HTTPMethod": "DELETE",
|
1671
|
+
"URI": "/people/:id/taggings/:tag",
|
1672
|
+
"parameters": [
|
1673
|
+
{
|
1674
|
+
"Name": "id",
|
1675
|
+
"Required": "Y",
|
1676
|
+
"Default": null,
|
1677
|
+
"Type": "int",
|
1678
|
+
"Description": "the ID of the person"
|
1679
|
+
},
|
1680
|
+
{
|
1681
|
+
"Name": "tag",
|
1682
|
+
"Required": "Y",
|
1683
|
+
"Default": null,
|
1684
|
+
"Type": "string",
|
1685
|
+
"Description": "the name of the tag"
|
1686
|
+
}
|
1687
|
+
]
|
1688
|
+
},
|
1689
|
+
{
|
1690
|
+
"MethodName": "Political Capital",
|
1691
|
+
"Synopsis": "Returns a paginated list of a person's capitals",
|
1692
|
+
"HTTPMethod": "GET",
|
1693
|
+
"URI": "/people/:id/capitals",
|
1694
|
+
"parameters": [
|
1695
|
+
{
|
1696
|
+
"Name": "id",
|
1697
|
+
"Required": "Y",
|
1698
|
+
"Default": null,
|
1699
|
+
"Type": "int",
|
1700
|
+
"Description": "the ID of the person"
|
1701
|
+
},
|
1702
|
+
{
|
1703
|
+
"Name": "page",
|
1704
|
+
"Required": "N",
|
1705
|
+
"Default": "1",
|
1706
|
+
"Type": "int",
|
1707
|
+
"Description": "page number"
|
1708
|
+
},
|
1709
|
+
{
|
1710
|
+
"Name": "per_page",
|
1711
|
+
"Required": "N",
|
1712
|
+
"Default": "10",
|
1713
|
+
"Type": "int",
|
1714
|
+
"Description": "number of results to show per page"
|
1715
|
+
}
|
1716
|
+
]
|
1717
|
+
},
|
1718
|
+
{
|
1719
|
+
"MethodName": "Political Capital Create",
|
1720
|
+
"Synopsis": "Creates capital for the given person",
|
1721
|
+
"HTTPMethod": "POST",
|
1722
|
+
"URI": "/people/:id/capitals",
|
1723
|
+
"parameters": [
|
1724
|
+
{
|
1725
|
+
"Name": "id",
|
1726
|
+
"Required": "Y",
|
1727
|
+
"Default": null,
|
1728
|
+
"Type": "int",
|
1729
|
+
"Description": "the ID of the person"
|
1730
|
+
},
|
1731
|
+
{
|
1732
|
+
"Name": "body",
|
1733
|
+
"Required": "Y",
|
1734
|
+
"Default": null,
|
1735
|
+
"Type": "json",
|
1736
|
+
"Description": "JSON representation of the capital to create"
|
1737
|
+
}
|
1738
|
+
]
|
1739
|
+
},
|
1740
|
+
{
|
1741
|
+
"MethodName": "Political Capital Destroy",
|
1742
|
+
"Synopsis": "Destroys capital for a person",
|
1743
|
+
"HTTPMethod": "DELETE",
|
1744
|
+
"URI": "/people/:person_id/capitals/:capital_id",
|
1745
|
+
"parameters": [
|
1746
|
+
{
|
1747
|
+
"Name": "person_id",
|
1748
|
+
"Required": "Y",
|
1749
|
+
"Default": null,
|
1750
|
+
"Type": "int",
|
1751
|
+
"Description": "the ID of the person"
|
1752
|
+
},
|
1753
|
+
{
|
1754
|
+
"Name": "capital_id",
|
1755
|
+
"Required": "Y",
|
1756
|
+
"Default": null,
|
1757
|
+
"Type": "int",
|
1758
|
+
"Description": "the ID of the capital to destroy"
|
1759
|
+
}
|
1760
|
+
]
|
1761
|
+
},
|
1762
|
+
{
|
1763
|
+
"MethodName": "Create",
|
1764
|
+
"Synopsis": "Creates a person with the provided data",
|
1765
|
+
"HTTPMethod": "POST",
|
1766
|
+
"URI": "/people",
|
1767
|
+
"parameters": [
|
1768
|
+
{
|
1769
|
+
"Name": "body",
|
1770
|
+
"Required": "Y",
|
1771
|
+
"Default": "{}",
|
1772
|
+
"Type": "json",
|
1773
|
+
"Description": "JSON representation of the person to create"
|
1774
|
+
}
|
1775
|
+
]
|
1776
|
+
},
|
1777
|
+
{
|
1778
|
+
"MethodName": "Update",
|
1779
|
+
"Synopsis": "Updates a person with the provided data",
|
1780
|
+
"HTTPMethod": "PUT",
|
1781
|
+
"URI": "/people/:id",
|
1782
|
+
"parameters": [
|
1783
|
+
{
|
1784
|
+
"Name": "id",
|
1785
|
+
"Required": "Y",
|
1786
|
+
"Default": null,
|
1787
|
+
"Type": "int",
|
1788
|
+
"Description": "The person's ID"
|
1789
|
+
},
|
1790
|
+
{
|
1791
|
+
"Name": "body",
|
1792
|
+
"Required": "Y",
|
1793
|
+
"Default": "{}",
|
1794
|
+
"Type": "json",
|
1795
|
+
"Description": "JSON attributes for updating the person"
|
1796
|
+
}
|
1797
|
+
]
|
1798
|
+
},
|
1799
|
+
{
|
1800
|
+
"MethodName": "Push",
|
1801
|
+
"Synopsis": "Updates a matched person or creates a new one if the person doesn't exist",
|
1802
|
+
"HTTPMethod": "PUT",
|
1803
|
+
"URI": "/people/push",
|
1804
|
+
"parameters": [
|
1805
|
+
{
|
1806
|
+
"Name": "body",
|
1807
|
+
"Required": "Y",
|
1808
|
+
"Default": "{}",
|
1809
|
+
"Type": "json",
|
1810
|
+
"Description": "JSON attributes for updating/matching the person"
|
1811
|
+
}
|
1812
|
+
]
|
1813
|
+
},
|
1814
|
+
{
|
1815
|
+
"MethodName": "Destroy",
|
1816
|
+
"Synopsis": "Removes the person with the matching ID",
|
1817
|
+
"HTTPMethod": "DELETE",
|
1818
|
+
"URI": "/people/:id",
|
1819
|
+
"parameters": [
|
1820
|
+
{
|
1821
|
+
"Name": "id",
|
1822
|
+
"Required": "Y",
|
1823
|
+
"Default": null,
|
1824
|
+
"Type": "int",
|
1825
|
+
"Description": "The person's ID"
|
1826
|
+
}
|
1827
|
+
]
|
1828
|
+
}
|
1829
|
+
]
|
1830
|
+
},
|
1831
|
+
{
|
1832
|
+
"name": "People Tags",
|
1833
|
+
"methods": [
|
1834
|
+
{
|
1835
|
+
"MethodName": "Index",
|
1836
|
+
"Synopsis": "Returns a list of previously used tags",
|
1837
|
+
"HTTPMethod": "GET",
|
1838
|
+
"URI": "/tags",
|
1839
|
+
"parameters": [
|
1840
|
+
{
|
1841
|
+
"Name": "page",
|
1842
|
+
"Required": "N",
|
1843
|
+
"Default": "1",
|
1844
|
+
"Type": "int",
|
1845
|
+
"Description": "result page number"
|
1846
|
+
},
|
1847
|
+
{
|
1848
|
+
"Name": "per_page",
|
1849
|
+
"Required": "N",
|
1850
|
+
"Default": "10",
|
1851
|
+
"Type": "int",
|
1852
|
+
"Description": "number of results to return"
|
1853
|
+
}
|
1854
|
+
]
|
1855
|
+
},
|
1856
|
+
{
|
1857
|
+
"MethodName": "People",
|
1858
|
+
"Synopsis": "Searches for people with the given tag",
|
1859
|
+
"HTTPMethod": "GET",
|
1860
|
+
"URI": "/tags/:tag/people",
|
1861
|
+
"parameters": [
|
1862
|
+
{
|
1863
|
+
"Name": "tag",
|
1864
|
+
"Required": "Y",
|
1865
|
+
"Default": null,
|
1866
|
+
"Type": "string",
|
1867
|
+
"Description": "the name of the tag"
|
1868
|
+
},
|
1869
|
+
{
|
1870
|
+
"Name": "page",
|
1871
|
+
"Required": "N",
|
1872
|
+
"Default": "1",
|
1873
|
+
"Type": "int",
|
1874
|
+
"Description": "result page number"
|
1875
|
+
},
|
1876
|
+
{
|
1877
|
+
"Name": "per_page",
|
1878
|
+
"Required": "N",
|
1879
|
+
"Default": "10",
|
1880
|
+
"Type": "int",
|
1881
|
+
"Description": "number of results to return"
|
1882
|
+
}
|
1883
|
+
]
|
1884
|
+
}
|
1885
|
+
]
|
1886
|
+
},
|
1887
|
+
{
|
1888
|
+
"name": "Sites",
|
1889
|
+
"methods": [
|
1890
|
+
{
|
1891
|
+
"MethodName": "Index",
|
1892
|
+
"Synopsis": "Returns a list of all sites",
|
1893
|
+
"HTTPMethod": "GET",
|
1894
|
+
"URI": "/sites",
|
1895
|
+
"parameters": [
|
1896
|
+
{
|
1897
|
+
"Name": "page",
|
1898
|
+
"Required": "N",
|
1899
|
+
"Default": "1",
|
1900
|
+
"Type": "int",
|
1901
|
+
"Description": "result page number"
|
1902
|
+
},
|
1903
|
+
{
|
1904
|
+
"Name": "per_page",
|
1905
|
+
"Required": "N",
|
1906
|
+
"Default": "10",
|
1907
|
+
"Type": "int",
|
1908
|
+
"Description": "number of results to return"
|
1909
|
+
}
|
1910
|
+
]
|
1911
|
+
}
|
1912
|
+
]
|
1913
|
+
},
|
1914
|
+
{
|
1915
|
+
"name": "Surveys",
|
1916
|
+
"methods": [
|
1917
|
+
{
|
1918
|
+
"MethodName": "Index",
|
1919
|
+
"Synopsis": "Shows a list of all surveys for the a site",
|
1920
|
+
"HTTPMethod": "GET",
|
1921
|
+
"URI": "/sites/:site_slug/pages/surveys",
|
1922
|
+
"parameters": [
|
1923
|
+
{
|
1924
|
+
"Name": "site_slug",
|
1925
|
+
"Required": "Y",
|
1926
|
+
"Default": null,
|
1927
|
+
"Type": "string",
|
1928
|
+
"Description": "the site holding the survey"
|
1929
|
+
},
|
1930
|
+
{
|
1931
|
+
"Name": "page",
|
1932
|
+
"Required": "N",
|
1933
|
+
"Default": "1",
|
1934
|
+
"Type": "int",
|
1935
|
+
"Description": "result page number"
|
1936
|
+
},
|
1937
|
+
{
|
1938
|
+
"Name": "per_page",
|
1939
|
+
"Required": "N",
|
1940
|
+
"Default": "10",
|
1941
|
+
"Type": "int",
|
1942
|
+
"Description": "number of results to return"
|
1943
|
+
}
|
1944
|
+
]
|
1945
|
+
},
|
1946
|
+
{
|
1947
|
+
"MethodName": "Create",
|
1948
|
+
"Synopsis": "Creates a survey for a site",
|
1949
|
+
"HTTPMethod": "POST",
|
1950
|
+
"URI": "/sites/:site_slug/pages/surveys",
|
1951
|
+
"parameters": [
|
1952
|
+
{
|
1953
|
+
"Name": "site_slug",
|
1954
|
+
"Required": "Y",
|
1955
|
+
"Default": null,
|
1956
|
+
"Type": "string",
|
1957
|
+
"Description": "the site holding the survey"
|
1958
|
+
},
|
1959
|
+
{
|
1960
|
+
"Name": "body",
|
1961
|
+
"Required": "Y",
|
1962
|
+
"Default": null,
|
1963
|
+
"Type": "json",
|
1964
|
+
"Description": "a JSON representation of the new survey"
|
1965
|
+
}
|
1966
|
+
]
|
1967
|
+
},
|
1968
|
+
{
|
1969
|
+
"MethodName": "Update",
|
1970
|
+
"Synopsis": "Updates the attributes of a survey",
|
1971
|
+
"HTTPMethod": "PUT",
|
1972
|
+
"URI": "/sites/:site_slug/pages/surveys/:id",
|
1973
|
+
"parameters": [
|
1974
|
+
{
|
1975
|
+
"Name": "site_slug",
|
1976
|
+
"Required": "Y",
|
1977
|
+
"Default": null,
|
1978
|
+
"Type": "string",
|
1979
|
+
"Description": "the site holding the survey"
|
1980
|
+
},
|
1981
|
+
{
|
1982
|
+
"Name": "id",
|
1983
|
+
"Required": "Y",
|
1984
|
+
"Default": null,
|
1985
|
+
"Type": "int",
|
1986
|
+
"Description": "the ID of the survey"
|
1987
|
+
},
|
1988
|
+
{
|
1989
|
+
"Name": "body",
|
1990
|
+
"Required": "Y",
|
1991
|
+
"Default": null,
|
1992
|
+
"Type": "json",
|
1993
|
+
"Description": "JSON containing updates"
|
1994
|
+
}
|
1995
|
+
]
|
1996
|
+
},
|
1997
|
+
{
|
1998
|
+
"MethodName": "Destroy",
|
1999
|
+
"Synopsis": "Removes a survey",
|
2000
|
+
"HTTPMethod": "DELETE",
|
2001
|
+
"URI": "/sites/:site_slug/pages/surveys/:id",
|
2002
|
+
"parameters": [
|
2003
|
+
{
|
2004
|
+
"Name": "site_slug",
|
2005
|
+
"Required": "Y",
|
2006
|
+
"Default": null,
|
2007
|
+
"Type": "string",
|
2008
|
+
"Description": "the site holding the survey"
|
2009
|
+
},
|
2010
|
+
{
|
2011
|
+
"Name": "id",
|
2012
|
+
"Required": "Y",
|
2013
|
+
"Default": null,
|
2014
|
+
"Type": "int",
|
2015
|
+
"Description": "the ID of the survey"
|
2016
|
+
}
|
2017
|
+
]
|
2018
|
+
}
|
2019
|
+
]
|
2020
|
+
},
|
2021
|
+
{
|
2022
|
+
"name": "Survey Responses",
|
2023
|
+
"methods": [
|
2024
|
+
{
|
2025
|
+
"MethodName": "Index",
|
2026
|
+
"Synopsis": "Lists all survey responses",
|
2027
|
+
"HTTPMethod": "GET",
|
2028
|
+
"URI": "/survey_responses",
|
2029
|
+
"parameters": [
|
2030
|
+
{
|
2031
|
+
"Name": "start_time",
|
2032
|
+
"Required": "N",
|
2033
|
+
"Default": null,
|
2034
|
+
"Type": "string",
|
2035
|
+
"Description": "the starting time for results"
|
2036
|
+
},
|
2037
|
+
{
|
2038
|
+
"Name": "end_time",
|
2039
|
+
"Required": "N",
|
2040
|
+
"Default": null,
|
2041
|
+
"Type": "string",
|
2042
|
+
"Description": "the ending time for results"
|
2043
|
+
},
|
2044
|
+
{
|
2045
|
+
"Name": "survey_id",
|
2046
|
+
"Required": "N",
|
2047
|
+
"Default": null,
|
2048
|
+
"Type": "int",
|
2049
|
+
"Description": "the id for a parent survey"
|
2050
|
+
},
|
2051
|
+
{
|
2052
|
+
"Name": "page",
|
2053
|
+
"Required": "N",
|
2054
|
+
"Default": "1",
|
2055
|
+
"Type": "int",
|
2056
|
+
"Description": "result page number"
|
2057
|
+
},
|
2058
|
+
{
|
2059
|
+
"Name": "per_page",
|
2060
|
+
"Required": "N",
|
2061
|
+
"Default": "10",
|
2062
|
+
"Type": "int",
|
2063
|
+
"Description": "number of results to return"
|
2064
|
+
}
|
2065
|
+
]
|
2066
|
+
},
|
2067
|
+
{
|
2068
|
+
"MethodName": "Create",
|
2069
|
+
"Synopsis": "Creates responses for a survey",
|
2070
|
+
"HTTPMethod": "POST",
|
2071
|
+
"URI": "/survey_responses",
|
2072
|
+
"parameters": [
|
2073
|
+
{
|
2074
|
+
"Name": "body",
|
2075
|
+
"Required": "Y",
|
2076
|
+
"Default": null,
|
2077
|
+
"Type": "json",
|
2078
|
+
"Description": "a JSON representation of the survey responses"
|
2079
|
+
}
|
2080
|
+
]
|
2081
|
+
}
|
2082
|
+
]
|
2083
|
+
},
|
2084
|
+
{
|
2085
|
+
"name": "Webhooks",
|
2086
|
+
"methods": [
|
2087
|
+
{
|
2088
|
+
"MethodName": "Index",
|
2089
|
+
"Synopsis": "Lists all webhooks",
|
2090
|
+
"HTTPMethod": "GET",
|
2091
|
+
"URI": "/webhooks",
|
2092
|
+
"parameters": [
|
2093
|
+
{
|
2094
|
+
"Name": "page",
|
2095
|
+
"Required": "N",
|
2096
|
+
"Default": "1",
|
2097
|
+
"Type": "int",
|
2098
|
+
"Description": "result page number"
|
2099
|
+
},
|
2100
|
+
{
|
2101
|
+
"Name": "per_page",
|
2102
|
+
"Required": "N",
|
2103
|
+
"Default": "10",
|
2104
|
+
"Type": "int",
|
2105
|
+
"Description": "number of results to return"
|
2106
|
+
}
|
2107
|
+
]
|
2108
|
+
},
|
2109
|
+
{
|
2110
|
+
"MethodName": "Show",
|
2111
|
+
"Synopsis": "Shows the details of an individual webhook",
|
2112
|
+
"HTTPMethod": "GET",
|
2113
|
+
"URI": "/webhooks/:id",
|
2114
|
+
"parameters": [
|
2115
|
+
{
|
2116
|
+
"Name": "id",
|
2117
|
+
"Required": "Y",
|
2118
|
+
"Default": null,
|
2119
|
+
"Type": "string",
|
2120
|
+
"Description": "the ID of the webhook to display"
|
2121
|
+
}
|
2122
|
+
]
|
2123
|
+
},
|
2124
|
+
{
|
2125
|
+
"MethodName": "Create",
|
2126
|
+
"Synopsis": "Creates a new webhook",
|
2127
|
+
"HTTPMethod": "POST",
|
2128
|
+
"URI": "/webhooks",
|
2129
|
+
"parameters": [
|
2130
|
+
{
|
2131
|
+
"Name": "body",
|
2132
|
+
"Required": "Y",
|
2133
|
+
"Default": null,
|
2134
|
+
"Type": "json",
|
2135
|
+
"Description": "a JSON representation of the new webhook"
|
2136
|
+
}
|
2137
|
+
]
|
2138
|
+
},
|
2139
|
+
{
|
2140
|
+
"MethodName": "Destroy",
|
2141
|
+
"Synopsis": "Destroys a webhook",
|
2142
|
+
"HTTPMethod": "DELETE",
|
2143
|
+
"URI": "/webhooks/:id",
|
2144
|
+
"parameters": [
|
2145
|
+
|
2146
|
+
]
|
2147
|
+
}
|
2148
|
+
]
|
2149
|
+
}
|
2150
|
+
]
|
2151
|
+
}
|