protected function request($method, $path, $getParameters = [], $postParameters = [], $files = []) { $request = new ResourceRequest($method, $this->getApiUrl($path, $getParameters), $this->config->getAppID(), $this->config->getAppSecret(), $this->config->getAccessTokenKey(), $this->config->getAccessTokenSecret(), SignatureMethods::SIGNATURE_HMAC_SHA1); foreach ($postParameters as $key => $value) { $request->setPostParameter($key, $value); } foreach ($files as $name => $file) { $request->addFile($name, $file); } $transporter = $this->getTransporter($request); $transporter->send(); $this->response = $transporter->getResponse(); $this->responseData = json_decode($this->response->getBody()); }