Tripal Plant PopGen Submit
|
Go to the source code of this file.
Functions | |
tpps_api_call ($type, $id=NULL, array $query=array()) | |
tpps_api_check_accession ($accession=NULL) | |
tpps_api_compress_files ($accession=NULL) | |
tpps_api_paths () | |
tpps_api_refresh_views () | |
Main file for the TPPS API.
This file includes the other TPPS API files, defines required paths that TPPS uses for its api, provides a function which can be used to call the API internally, and a function to verify that a provided accession number has a valid TPPS submission associated with it.
Definition in file tpps.api.inc.
tpps_api_call | ( | $type, | |
$id = NULL , |
|||
array | $query = array() |
||
) |
Performs a TPPS API call.
This function will perform an internal call to the TPPS API. It constructs a TPPS API url, performs a get request, and decodes the resulting JSON object.
string | $type | The base API path to be called. |
string | $id | An id to be passed to the base API path. (Optional) |
array | $query | Any additional query arguments to be passed to the API. |
Definition at line 131 of file tpps.api.inc.
tpps_api_check_accession | ( | $accession = NULL | ) |
Verifies an existing TPPS accession number.
If the provided accession has a valid existing TPPS submission, return TRUE. Otherwise, return FALSE.
string | $accession | The accession to be verified. |
Definition at line 160 of file tpps.api.inc.
tpps_api_compress_files | ( | $accession = NULL | ) |
Creates and downloads a .zip file of all relevant files for the submission.
string | $accession | The accession number of the submission with the associated files. |
Definition at line 174 of file tpps.api.inc.
tpps_api_paths | ( | ) |
Defines TPPS API paths.
This function is called from the tpps_menu() function and returns the menu items that TPPS will use for its API. All API paths start with tpps/api/
and return their data as JSON objects. The api paths include: check_accession/<accession number>=""> submission/<accession number>=""> submissions?<arguments> submission_info?<arguments> Details about each of the paths can be found in the inline documentation of this function, as well as the documentation for each of the functions the API calls.
Definition at line 33 of file tpps.api.inc.
tpps_api_refresh_views | ( | ) |
Definition at line 209 of file tpps.api.inc.