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

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

Instance Method Summary collapse

Instance Method Details

#create_datadownload(id, opts = {}) ⇒ Hashie::Mash

Create a new data download in project

Parameters:

  • id (Integer)

    Id of project

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

    options hash of parameters

Options Hash (opts):

  • projectId (Integer)

    Id of the project

  • id (Integer)

    Id of the data download

  • queryId (Integer)

    Id of the query

  • 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

Returns:

  • (Hashie::Mash)

    New data download



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

def create_datadownload id, opts={}
  get "projects/#{id}/datadownload", opts
end

#data_downloads(id, opts = {}) ⇒ Hashie::Mash

Get all data downloads in project

Parameters:

  • id (Integer)

    Id of project

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

    a customizable set of options

Options Hash (opts):

  • page (Integer)

    Page of projects to retrieve

  • pageSize (Integer)

    Results per page of results

Returns:

  • (Hashie::Mash)

    All data downloads in project



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

def data_downloads id, opts={}
  get "projects/#{id}/datadownload", opts
end

#get_data_download(project_id, data_download_id) ⇒ Hashie::Mash Also known as: data_download

Get a specific data download in project

Parameters:

  • project_id (Integer)

    Id of project

  • data_download_id (Integer)

    Id of data download

Returns:

  • (Hashie::Mash)

    Specific data download



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

def get_data_download project_id, data_download_id
  get "projects/#{project_id}/datadownload#{data_download_id}"
end