Class: UniversalGitClient::Client
- Inherits:
-
Object
- Object
- UniversalGitClient::Client
- Defined in:
- lib/universal-git-client/client.rb
Instance Attribute Summary collapse
-
#http_client ⇒ Object
readonly
Returns the value of attribute http_client.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
Instance Method Summary collapse
- #branch(*args) ⇒ Object
- #branches(*args) ⇒ Object
- #delete_repo_webhook(*args) ⇒ Object
- #download_repo_archive(*args) ⇒ Object
-
#initialize(provider, http_client) ⇒ Client
constructor
A new instance of Client.
- #orga_repos(*args) ⇒ Object
- #organizations(*args) ⇒ Object
- #repository(*args) ⇒ Object
- #setup_repo_webhook(*args) ⇒ Object
- #user ⇒ Object
- #user_repos(*args) ⇒ Object
Constructor Details
#initialize(provider, http_client) ⇒ Client
Returns a new instance of Client.
12 13 14 15 |
# File 'lib/universal-git-client/client.rb', line 12 def initialize(provider, http_client) @provider = provider @http_client = http_client end |
Instance Attribute Details
#http_client ⇒ Object (readonly)
Returns the value of attribute http_client.
10 11 12 |
# File 'lib/universal-git-client/client.rb', line 10 def http_client @http_client end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
10 11 12 |
# File 'lib/universal-git-client/client.rb', line 10 def provider @provider end |
Instance Method Details
#branch(*args) ⇒ Object
47 48 49 50 |
# File 'lib/universal-git-client/client.rb', line 47 def branch(*args) response = http_client.branch(*args) normalize(response, :Branch) end |
#branches(*args) ⇒ Object
42 43 44 45 |
# File 'lib/universal-git-client/client.rb', line 42 def branches(*args) response = http_client.branches(*args) normalize(response, :Branch) end |
#delete_repo_webhook(*args) ⇒ Object
61 62 63 |
# File 'lib/universal-git-client/client.rb', line 61 def delete_repo_webhook(*args) http_client.delete_repo_webhook(*args) end |
#download_repo_archive(*args) ⇒ Object
52 53 54 |
# File 'lib/universal-git-client/client.rb', line 52 def download_repo_archive(*args) http_client.download_repo_archive(*args) end |
#orga_repos(*args) ⇒ Object
32 33 34 35 |
# File 'lib/universal-git-client/client.rb', line 32 def orga_repos(*args) response = http_client.orga_repos(*args) normalize(response, :Repository) end |
#organizations(*args) ⇒ Object
22 23 24 25 |
# File 'lib/universal-git-client/client.rb', line 22 def organizations(*args) response = http_client.organizations(*args) normalize(response, :Organization) end |
#repository(*args) ⇒ Object
37 38 39 40 |
# File 'lib/universal-git-client/client.rb', line 37 def repository(*args) response = http_client.repository(*args) normalize(response, :Repository) end |
#setup_repo_webhook(*args) ⇒ Object
56 57 58 59 |
# File 'lib/universal-git-client/client.rb', line 56 def setup_repo_webhook(*args) response = http_client.setup_repo_webhook(*args) normalize(response, :Webhook) end |
#user ⇒ Object
17 18 19 20 |
# File 'lib/universal-git-client/client.rb', line 17 def user response = http_client.user normalize(response, :User) end |
#user_repos(*args) ⇒ Object
27 28 29 30 |
# File 'lib/universal-git-client/client.rb', line 27 def user_repos(*args) response = http_client.user_repos(*args) normalize(response, :Repository) end |