Skip to content

Instantly share code, notes, and snippets.

@iansltx iansltx/talks.php
Created Apr 30, 2019

Embed
What would you like to do?
List of everyone who has submitted Joind.in talk comments for a given event
<?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
You can’t perform that action at this time.