Module: Octokit::Client::Integrations
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/integrations.rb
Overview
Methods for the Integrations API
Instance Method Summary collapse
-
#add_repository_to_integration_installation(installation, repo, options = {}) ⇒ Boolean
(also: #add_repo_to_installation)
Add a single repository to an installation.
-
#create_integration_installation_access_token(installation, options = {}) ⇒ <Sawyer::Resource>
(also: #create_installation_access_token)
Create a new installation token.
-
#find_integration_installations(options = {}) ⇒ Array<Sawyer::Resource>
(also: #find_installations)
Find all installations that belong to an Integration.
-
#list_integration_installation_repositories(options = {}) ⇒ Array<Sawyer::Resource>
(also: #list_installation_repos)
List repositories that are accessible to the authenticated installation.
-
#remove_repository_from_integration_installation(installation, repo, options = {}) ⇒ Boolean
(also: #remove_repo_from_installation)
Remove a single repository to an installation.
Instance Method Details
#add_repository_to_integration_installation(installation, repo, options = {}) ⇒ Boolean Also known as: add_repo_to_installation
Add a single repository to an installation
55 56 57 58 |
# File 'lib/octokit/client/integrations.rb', line 55 def add_repository_to_integration_installation(installation, repo, = {}) opts = ensure_api_media_type(:integrations, ) boolean_from_response :put, "/installations/#{installation}/repositories/#{repo}", opts end |
#create_integration_installation_access_token(installation, options = {}) ⇒ <Sawyer::Resource> Also known as: create_installation_access_token
Create a new installation token
28 29 30 31 |
# File 'lib/octokit/client/integrations.rb', line 28 def create_integration_installation_access_token(installation, = {}) opts = ensure_api_media_type(:integrations, ) post "/installations/#{installation}/access_tokens", opts end |
#find_integration_installations(options = {}) ⇒ Array<Sawyer::Resource> Also known as: find_installations
Find all installations that belong to an Integration
14 15 16 17 |
# File 'lib/octokit/client/integrations.rb', line 14 def find_integration_installations( = {}) opts = ensure_api_media_type(:integrations, ) paginate "/integration/installations", opts end |
#list_integration_installation_repositories(options = {}) ⇒ Array<Sawyer::Resource> Also known as: list_installation_repos
List repositories that are accessible to the authenticated installation
40 41 42 43 |
# File 'lib/octokit/client/integrations.rb', line 40 def list_integration_installation_repositories( = {}) opts = ensure_api_media_type(:integrations, ) paginate "/installation/repositories", opts end |
#remove_repository_from_integration_installation(installation, repo, options = {}) ⇒ Boolean Also known as: remove_repo_from_installation
Remove a single repository to an installation
70 71 72 73 |
# File 'lib/octokit/client/integrations.rb', line 70 def remove_repository_from_integration_installation(installation, repo, = {}) opts = ensure_api_media_type(:integrations, ) boolean_from_response :delete, "/installations/#{installation}/repositories/#{repo}", opts end |