CloudsmithApi::WebhooksApi
All URIs are relative to https://api.cloudsmith.io/v1
| Method | HTTP request | Description |
|---|---|---|
| webhooks_create | POST /webhooks/owner/repo/ | Create a specific webhook in a repository. |
| webhooks_delete | DELETE /webhooks/owner/repo/identifier/ | Delete a specific webhook in a repository. |
| webhooks_list | GET /webhooks/owner/repo/ | Get a list of all webhooks in a repository. |
| webhooks_partial_update | PATCH /webhooks/owner/repo/identifier/ | Update a specific webhook in a repository. |
| webhooks_read | GET /webhooks/owner/repo/identifier/ | Views for working with repository webhooks. |
webhooks_create
RepositoryWebhook webhooks_create(owner, repo, opts)
Create a specific webhook in a repository.
Create a specific webhook in a repository.
Example
# load the gem
require 'cloudsmith-api'
# setup authorization
CloudsmithApi.configure do |config|
# Configure API key authorization: apikey
config.api_key['X-Api-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
end
api_instance = CloudsmithApi::WebhooksApi.new
owner = 'owner_example' # String |
repo = 'repo_example' # String |
opts = {
data: CloudsmithApi::RepositoryWebhookRequest.new # RepositoryWebhookRequest |
}
begin
#Create a specific webhook in a repository.
result = api_instance.webhooks_create(owner, repo, opts)
p result
rescue CloudsmithApi::ApiError => e
puts "Exception when calling WebhooksApi->webhooks_create: #{e}"
end
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| owner | String | ||
| repo | String | ||
| data | RepositoryWebhookRequest | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
webhooks_delete
webhooks_delete(owner, repo, identifier)
Delete a specific webhook in a repository.
Delete a specific webhook in a repository.
Example
# load the gem
require 'cloudsmith-api'
# setup authorization
CloudsmithApi.configure do |config|
# Configure API key authorization: apikey
config.api_key['X-Api-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
end
api_instance = CloudsmithApi::WebhooksApi.new
owner = 'owner_example' # String |
repo = 'repo_example' # String |
identifier = 'identifier_example' # String |
begin
#Delete a specific webhook in a repository.
api_instance.webhooks_delete(owner, repo, identifier)
rescue CloudsmithApi::ApiError => e
puts "Exception when calling WebhooksApi->webhooks_delete: #{e}"
end
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| owner | String | ||
| repo | String | ||
| identifier | String |
Return type
nil (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
webhooks_list
Array<RepositoryWebhook> webhooks_list(owner, repo, opts)
Get a list of all webhooks in a repository.
Get a list of all webhooks in a repository.
Example
# load the gem
require 'cloudsmith-api'
# setup authorization
CloudsmithApi.configure do |config|
# Configure API key authorization: apikey
config.api_key['X-Api-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
end
api_instance = CloudsmithApi::WebhooksApi.new
owner = 'owner_example' # String |
repo = 'repo_example' # String |
opts = {
page: 56, # Integer | A page number within the paginated result set.
page_size: 56 # Integer | Number of results to return per page.
}
begin
#Get a list of all webhooks in a repository.
result = api_instance.webhooks_list(owner, repo, opts)
p result
rescue CloudsmithApi::ApiError => e
puts "Exception when calling WebhooksApi->webhooks_list: #{e}"
end
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| owner | String | ||
| repo | String | ||
| page | Integer | A page number within the paginated result set. | [optional] |
| page_size | Integer | Number of results to return per page. | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
webhooks_partial_update
RepositoryWebhook webhooks_partial_update(owner, repo, identifier, opts)
Update a specific webhook in a repository.
Update a specific webhook in a repository.
Example
# load the gem
require 'cloudsmith-api'
# setup authorization
CloudsmithApi.configure do |config|
# Configure API key authorization: apikey
config.api_key['X-Api-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
end
api_instance = CloudsmithApi::WebhooksApi.new
owner = 'owner_example' # String |
repo = 'repo_example' # String |
identifier = 'identifier_example' # String |
opts = {
data: CloudsmithApi::RepositoryWebhookRequestPatch.new # RepositoryWebhookRequestPatch |
}
begin
#Update a specific webhook in a repository.
result = api_instance.webhooks_partial_update(owner, repo, identifier, opts)
p result
rescue CloudsmithApi::ApiError => e
puts "Exception when calling WebhooksApi->webhooks_partial_update: #{e}"
end
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| owner | String | ||
| repo | String | ||
| identifier | String | ||
| data | RepositoryWebhookRequestPatch | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
webhooks_read
RepositoryWebhook webhooks_read(owner, repo, identifier)
Views for working with repository webhooks.
Views for working with repository webhooks.
Example
# load the gem
require 'cloudsmith-api'
# setup authorization
CloudsmithApi.configure do |config|
# Configure API key authorization: apikey
config.api_key['X-Api-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
end
api_instance = CloudsmithApi::WebhooksApi.new
owner = 'owner_example' # String |
repo = 'repo_example' # String |
identifier = 'identifier_example' # String |
begin
#Views for working with repository webhooks.
result = api_instance.webhooks_read(owner, repo, identifier)
p result
rescue CloudsmithApi::ApiError => e
puts "Exception when calling WebhooksApi->webhooks_read: #{e}"
end
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| owner | String | ||
| repo | String | ||
| identifier | String |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json