File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ class Article
11
11
const PUBLISH_ARTICLE_URI = 'client-api/articles/publish ' ;
12
12
13
13
const GET_WRITER_INFO_URI = 'client-api/manpower/ ' ;
14
-
14
+
15
+ const GET_ARTICLE_MANPOWER = 'client-api/articles/manpower ' ;
16
+
15
17
/**
16
18
* base_uri
17
19
*
@@ -192,5 +194,22 @@ public function fetchWriter(Int $writer_id)
192
194
$ responseContent = json_decode ($ response ->getBody ()->getContents ());
193
195
return $ responseContent ->data ;
194
196
}
197
+
198
+ public function fetchArticleManpower (Int $ article_id )
199
+ {
200
+ $ request_uri = self ::GET_ARTICLE_MANPOWER ;
201
+ // Send a request to $request_uri
202
+ $ response = $ this ->client ->request ('GET ' , $ request_uri , [
203
+ 'headers ' => [
204
+ 'Authorization ' => 'Bearer ' . $ this ->token ,
205
+ 'Content-Type ' => 'application/json ' ,
206
+ 'Accesp ' => 'application/json '
207
+ ],
208
+ 'body ' => json_encode (["articles " => [$ article_id ]]),
209
+ ]);
210
+
211
+ $ responseContent = json_decode ($ response ->getBody ()->getContents ());
212
+ return $ responseContent ->data ;
213
+ }
195
214
}
196
215
You can’t perform that action at this time.
0 commit comments