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 = {}) ⇒ Hash

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:

  • (Hash)

    All backfills for query



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

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

#create_backfill(project_id, query_id, opts = {}) ⇒ Hash

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:

  • (Hash)

    New backfill for query



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

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) ⇒ Hash

Delete backfill for query

Parameters:

  • project_id (Integer)

    Id of project

  • query_id (Integer)

    Id of query

  • backfill_id (Integer)

    Id of backfill

Returns:

  • (Hash)

    Deleted backfill for query



54
55
56
# File 'lib/bwapi/client/projects/queries/backfill.rb', line 54

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) ⇒ Hash

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:

  • (Hash)

    Backfill for query



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

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