View file api_docs/endpoints/fetch_likes/content.phtml

File size: 2.91Kb
<div class="content__inner">
    <h2>Fetch post likes</h2>
    <p>
        Please use this <strong>(<?php echo cl_link("mobile_api/fetch_likes"); ?>) API for access fetch post likes endpoint</strong> 
    </p>
    <p>
        <strong class="text-red tt-up">(Fetch Repost on Post) at the moment this option is not supported by the script core</strong> 
    </p>
    <br>
    <h4 class="table-title">Get parameters</h4>
    <table class="table table-bordered">
        <thead>
        <tr>
            <th width="15%">Field</th>
            <th width="25%">Value</th>
            <th width="45%">Remarks</th>
        </tr>
        </thead>
        <tbody>
            <tr>
                <td>session_id</td>
                <td>​Access token ID (Optional)</td>
                <td>
                    E.g. de25cc16eb00960f076...
                </td>
            </tr>
            <tr>
                <td>post_id</td>
                <td>​Liked/Unliked post int ID</td>
                <td>
                    E.g. 4567
                </td>
            </tr>
            <tr>
                <td>page_size</td>
                <td>​Total records limit for each request</td>
                <td>
                    Recommended: 20
                </td>
            </tr>
            <tr>
                <td>offset</td>
                <td>Last post offset ID</td>
                <td>
                    This is only needed when loading records of the pagination system.
                </td>
            </tr>
        </tbody>
    </table>
    <h4 class="table-title">Success response</h4>
    <div class="code-holder">
        <div class="code-holder-inner">
    <pre><code class="json">{
        "code": 200,
        "message": "Likes fetched successfully",
        "data": [
            {
                "offset_id": 3,
                "id": 7,
                "about": "",
                "followers": 3512,
                "posts": 4050,
                "avatar": "http://colibri.loc/upload/default/avatar.png",
                "last_active": "18 Nov, 20 04:11 PM",
                "username": "@dan_kassing",
                "fname": "Dan",
                "lname": "Kassing",
                "email": "ibragimov.ahmat.tl@gmail.com",
                "verified": "2",
                "name": "Dan Kassing",
                "url": "http://colibri.loc/@dan_kassing",
                "is_following": false,
                "is_user": false
            },
            {...},
            {...},
            {...}
        ]
    }
    </code></pre>
        </div>
    </div>
    <h4 class="table-title">Error responses</h4>
    <div class="code-holder">
        <div class="code-holder-inner">
    <pre><code class="json">
    {
        "code": 400,
        "message": "Post id is missing or invalid",
        "data": []
    }

    {
        "code": 404,
        "message": "No data found",
        "data": []
    }
    </code></pre>
        </div>
    </div>
</div>