Created
April 30, 2019 18:09
-
-
Save iansltx/f069e4af146776c3b22186a72615ed8f to your computer and use it in GitHub Desktop.
List of everyone who has submitted Joind.in talk comments for a given event
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$eventId = 7021; | |
#$eventId = 7045; #Yorkshire, for testing | |
$comments = json_decode(file_get_contents('https://api.joind.in/v2.1/events/'.$eventId.'/talk_comments?resultsperpage=9999'), true)['comments']; | |
$users = []; | |
foreach ($comments as $comment) { | |
$users[$comment['user_display_name'] . ' (' . $comment['username'] . ')'] = true; | |
} | |
uksort($users, function($a, $b) { return strcasecmp($a, $b); }); | |
?> | |
<ol> | |
<?php foreach (array_keys($users) as $user): ?> | |
<li><?= $user ?></li> | |
<?php endforeach; ?> | |
</ol> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment