Module: BWAPI::Client::Projects::Queries::Mentions

Included in:
BWAPI::Client::Projects::Queries
Defined in:
lib/bwapi/client/projects/queries/mentions.rb

Overview

Mentions module for projects/queries/mentions endpoints

Instance Method Summary collapse

Instance Method Details

#delete_query_mention(project_id, query_id, mention_id, opts = {}) ⇒ Hashie::Mash

Delete query mention

Parameters:

  • project_id (Integer)

    Id of project

  • query_id (Integer)

    Id of query

  • mention_id (Integer)

    Id of mention

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

    options hash of parameters

Options Hash (opts):

  • projectId (Integer)

    Id of the project

  • queryId (Integer)

    Id of the query

  • id (Integer)

    Id of the mention

  • Map (Hash)

    patch to be applied

Returns:

  • (Hashie::Mash)

    Deleted query mention



44
45
46
# File 'lib/bwapi/client/projects/queries/mentions.rb', line 44

def delete_query_mention(project_id, query_id, mention_id, opts = {})
  delete "projects/#{project_id}/queries/#{query_id}/mentions/#{mention_id}", opts
end

#get_query_mention_content(project_id, query_id, mention_id) ⇒ Hashie::Mash

Get the full text of query mention

Parameters:

  • project_id (Integer)

    Id of project

  • query_id (Integer)

    Id of query

  • mention_id (Integer)

    Id of mention

Returns:

  • (Hashie::Mash)

    Content of query mention



14
15
16
# File 'lib/bwapi/client/projects/queries/mentions.rb', line 14

def get_query_mention_content(project_id, query_id, mention_id)
  get "projects/#{project_id}/queries/#{query_id}/mentions/#{mention_id}/content"
end

#update_query_mention(project_id, query_id, mention_id, opts = {}) ⇒ Hashie::Mash

Update query mention

Parameters:

  • project_id (Integer)

    Id of project

  • query_id (Integer)

    Id of query

  • mention_id (Integer)

    Id of mention

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

    options hash of parameters

Options Hash (opts):

  • projectId (Integer)

    Id of the project

  • queryId (Integer)

    Id of the query

  • id (Integer)

    Id of the mention

  • MentionPatchDTO (Hash)

    patch to be applied

Returns:

  • (Hashie::Mash)

    Updated query mention



29
30
31
# File 'lib/bwapi/client/projects/queries/mentions.rb', line 29

def update_query_mention(project_id, query_id, mention_id, opts = {})
  patch "projects/#{project_id}/queries/#{query_id}/mentions/#{mention_id}", opts
end