|
...
|
...
|
@@ -138,10 +138,48 @@ class AyrShare |
|
|
|
'post'=>$data['post'],
|
|
|
|
'platforms'=>$data['platforms'],
|
|
|
|
'profileKey'=>$this->profile_key,
|
|
|
|
''=>
|
|
|
|
'mediaUrls'=>$data['mediaUrls']
|
|
|
|
];
|
|
|
|
$url = $this->path.'/api/post';
|
|
|
|
return $this->http_click('post',$url,$param);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :(创建子账户相关操作)post_create_profiles
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/5/5 15:16
|
|
|
|
*/
|
|
|
|
public function post_create_profiles($data){
|
|
|
|
$param = [
|
|
|
|
'title'=>$data['title'],
|
|
|
|
];
|
|
|
|
$url = $this->path.'/profiles/profile';
|
|
|
|
return $this->http_click('post',$url,$param);
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @name :(删除子账户相关操作)post_create_profiles
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/5/5 15:16
|
|
|
|
*/
|
|
|
|
public function deleted_create_profiles($data){
|
|
|
|
$param = [
|
|
|
|
'title'=>$data['title'],
|
|
|
|
'profileKey'=>$this->profile_key,
|
|
|
|
];
|
|
|
|
$url = $this->path.'/profiles/profile';
|
|
|
|
return $this->http_click('delete',$url,$param);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function put_update_profiles($data){
|
|
|
|
$param = [
|
|
|
|
'title'=>$data['title'],
|
|
|
|
'profileKey'=>$this->profile_key,
|
|
|
|
];
|
|
|
|
$url = $this->path.'/profiles/profile';
|
|
|
|
return $this->http_click('put',$url,$param);
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @name :(获取有关用户社交资料的分析和人口统计,例如印象,视图和关注着)post_social
|
|
|
|
* @author :lyh
|
|
...
|
...
|
@@ -170,7 +208,7 @@ class AyrShare |
|
|
|
$post_data['headers'] = !empty($header) ? $header : $this->headers;
|
|
|
|
$client = new Client();
|
|
|
|
try {
|
|
|
|
$res = $client->request($method, $url, $post_data)->getBody()->getContents();
|
|
|
|
$res = $client->request(strtoupper($method), $url, $post_data)->getBody()->getContents();
|
|
|
|
return $res;
|
|
|
|
} catch (\Exception $e) {
|
|
|
|
return json_encode(["status"=>"fail","message"=>$e->getMessage()]);
|
...
|
...
|
|