User

All User methods are available under \RealDebrid\RealDebrid()->user namespace.

Note

In order to use any of these methods, remember to create a RealDebrid client.

Please refer to the Creating a client section if you didn’t do it.

get()

Returns some information on the current user.

Return

The user information as a \RealDebrid\Response\User

This method is using an example of Response Handler.

{
    "id": 214239,
    "username": "USERNAME",
    "email": "me@mail.fr",
    "points": 950,
    "locale": "fr",
    "avatar": "https://cdn.realdebrid.xtnetwork.fr/images/avatars/MON_AVATAR",
    "type": "premium",
    "premium": 3656961,
    "expiration": "2016-01-21T19:37:40.000Z"
}

Examples

<?php
$user = $realDebrid->user->get();