[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
1 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ final class ParlerBridge extends BridgeAbstract
private function fetchParlerProfileFeed(string $user): array 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([ CURLOPT_POSTFIELDS => http_build_query([
'user' => $user, 'user' => $user,
'page' => '1', 'page' => '1',
@ -75,6 +75,6 @@ final class ParlerBridge extends BridgeAbstract
if ($response->data === []) { if ($response->data === []) {
throw new \Exception('Unknown Parler username'); throw new \Exception('Unknown Parler username');
} }
return $response->data->posts; return $response->data;
} }
} }