Module: BWAPI::Client::Projects::Data::Mentions::Notes

Included in:
BWAPI::Client::Projects::Data::Mentions
Defined in:
lib/bwapi/client/projects/data/mentions/notes.rb

Overview

Notes module for data/mentions/#resource_id/notes endpoints

Instance Method Summary collapse

Instance Method Details

#create_mention_note(project_id, resource_id, opts = {}) ⇒ Hash

Post a new note for a mention

Parameters:

  • project_id (Integer)

    Id of project

  • resource_id (Integer)

    Id of mention

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

    options hash of parameters

Options Hash (opts):

  • project_id (Integer)

    the id of the project the mention is in

  • resource_id (Integer)

    the id of the mention

  • text (String)

    the text of the note

Returns:

  • (Hash)

    the new note



17
18
19
# File 'lib/bwapi/client/projects/data/mentions/notes.rb', line 17

def create_mention_note(project_id, resource_id, opts = {})
  post "projects/#{project_id}/data/mentions/#{resource_id}/notes", opts
end

#mention_note(project_id, resource_id, note_id) ⇒ Hash

Get a note for a mention

Parameters:

  • project_id (Integer)

    Id of project

  • resource_id (Integer)

    Id of mention

  • note_id (Integer)

    Id of the note

Returns:

  • (Hash)

    the selected note



27
28
29
# File 'lib/bwapi/client/projects/data/mentions/notes.rb', line 27

def mention_note(project_id, resource_id, note_id)
  get "projects/#{project_id}/data/mentions/#{resource_id}/notes/#{note_id}"
end

#patch_mention_note(project_id, resource_id, note_id, opts = {}) ⇒ Hash

Patch an existing note for a mention

Parameters:

  • project_id (Integer)

    Id of project

  • resource_id (Integer)

    Id of mention

  • note_id (Integer)

    Id of the note

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

    options hash of parameters

Options Hash (opts):

  • prependNote (String)

    the text of the note

Returns:

  • (Hash)

    the patched note



53
54
55
# File 'lib/bwapi/client/projects/data/mentions/notes.rb', line 53

def patch_mention_note(project_id, resource_id, note_id, opts = {})
  patch "projects/#{project_id}/data/mentions/#{resource_id}/notes/#{note_id}", opts
end

#update_mention_note(project_id, resource_id, note_id, opts = {}) ⇒ Hash

Put an existing note for a mention

Parameters:

  • project_id (Integer)

    Id of project

  • resource_id (Integer)

    Id of mention

  • note_id (Integer)

    Id of the note

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

    options hash of parameters

Options Hash (opts):

  • project_id (Integer)

    the id of the project the mention is in

  • resource_id (Integer)

    the id of the mention

  • text (String)

    the text of the note

Returns:

  • (Hash)

    the edited note



41
42
43
# File 'lib/bwapi/client/projects/data/mentions/notes.rb', line 41

def update_mention_note(project_id, resource_id, note_id, opts = {})
  put "projects/#{project_id}/data/mentions/#{resource_id}/notes/#{note_id}", opts
end