32 #ifndef MODULES_CMR_MODULE_CMRAPI_H_
33 #define MODULES_CMR_MODULE_CMRAPI_H_
37 #include "rapidjson/document.h"
38 #include "BESCatalogUtils.h"
47 std::string cmr_search_endpoint_url;
57 void granule_search(std::string collection_name, std::string r_year, std::string r_month, std::string r_day,
rapidjson::Document &result_doc);
61 CmrApi() : cmr_search_endpoint_url(
"https://cmr.earthdata.nasa.gov/search") {}
63 void get_years(std::string collection_name, std::vector<std::string> &years_result);
64 void get_months(std::string collection_name, std::string year, std::vector<std::string> &months_result);
65 void get_days(std::string collection_name, std::string r_year, std::string r_month, std::vector<std::string> &days_result);
66 void get_granule_ids(std::string collection_name, std::string r_year, std::string r_month, std::string r_day, std::vector<std::string> &granules_result);
67 void get_granule_ids(std::string collection_name, std::string r_year, std::string r_month, std::vector<std::string> &granules_result);
68 void get_granules(std::string collection_name, std::string r_year, std::string r_month, std::string r_day, std::vector<cmr::Granule *> &granules);
69 void get_collection_ids(std::vector<std::string> &collection_ids);
70 unsigned long granule_count(std::string collection_name,std:: string r_year, std::string r_month, std::string r_day);
72 cmr::Granule *get_granule(std::string collection_name, std::string r_year, std::string r_month, std::string r_day, std::string granule_id);