Module: BWAPI::Client::Projects::Queries::Backfill

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

Overview

Backfill module for projects/queries/backfill endpoints

Instance Method Summary collapse

Instance Method Details

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

Get all backfills for query

Parameters:

  • project_id (Integer) —

    Id of project

  • query_id (Integer) —

    Id of query

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

    options hash of parameters

Options Hash (opts):

  • page (Integer) —

    Page of results to retrieve

  • pageSize (Integer) —

    Results per page

Returns:

  • (Hashie::Mash) —

    All backfills for query



16
17
18
# File 'lib/bwapi/client/projects/queries/backfill.rb', line 16

def backfills project_id, query_id, opts={}
  get "projects/#{project_id}/queries/#{query_id}/backfill", opts
end

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

Create new backfill for query

Parameters:

  • project_id (Integer) —

    Id of project

  • query_id (Integer) —

    Id of query

  • 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 backfill

  • mentionsFound (Integer) —

    Mentions found from the backfill

  • maxDate (Date) —

    Max date for the backfill

  • minDate (Date) —

    Min date for the backfill

  • status (String) —

    Status of backfill

  • queryId (Integer) —

    Query id of backfill

  • statusMessages (String) —

    Current status message of backfill

Returns:

  • (Hashie::Mash) —

    New backfill for query



46
47
48
# File 'lib/bwapi/client/projects/queries/backfill.rb', line 46

def create_backfill project_id, query_id, opts={}
  post "projects/#{project_id}/queries/#{query_id}/backfill", opts
end

#delete_backfill(project_id, query_id, backfill_id) ⇒ Hashie::Mash

Delete backfill for query

Parameters:

  • project_id (Integer) —

    Id of project

  • query_id (Integer) —

    Id of query

  • backfill_id (Integer) —

    Id of backfill

Returns:

  • (Hashie::Mash) —

    Deleted backfill for query



56
57
58
# File 'lib/bwapi/client/projects/queries/backfill.rb', line 56

def delete_backfill project_id, query_id, backfill_id
  delete "projects/#{project_id}/queries/#{query_id}/backfill/#{backfill_id}"
end

#get_backfill(project_id, query_id, backfill_id) ⇒ Hashie::Mash Also known as: backfill

Get specific backfill for query

Parameters:

  • project_id (Integer) —

    Id of project

  • query_id (Integer) —

    Id of query

  • backfill_id (Integer) —

    Id of backfill

Returns:

  • (Hashie::Mash) —

    Backfill for query



26
27
28
# File 'lib/bwapi/client/projects/queries/backfill.rb', line 26

def get_backfill project_id, query_id, backfill_id
  get "projects/#{project_id}/queries/#{query_id}/backfill/#{backfill_id}"
end