[Parler] fix: use new api endpoint (#2831)

They also modified the json structure.
This commit is contained in:
Dag 2022-06-17 21:18:29 +02:00 committed by GitHub
parent 10eb1c9a95
commit c6ba3e5280
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,7 @@ final class ParlerBridge extends BridgeAbstract
private function fetchParlerProfileFeed(string $user): array
{
$json = getContents('https://parler.com/open-api/profile-feed.php', [], [
$json = getContents('https://parler.com/open-api/ProfileFeedEndpoint.php', [], [
CURLOPT_POSTFIELDS => http_build_query([
'user' => $user,
'page' => '1',
@ -75,6 +75,6 @@ final class ParlerBridge extends BridgeAbstract
if ($response->data === []) {
throw new \Exception('Unknown Parler username');
}
return $response->data->posts;
return $response->data;
}
}