UofS-Pulse-Binfo / analyzedphenotypes

Tripal/Drupal support for analyzed phenotypic data including data loaders, exporters, trait pages and summaries on germplasm pages.
GNU General Public License v2.0
0 stars 1 forks source link

Reorganize the API #29

Closed reynoldtan closed 5 years ago

reynoldtan commented 6 years ago

Tripal API conventions:

Task

For all current API functions with the switch($property) approach, create new functions for each $property following the Tripal API Conventions. Where it makes sense, these new functions could be grouped in a separate file to keep the functions together.

reynoldtan commented 6 years ago

Updated GENUS API:

Test function calls:

// Fetch project genus by project name. $m = ap_get_projectgenus( array('project_name' => 'AGILE: Application of Genomic Innovation in the Lentil Economy') );

dpm($m);

// Fetch project genus by project id. $m = ap_get_projectgenus( array('project_id' => 63) );

dpm($m);

// Set project genus with replace option on. $project_id = 63; // Change to a different project with genus. ap_set_projectgenus( array('project_id' => $project_id, 'genus' => 'Cicer'), array('replace' => TRUE) );

$m = ap_get_projectgenus( array('project_id' => $project_id) );

dpm($m);

laceysanderson commented 6 years ago

Current Review Status

My Approach: review a file at a time since that roughly corresponds to an API above :-)