<?php 

require_once "app/class-lime-manager.php"; 
require_once "app/class-user.php";

class context_limeapi extends context {
  
  
	function context_limeapi(){
			
		main::check_auth_session();
	}
	
	/**
	 * 
	 * Context Entry point, TESTING...
	 */
	
	function index()  {
	    	
		$user = new User(Session::get_user()->id);
		
		
		$limemanager = new LimeManager();
		
		$results = $limemanager->createToken(LS_TRAFFICKERS_SURVEY,$user);
		
		$token = $results[0];
		
		$properties = array("attribute_1" => "test1",
							"attribute_2" => "test2",
							"attribute_3" => "test3",
							"attribute_4" => "test4",
							"attribute_5" => "test5",
							"attribute_6" => "test6",		
							);
		
		$limemanager->setTokenProperties($token['tid'], LS_TRAFFICKERS_SURVEY, $properties);
		
		
	}
	

}
?>