Module: BWAPI::Client::Projects::Research

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

Overview

Research module for research projects endpoints

Instance Method Summary collapse

Instance Method Details

#get_research_projects(opts = {}) ⇒ Hash

Get all research projects

Parameters:

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

    options hash of parameters

Options Hash (opts):

  • page (Integer) —

    Page of results to retrieve

  • pageSize (Integer) —

    Results per page of results

Returns:

  • (Hash) —

    All research projects



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

def get_research_projects(opts = {})
  get 'projects/published', opts
end

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

Edits a published project and returns the published attributes

Parameters:

  • project_id (Integer) —

    projectId Project Id to retrieve/edit

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

    options hash of parameters

Options Hash (opts):

  • imageUrl (String) —

    Research project picture

  • published (Boolean) —

    Is published in Research Store

Returns:

  • (Hash) —

    Specific edited research project



23
24
25
# File 'lib/bwapi/client/projects/research.rb', line 23

def update_research_projects(project_id, opts = {})
  put "projects/published/#{project_id}", opts
end