Skip to content

Commit

Permalink
Merge pull request #41 from stadline/feature/user_tags
Browse files Browse the repository at this point in the history
add get user tags
  • Loading branch information
thomasglachant committed May 16, 2019
2 parents 87a36c2 + e924f69 commit c274a01
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Linkdata/Client/LinkdataClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,19 @@ private function getUrlFilters(?array $filters)
}
return $urlFilters;
}

/**
* @throws ClientHydraException
*/
public function getUserTags(string $userId): array
{
try {
return $this->getAdapter()->makeRequest(
'GET',
\sprintf('/v2/users/%s/tags', $userId)
)->getContent();
} catch (ClientHydraException $e) {
return [];
}
}
}

0 comments on commit c274a01

Please sign in to comment.