src/CodeMojo/Client/Services/MetaService.php
public function add($key, $value, $valid_for_minutes = null){
        if(is_object($value) || is_array($value)){
            $value = json_encode($value);
        }

        $url = $this->authenticationService->getServerEndPoint() . Endpoints::VERSION . Endpoints::BASE_META . Endpoints::META;

        $result = $this->authenticationService->getTransport()->fetch($url,array("key"=>$key,"value"=>$value,"validity"=>$valid_for_minutes),'PUT',array(),0);

        if($result["code"] == APIResponse::RESPONSE_SUCCESS){
            return true;
        }else{
            return false;
        }
    }
public function add($key, $value, $valid_for_minutes = null){
        if(is_object($value) || is_array($value)){
            $value = json_encode($value);
        }

        $url = $this->authenticationService->getServerEndPoint() . Endpoints::VERSION . Endpoints::BASE_META . Endpoints::META;

        $result = $this->authenticationService->getTransport()->fetch($url,array("key"=>$key,"value"=>$value,"validity"=>$valid_for_minutes),'PUT',array(),0);

        if($result["code"] == APIResponse::RESPONSE_SUCCESS){
            return true;
        }else{
            return false;
        }
    }
public function add ( $ key , $ value , $ valid_for_minutes = null ) { if ( is_object ( $ value ) || is_array ( $ value ) ) { $ value = json_encode ( $ value ) ; } $ url = $ this -> authenticationService -> getServerEndPoint ( ) . Endpoints :: VERSION . Endpoints :: BASE_META . Endpoints :: META ; $ result = $ this -> authenticationService -> getTransport ( ) -> fetch ( $ url , array ( "key" => $ key , "value" => $ value , "validity" => $ valid_for_minutes ) , 'PUT' , array ( ) , 0 ) ; if ( $ result [ "code" ] == APIResponse :: RESPONSE_SUCCESS ) { return true ; } else { return false ; } }
Adds or Updates meta data for the key provided
@param $key
@param $value
@return bool
Adds or Updates meta data for the key provided