API Documentation (API Version: 1.1)

Our API allows you to retrieve informations from our website via GET request and supports the following query parameters:

Name Meaning Values Description Required
type Query type. user_data,posts_data,search This parameter specify the type of the query.
user Username. USERNAME This parameter specify the username
keyword Keyword for search KEYWORD This parameter specify the search keyword
limit Limit of items. LIMIT This parameter specify the limit of items. Max:100 | Default:20
gender Gender filter for search male,female This parameter specify the users gender
image Avatar filter for search yes,no This parameter specify the users avatar

Examples of requests:


For profile information from an user:
http://www.destinyjunkie.com/api.php?type=user_data&user=USERNAME

For a list of posts from an user:
http://www.destinyjunkie.com/api.php?type=posts_data&user=USERNAME&limit=LIMIT

For a list of users from search:
http://www.destinyjunkie.com/api.php?type=search&keyword=KEYWORD&limit=LIMIT&image=yes&gender=male

An example of json decoding:


PHP:
<?php
header('Content-Type: text/plain; charset=utf-8;'); 
$json_file = file_get_contents("http://www.destinyjunkie.com/api.php?type=user_data&user=USERNAME");
Jsonoutput
{
    "api_status": "success",
    "api_version": "1.0",
    "user_data": {
        "id": "",
        "username": "",
        "first_name": "",
        "last_name": "",
        "gender": "",
        "birthday": "",
        "about": "",
        "website": "",
        "facebook": "",
        "twitter": "",
        "vk": "",
        "google+": "",
        "profile_picture": "",
        "cover_picture": "",
        "verified": "",
        "url": ""
    }
}
$json_data = json_decode($json_file);
print_r($json_data);
?>
PHP arrayoutput
Array
(
    [api_status] => success
    [api_version] => 1.0
    [user_data] => Array
        (
            [id] => 
            [username] => 
            [first_name] => 
            [last_name] => 
            [gender] => 
            [birthday] => 
            [about] => 
            [website] => 
            [facebook] => 
            [twitter] => 
            [vk] => 
            [google+] => 
            [profile_picture] => 
            [cover_picture] => 
            [verified] => 
            [url] => 
        )

)

JavaScript:
var url = 'http://www.destinyjunkie.com/api.php?type=user_data&user=USERNAME';
$.getJSON(url, function (json) {
    ....
});