oembed) { return $this->oembed; } $endpoint = $this->format($this->config->get('endpoint', '')); if (!$endpoint) { return []; } $response = \Requests::get($endpoint); if (!$response->success) { $response->throw_for_status(); } $json = json_decode($response->body, true); $this->oembed = [ 'type' => 'rich', 'title' => $json['files'], 'description' => $json['description'], 'author_name' => $json['owner'], 'author_url' => 'https://github.com/' . $json['owner'], 'provider' => 'GitHub', 'provider_url' => 'https://gist.github.com/', 'url' => 'https://gist.github.com/' . $this->embedCode, 'html' => $json['div'], ]; $this->config->join('assets', [$json['stylesheet']]); return $this->oembed; } }