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:

  • Id of project

  • Id of query

  • (defaults to: {})

    options hash of parameters

Options Hash (opts):

  • page (Integer)

    Page of results to retrieve

  • pageSize (Integer)

    Results per page

Returns:

  • 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"
end

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

Create new backfill for query

Parameters:

  • Id of project

  • Id of query

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

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

  • Id of project

  • Id of query

  • Id of backfill

Returns:

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

  • Id of project

  • Id of query

  • Id of backfill

Returns:

  • 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