Example #1
0
 public static function getApi($api_key = NULL)
 {
     if (empty($api_key)) {
         $api_key = Config::g('onenet_masterkey');
     }
     if (!is_object(self::$_apis[$api_key])) {
         $master_key = Config::g('onenet_masterkey');
         self::$_apis[$api_key] = new OneNetApi($api_key, Config::g('RESTfulUrl'));
     }
     return self::$_apis[$api_key];
 }