Our API allows you to retrieve informations from our website via
GET request and supports the following query parameters:
Name | Description |
a (required) | This parameter specify the type of the query, user is for profile informations, answer is for answer informations. |
q (required) | The a parameter supports two values:- user => username [returns basic user informations containing the following]
id = returns the user Unique Idusername = returns the Usernamefull_name = returns the Namestats = returns a list with stats
location = returns the locationimages = returns a list with profile imagescover = returns the profile cover imageverified = returns 1 if user profile is verified or 0 if isn't verified answer => id [returns details about an answer, based on answer id]id = returns the Message Unique Idpost_url = returns the answer URLlang = returns the Language short codelike_count = returns the number of likesphoto_url = returns the answer photo URL (if any)animated_photo = returns true if the photo is a GIF image
|
Examples of requests:
For profile information from an user:
http://askinger.org/api.php?a=user&q=USERNAME
For informations about an answer:
http://askinger.org/api.php?a=answer&q=ANSWER_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://askinger.org/api.php?a=user&q=USERNAME');
print_r(json_decode($file));
?>