Module: Crowdin::ApiResources::OrganizationWebhooks
- Defined in:
- lib/crowdin-api/api_resources/organization_webhooks.rb
Instance Method Summary collapse
- #add_organization_webhook(body = {}) ⇒ Object
- #delete_organization_webhook(organization_webhook_id) ⇒ Object
- #edit_organization_webhook(organization_webhook_id, body = []) ⇒ Object
- #get_organization_webhook(organization_webhook_id) ⇒ Object
- #list_organization_webhooks(query = {}) ⇒ Object
Instance Method Details
#add_organization_webhook(body = {}) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/crowdin-api/api_resources/organization_webhooks.rb', line 22 def add_organization_webhook(body = {}) request = Web::Request.new( connection, :post, "#{config.target_api_url}/webhooks", { params: body } ) Web::SendRequest.new(request).perform end |
#delete_organization_webhook(organization_webhook_id) ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/crowdin-api/api_resources/organization_webhooks.rb', line 35 def delete_organization_webhook(organization_webhook_id) request = Web::Request.new( connection, :delete, "#{config.target_api_url}/webhooks/#{organization_webhook_id}" ) Web::SendRequest.new(request).perform end |
#edit_organization_webhook(organization_webhook_id, body = []) ⇒ Object
60 61 62 63 64 65 66 67 68 |
# File 'lib/crowdin-api/api_resources/organization_webhooks.rb', line 60 def edit_organization_webhook(organization_webhook_id, body = []) request = Web::Request.new( connection, :patch, "#{config.target_api_url}/webhooks/#{organization_webhook_id}", { params: body } ) Web::SendRequest.new(request).perform end |
#get_organization_webhook(organization_webhook_id) ⇒ Object
47 48 49 50 51 52 53 54 |
# File 'lib/crowdin-api/api_resources/organization_webhooks.rb', line 47 def get_organization_webhook(organization_webhook_id) request = Web::Request.new( connection, :get, "#{config.target_api_url}/webhooks/#{organization_webhook_id}" ) Web::SendRequest.new(request).perform end |
#list_organization_webhooks(query = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/crowdin-api/api_resources/organization_webhooks.rb', line 9 def list_organization_webhooks(query = {}) request = Web::Request.new( connection, :get, "#{config.target_api_url}/webhooks", { params: query } ) Web::SendRequest.new(request).perform end |