Module: Octokit::Client::Apps

Included in:
Octokit::Client
Defined in:
lib/octokit/client/apps.rb

Overview

Methods for the Apps API

Instance Method Summary collapse

Instance Method Details

#add_repository_to_app_installation(installation, repo, options = {}) ⇒ Boolean Also known as: add_repo_to_installation

Add a single repository to an installation


97
98
99
100
# File 'lib/octokit/client/apps.rb', line 97

def add_repository_to_app_installation(installation, repo, options = {})
  opts = ensure_api_media_type(:integrations, options)
  boolean_from_response :put, "/installations/#{installation}/repositories/#{repo}", opts
end

#add_repository_to_integration_installation(installation, repo, options = {}) ⇒ Object


103
104
105
106
107
108
109
110
111
# File 'lib/octokit/client/apps.rb', line 103

def add_repository_to_integration_installation(installation, repo, options = {})
  octokit_warn(
    "Deprecated: Octokit::Client::Apps#add_repository_to_integration_installation "\
    "method is deprecated. Please update your call to use "\
    "Octokit::Client::Apps#add_repository_to_app_installation before the next major "\
    "Octokit version update."
  )
  add_repository_to_app_installation(installation, repo, options)
end

#create_app_installation_access_token(installation, options = {}) ⇒ <Sawyer::Resource> Also known as: create_installation_access_token

Create a new installation token


50
51
52
53
# File 'lib/octokit/client/apps.rb', line 50

def create_app_installation_access_token(installation, options = {})
  opts = ensure_api_media_type(:integrations, options)
  post "/installations/#{installation}/access_tokens", opts
end

#create_integration_installation_access_token(installation, options = {}) ⇒ Object


56
57
58
59
60
61
62
63
64
# File 'lib/octokit/client/apps.rb', line 56

def create_integration_installation_access_token(installation, options = {})
  octokit_warn(
    "Deprecated: Octokit::Client::Apps#create_integration_installation_access_token "\
    "method is deprecated. Please update your call to use "\
    "Octokit::Client::Apps#create_app_installation_access_token before the next major "\
    "Octokit version update."
  )
  create_app_installation_access_token(installation, options)
end

#find_app_installations(options = {}) ⇒ Array<Sawyer::Resource> Also known as: find_installations

Find all installations that belong to an App


14
15
16
17
# File 'lib/octokit/client/apps.rb', line 14

def find_app_installations(options = {})
  opts = ensure_api_media_type(:integrations, options)
  paginate "/app/installations", opts
end

#find_integration_installations(options = {}) ⇒ Object


20
21
22
23
24
25
26
27
28
# File 'lib/octokit/client/apps.rb', line 20

def find_integration_installations(options = {})
  octokit_warn(
    "Deprecated: Octokit::Client::Apps#find_integration_installations "\
    "method is deprecated. Please update your call to use "\
    "Octokit::Client::Apps#find_app_installations before the next major "\
    "Octokit version update."
  )
  find_app_installations(options)
end

#installation(id, options = {}) ⇒ Sawyer::Resource

Get a single installation


37
38
39
40
# File 'lib/octokit/client/apps.rb', line 37

def installation(id, options = {})
  opts = ensure_api_media_type(:integrations, options)
  get "/app/installations/#{id}", opts
end

#list_app_installation_repositories(options = {}) ⇒ Array<Sawyer::Resource> Also known as: list_installation_repos

List repositories that are accessible to the authenticated installation


72
73
74
75
# File 'lib/octokit/client/apps.rb', line 72

def list_app_installation_repositories(options = {})
  opts = ensure_api_media_type(:integrations, options)
  paginate "/installation/repositories", opts
end

#list_integration_installation_repositories(options = {}) ⇒ Object


78
79
80
81
82
83
84
85
86
# File 'lib/octokit/client/apps.rb', line 78

def list_integration_installation_repositories(options = {})
  octokit_warn(
    "Deprecated: Octokit::Client::Apps#list_integration_installation_repositories "\
    "method is deprecated. Please update your call to use "\
    "Octokit::Client::Apps#list_app_installation_repositories before the next major "\
    "Octokit version update."
  )
  list_app_installation_repositories(options)
end

#remove_repository_from_app_installation(installation, repo, options = {}) ⇒ Boolean Also known as: remove_repo_from_installation

Remove a single repository to an installation


122
123
124
125
# File 'lib/octokit/client/apps.rb', line 122

def remove_repository_from_app_installation(installation, repo, options = {})
  opts = ensure_api_media_type(:integrations, options)
  boolean_from_response :delete, "/installations/#{installation}/repositories/#{repo}", opts
end

#remove_repository_from_integration_installation(installation, repo, options = {}) ⇒ Object


128
129
130
131
132
133
134
135
136
# File 'lib/octokit/client/apps.rb', line 128

def remove_repository_from_integration_installation(installation, repo, options = {})
  octokit_warn(
    "Deprecated: Octokit::Client::Apps#remove_repository_from_integration_installation "\
    "method is deprecated. Please update your call to use "\
    "Octokit::Client::Apps#remove_repository_from_app_installation before the next major "\
    "Octokit version update."
  )
  remove_repository_from_app_installation(installation, repo, options)
end