File indexing completed on 2024-11-24 05:19:14
0001 <?php 0002 class FriendModel extends EModel { 0003 public function sendRequest($id) { 0004 $client = new OCSClient(EConfig::$data["ocs"]["host"]); 0005 $client->set_auth_info(OCSUser::login(), EHeaderDataParser::get_cookie("password")); 0006 $message="aaaa"; 0007 $postdata = array( 0008 "message"=>$message 0009 ); 0010 return $check = $client->post("/v1/friend/invite/$id", $postdata); 0011 } 0012 public function listFriends($id){ 0013 $client = new OCSClient(); 0014 $self = new OCSUser(); 0015 $client->set_auth_info($self->login(), EHeaderDataParser::get_cookie("password")); 0016 return $client->get("/v1/friend/data/$id"); 0017 } 0018 } 0019 0020 ?>