Module: SeeClickFix::Client::Comments

Included in:
SeeClickFix::Client
Defined in:
lib/seeclickfix/client/comments.rb

Instance Method Summary collapse

Instance Method Details

#create_comment(issue, comment, comment_email, options = {}) ⇒ Array<Hashie::Mash>

Add a comment to an issue

Examples:

SeeClickFix.create_comment("7000", "hello", "[email protected]")

Parameters:

  • issue (String)

    The issue number for the query

  • api_key (String)

    API Key

  • comment (String)

    Comment to add

  • comment_email (String)

    Email of the person making the comment

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Array<Hashie::Mash>)

See Also:



32
33
34
# File 'lib/seeclickfix/client/comments.rb', line 32

def create_comment(issue, comment, comment_email, options={})
  post("api/issues/#{issue}/comments.json?comment[comment]=#{comment}&comment[email]=#{comment_email}", options)
end

#list_comments(issue, options = {}) ⇒ Array<Hashie::Mash>

Use this query the comments and history of a single issue.

Examples:

SeeClickFix.list_comments("1050")

Parameters:

  • issue (String)

    The issue number for the query

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Array<Hashie::Mash>)

See Also:



13
14
15
# File 'lib/seeclickfix/client/comments.rb', line 13

def list_comments(issue, options={})
  get("api/issues/#{issue}/comments.json", options)
end