<?php
/*
Template Name: API Search
*/


$type = isset($_GET['type']) ? sanitize_text_field($_GET['type']) : '';
switch ($type) {
    case 'decisionmakers':
        conikal_api_search_decisionmakers();
        break;
    case 'organizations':
        conikal_api_search_organizations_position();
        break;
    case 'position':
        conikal_api_search_organizations_position('decisionmakers_title');
        break;
    case 'topics':
        conikal_api_search_topics();
        break;
    case 'give_tags':
        conikal_api_search_topics('give_forms_tag');
        break;
    case 'petition':
        conikal_api_search_petitions();
        break;
    case 'phone_code':
        conikal_country_phone_codes();
        break;
    case 'country':
        conikal_country_list_api();
        break;
    default:
        conikal_api_search_petitions();
        break;
}


?>