<?php
require_once "get_data_class_dev.php";

if($_REQUEST['api_name'] != ""){
	
	$ObjHandler = new ApiSdata();
	$api_name = $_REQUEST['api_name'];
	if($api_name == 'get_assigned_category'){
		$ObjHandler->get_assigned_category($_REQUEST);
	}else if($api_name == 'delete_changes'){
		$ObjHandler->discards_changes($_REQUEST);
	}else if($api_name == 'run_category_assignment'){
		$ObjHandler->run_category_assignment($_REQUEST);
	}else if($api_name == 'generate_content'){
		$post_id = $_REQUEST['post_report_id'];
		$collections = $_REQUEST['tbl'];
		$cmd = "nohup php content_generation_dev.php {$post_id} {$collections}  >/dev/null 2>&1 &";
		#print $cmd; die; 
		#php content_generation.php 2 demo_account_matched_category_list
		shell_exec($cmd);
	}
}



?>