Ejemplo n.º 1
0
        // Only execute requests if validated
        if (!$Authenticated) {
            $Out->pushError('Validation failed.');
        } else {
            switch (strtolower($_REQUEST['query'])) {
                case 'location':
                    $Out->pushValue('result', api_query_location($Parameter));
                    break;
                case 'user':
                    $Out->pushValue('result', api_query_user($Parameter));
                    break;
                case 'raid':
                    $Out->pushValue('result', api_query_raid($Parameter));
                    break;
                case 'statistic':
                    $Out->pushValue('result', api_query_statistic($Parameter));
                    break;
                default:
                    $Out->pushError('Unknown query type ' . $_REQUEST['query']);
                    break;
            }
        }
    }
}
// Output response
switch ($ResultFormat) {
    case 'xml':
        $Out->flushXML('Api');
        break;
    default:
    case 'json':
Ejemplo n.º 2
0
 public static function queryStatistic($aParameter)
 {
     return api_query_statistic($aParameter);
 }