Class: IssuesComments

Inherits:
Object
  • Object
show all
Defined in:
lib/github/issues/issues_comments.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(github) ⇒ IssuesComments

Returns a new instance of IssuesComments.



4
5
6
# File 'lib/github/issues/issues_comments.rb', line 4

def initialize(github)
  @github = github
end

Instance Attribute Details

#githubObject

Returns the value of attribute github.



2
3
4
# File 'lib/github/issues/issues_comments.rb', line 2

def github
  @github
end

Instance Method Details

#deleteComment(repo, id, user = nil) ⇒ Object



36
37
38
39
# File 'lib/github/issues/issues_comments.rb', line 36

def deleteComment(repo, id, user=nil)
  url = 'repos/%s/%s/issues/comments/%s' % [user, repo, id]
  @github.delete(url)
end

#editComment(repo, id, body, user = nil) ⇒ Object



27
28
29
30
31
32
33
34
# File 'lib/github/issues/issues_comments.rb', line 27

def editComment(repo, id, body, user=nil)
  params = {
      :body => body
  }
  data = params.to_json
  url = 'repos/%s/%s/issues/comments/%s' % [user, repo, id]
  @github.patch(url, data)
end

#getIssueComment(repo, id, user = nil) ⇒ Object



13
14
15
16
# File 'lib/github/issues/issues_comments.rb', line 13

def getIssueComment(repo, id, user=nil)
  url = 'repos/%s/%s/issues/comments/%s' % [user, repo, id]
  @github.get(url)
end

#listIssueComments(repo, id, user = nil) ⇒ Object



8
9
10
11
# File 'lib/github/issues/issues_comments.rb', line 8

def listIssueComments(repo, id, user=nil)
  url = 'repos/%s/%s/issues/%s/comments' % [user, repo, id]
  @github.get(url)
end

#listIssues(repo, id, body, user = nil) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/github/issues/issues_comments.rb', line 18

def listIssues(repo, id, body, user=nil)
  params = {
      :body => body
  }
  data = params.to_json
  url = 'repos/%s/%s/issues/%s/comments' % [user, repo, id]
  @github.post(url, data)
end