API Documentation
Our API allows you to retrieve informations from our website via GET request and supports the following query parameters:
For profile information from an user:
For a list of latest 20 messages from an user:
An example of json decoding would be the following PHP code:
Name | Meaning | Description |
t (required) | Query type. | This parameter specify the type of the query, u is for profile informations, m is for messages informations. |
q (required) | Requested username id. | The t parameter supports two values:
|
Examples of requests:
For profile information from an user:
http://stih-pm.ac.id/pasal//api.php?t=u&q=USER_ID
For a list of latest 20 messages from an user:
http://stih-pm.ac.id/pasal//api.php?t=m&q=USER_ID
An example of json decoding would be the following PHP code:
<?php
header('Content-Type: text/plain; charset=utf-8;');
$file = file_get_contents("http://stih-pm.ac.id/pasal//api.php?t=m&q=USER_ID");
print_r(json_decode($file));
?>