Module: BWAPI::Client::Projects::DataDownload

Included in:
BWAPI::Client::Projects
Defined in:
lib/bwapi/client/projects/data_download.rb

Overview

DataDownload module for projects/datadownload endpoints

Instance Method Summary collapse

Instance Method Details

#create_data_download(project_id, opts = {}) ⇒ Hash

Create a new data download in project

Options Hash (opts):

  • id (Integer)

    Id of the data download

  • queryId (Integer)

    Id of the query

  • userId (Integer)

    Id of the user

  • percentComplete (Int)

    The percentage complete of data download

  • status (String)

    The status of the download

  • queryName (String)

    The query name of the data download

  • endDate (Date)

    The end date of the data download

  • requestDate (Date)

    The request date of the data download

  • downloadLinkXLS (String)

    The link to download the XLS format

  • downloadLinkCSV (String)

    The link to download the CSV format

  • additionalColumns (Array)

    The additional columns for the data download



41
42
43
# File 'lib/bwapi/client/projects/data_download.rb', line 41

def create_data_download(project_id, opts = {})
  post "projects/#{project_id}/datadownload", opts
end

#data_downloads(project_id, opts = {}) ⇒ Hash

Get all data downloads in project

Options Hash (opts):

  • page (Integer)

    Page of projects to retrieve

  • pageSize (Integer)

    Results per page of results



12
13
14
# File 'lib/bwapi/client/projects/data_download.rb', line 12

def data_downloads(project_id, opts = {})
  get "projects/#{project_id}/datadownload", opts
end

#get_data_download(project_id, download_id) ⇒ Hash

Get a specific data download in project



21
22
23
# File 'lib/bwapi/client/projects/data_download.rb', line 21

def get_data_download(project_id, download_id)
  get "projects/#{project_id}/datadownload/#{download_id}"
end