Class: TicketMaster::Provider::Github::GithubComment
- Inherits:
-
Object
- Object
- TicketMaster::Provider::Github::GithubComment
- Includes:
- HTTParty
- Defined in:
- lib/github/github.rb
Constant Summary collapse
- URI =
'http://github.com/api/v2/json'
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#gravatar_id ⇒ Object
Returns the value of attribute gravatar_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#user ⇒ Object
Returns the value of attribute user.
Class Method Summary collapse
- .auth_params ⇒ Object
- .create(repo, number, comment) ⇒ Object
- .find_all(repo, number) ⇒ Object
- .secure ⇒ Object
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
7 8 9 |
# File 'lib/github/github.rb', line 7 def body @body end |
#created_at ⇒ Object
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/github/github.rb', line 7 def created_at @created_at end |
#gravatar_id ⇒ Object
Returns the value of attribute gravatar_id.
7 8 9 |
# File 'lib/github/github.rb', line 7 def gravatar_id @gravatar_id end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/github/github.rb', line 7 def id @id end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
7 8 9 |
# File 'lib/github/github.rb', line 7 def updated_at @updated_at end |
#user ⇒ Object
Returns the value of attribute user.
7 8 9 |
# File 'lib/github/github.rb', line 7 def user @user end |
Class Method Details
.auth_params ⇒ Object
19 20 21 |
# File 'lib/github/github.rb', line 19 def self.auth_params {:login => Octopi::Api.api.login, :token => Octopi::Api.api.token} end |
.create(repo, number, comment) ⇒ Object
15 16 17 |
# File 'lib/github/github.rb', line 15 def self.create(repo, number, comment) HTTParty.post("#{secure}/issues/comment/#{repo.username}/#{repo.name}/#{number}", :query => auth_params, :body => {:comment => comment}).parsed_response['comment'] end |
.find_all(repo, number) ⇒ Object
11 12 13 |
# File 'lib/github/github.rb', line 11 def self.find_all(repo, number) HTTParty.get("#{URI}/issues/comments/#{repo.username}/#{repo.name}/#{number}", :query => auth_params).parsed_response['comments'] end |
.secure ⇒ Object
23 24 25 |
# File 'lib/github/github.rb', line 23 def self.secure URI.gsub('http','https') end |