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

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

Instance Method Summary collapse

Instance Method Details

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

Get all backfills for query

Options Hash (opts):

  • page (Integer)

    Page of results to retrieve

  • pageSize (Integer)

    Results per page



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

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

Create new backfill for query

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



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

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



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

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



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