add shields mood endpoint
This commit is contained in:
parent
c445b988e8
commit
631dcfde48
@ -5,7 +5,8 @@
|
||||
</div>
|
||||
<div class='window-content'>
|
||||
<ul>
|
||||
<li><a href="shields-posts.php">shields posts endpoint</a></li>
|
||||
<li><a href="shields-posts.php">shields.io posts endpoint</a></li>
|
||||
<li><a href="shields-mood.php">shields.io mood endpoint</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
18
api/shields-mood.php
Normal file
18
api/shields-mood.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
header('Content-Type: application/json');
|
||||
require "../templates/config.php";
|
||||
?>
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "current mood",
|
||||
"color": "lightgrey",
|
||||
<?php
|
||||
require "../creds.php";
|
||||
|
||||
$result = mysqli_query($mysqli, "SELECT Mood FROM articles ORDER BY ID DESC LIMIT 1");
|
||||
|
||||
while($res = mysqli_fetch_array($result)) {
|
||||
echo ' "message": "'.$res['Mood'].'"',"\n";
|
||||
}
|
||||
?>
|
||||
}
|
Loading…
Reference in New Issue
Block a user