lib/api_spec/lib/api_spec/specs/exports.rb in nationbuilder-rb-1.3.5 vs lib/api_spec/lib/api_spec/specs/exports.rb in nationbuilder-rb-1.3.6

- old
+ new

@@ -1,42 +1,47 @@ class ApiSpec::Spec endpoint 'Exports' do |export| - export.method('Create List') do |method| - method.synopsis = "Creates a list export with the provided data" - method.http_method = "POST" - method.uri = "/list/:list_id/exports" + export.method('Export List') do |method| + method.synopsis = 'Starts an export of a list' + method.http_method = 'POST' + method.uri = '/lists/:list_id/exports' + method.parameter('list_id') do |p| + p.required = 'Y' + p.type = 'int' + p.description = 'ID of the list to export' + end + method.parameter('body') do |p| p.required = 'Y' p.type = 'json' p.description = 'JSON representation of the export' end end export.method('Show') do |method| - method.synopsis = "Shows the status of a list export." - method.http_method = "GET" - method.uri = "/exports/:id" + method.synopsis = 'Shows the status of a list export.' + method.http_method = 'GET' + method.uri = '/exports/:id' method.parameter('id') do |p| p.required = 'Y' p.type = 'int' p.description = 'the ID of the export' end end export.method('Delete') do |method| - method.synopsis = "Delete the export" - method.http_method = "DELETE" - method.uri = "/exports/:id" + method.synopsis = 'Delete the export' + method.http_method = 'DELETE' + method.uri = '/exports/:id' method.parameter('id') do |p| p.required = 'Y' p.type = 'int' p.description = 'the ID of the export' end end end - end