Class: Github::Client
- Inherits:
-
Object
show all
- Defined in:
- lib/github/client.rb
Defined Under Namespace
Classes: EntityError, Response
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(resource) ⇒ Client
Returns a new instance of Client.
17
18
19
|
# File 'lib/github/client.rb', line 17
def initialize(resource)
@resource = resource
end
|
Class Method Details
.connect(base_url, user = nil, pass = nil) ⇒ Object
8
9
10
|
# File 'lib/github/client.rb', line 8
def connect(base_url, user = nil, pass = nil)
new RestClient::Resource.new(base_url, user, pass)
end
|
.proxy=(proxy_host) ⇒ Object
12
13
14
|
# File 'lib/github/client.rb', line 12
def proxy=(proxy_host)
RestClient.proxy = proxy_host
end
|
Instance Method Details
#delete(path) ⇒ Object
33
34
35
|
# File 'lib/github/client.rb', line 33
def delete(path)
request :delete, path
end
|
#get(path) ⇒ Object
21
22
23
|
# File 'lib/github/client.rb', line 21
def get(path)
request :get, path
end
|
#head(path) ⇒ Object
37
38
39
|
# File 'lib/github/client.rb', line 37
def head(path)
request :head, path
end
|
#post(path, data) ⇒ Object
25
26
27
|
# File 'lib/github/client.rb', line 25
def post(path, data)
request :post, path, data
end
|
#put(path, data) ⇒ Object
29
30
31
|
# File 'lib/github/client.rb', line 29
def put(path, data)
request :put, path, data
end
|