Sha256: 0db79960d74566b99c5bcf007edb6c7b72ef0d84b264832b23e0a86c441d5cb9

Contents?: true

Size: 1.53 KB

Versions: 10

Compression:

Stored size: 1.53 KB

Contents

class ApiSpec::Spec

  endpoint 'Webhooks' do |surveys|

    surveys.method('Index') do |m|
      m.synopsis = 'Lists all webhooks'
      m.http_method = 'GET'
      m.uri = '/webhooks'

      m.parameter('__token') do |p|
        p.required = 'N'
        p.type = 'string'
        p.description = 'pagination token'
      end

      m.parameter('__nonce') do |p|
        p.required = 'N'
        p.type = 'string'
        p.description = 'pagination nonce'
      end

      m.parameter('limit') do |p|
        p.required = 'N'
        p.default = '10'
        p.type = 'int'
        p.description = 'maximum number of results to return'
      end
    end

    surveys.method('Show') do |m|
      m.synopsis = 'Shows the details of an individual webhook'
      m.http_method = 'GET'
      m.uri = '/webhooks/:id'

      m.parameter('id') do |p|
        p.required = 'Y'
        p.type = 'string'
        p.description = 'the ID of the webhook to display'
      end
    end

    surveys.method('Create') do |m|
      m.synopsis = 'Creates a new webhook'
      m.http_method = 'POST'
      m.uri = '/webhooks'

      m.parameter('body') do |p|
        p.required = 'Y'
        p.type = 'json'
        p.description = 'a JSON representation of the new webhook'
      end
    end

    surveys.method('Destroy') do |m|
      m.synopsis = 'Destroys a webhook'
      m.http_method = 'DELETE'
      m.uri = '/webhooks/:id'

      m.parameter('id') do |p|
        p.required = 'Y'
        p.type = 'int'
        p.description = 'the ID a webhook'
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
nationbuilder-rb-1.6.2 lib/api_spec/lib/api_spec/specs/webhooks.rb
nationbuilder-rb-1.6.1 lib/api_spec/lib/api_spec/specs/webhooks.rb
nationbuilder-rb-1.6.0 lib/api_spec/lib/api_spec/specs/webhooks.rb
nationbuilder-rb-1.5.0 lib/api_spec/lib/api_spec/specs/webhooks.rb
nationbuilder-rb-1.4.3 lib/api_spec/lib/api_spec/specs/webhooks.rb
nationbuilder-rb-1.4.2 lib/api_spec/lib/api_spec/specs/webhooks.rb
nationbuilder-rb-1.4.1 lib/api_spec/lib/api_spec/specs/webhooks.rb
nationbuilder-rb-1.3.9 lib/api_spec/lib/api_spec/specs/webhooks.rb
nationbuilder-rb-1.3.7 lib/api_spec/lib/api_spec/specs/webhooks.rb
nationbuilder-rb-1.3.6 lib/api_spec/lib/api_spec/specs/webhooks.rb