Closed n4ncy closed 7 years ago
2 'request' => 'POST /v3/access_token HTTP/1.1^M
3 Host: oauth.brightcove.com^M
4 Authorization: Basic**TOKEN**^M
5 Accept: */*^M
6 Content-Type: application/x-www-form-urlencoded^M
7 Content-Type: application/json^M
8 Content-Length: 29^M
9 ^M
10 ',
11 'request_body' => 'grant_type=client_credentials',
12 'response' =>
13 array (
14 0 => 200,
15 1 => '{"access_token":"**TOKEN**","token_type":"Bearer","expires_in":300}',
16 ),
17 'response_headers' => 'HTTP/1.1 200 OK^M
18 Date: Mon, 06 Nov 2017 15:15:28 GMT^M
19 Strict-Transport-Security: max-age=7776000; includeSubDomains^M
20 Cache-Control: no-store^M
21 Pragma: no-cache^M
22 Content-Type: application/json;charset=UTF-8^M
23 Content-Length: 540^M
24 Server: Jetty(7.x.y-SNAPSHOT)^M
25 ^M
26 ',
27 )
28
Here is a snippet from the debug log
I'm trying to call listVideos() but I keep getting the error.
Error
Fatal error: Using $this when not in object context in /Users/*/*/Brightcove/Assetlist/lib/Brightcove/API/CMS.php on line 18
Line 18
return $this->client->request($method, 'cms', $this->account, $endpoint, $result, $is_array, $post);
I presume this is happening because of account and client not being assigned in API.php