src/unifi_api/api.py
def list_sessions_latest(self, client_mac, limit=5, site='default'):
        '''
            Get latest login sessions for a given client
            -------------------------
            returns an array of login sessions for a single client on a site
            params:
                Name        | required  | description
                -----------------------------------------
                client_mac  |   True    | client mac to get sessions
                limit       |   False   | latest `limit` sessions will be returned, defaults to 5
                site        |   False   | site name to get sessions, defaults to `default`
        '''
        data = {
            'mac': client_mac,
            '_limit': limit,
            '_sort': '-assoc_time',
        }

        r = self.get(self.endpoint('/api/s/%s/stat/session' % site), json=data)
        return self.process_response(r)

            Get latest login sessions for a given client
            -------------------------
            returns an array of login sessions for a single client on a site
            params:
                Name        | required  | description
                -----------------------------------------
                client_mac  |   True    | client mac to get sessions
                limit       |   False   | latest `limit` sessions will be returned, defaults to 5
                site        |   False   | site name to get sessions, defaults to `default`
        
Get latest login sessions for a given client
returns an array of login sessions for a single client on a site
params:
Name        | required  | description


Get latest login sessions for a given client returns an array of login sessions for a single client on a site params : Name | required | description
def list_sessions_latest(self, client_mac, limit=5, site='default'):
        data = {
            'mac': client_mac,
            '_limit': limit,
            '_sort': '-assoc_time',
        }
        r = self.get(self.endpoint('/api/s/%s/stat/session' % site), json=data)
        return self.process_response(r)
def list_sessions_latest ( self , client_mac , limit = 5 , site = 'default' ) : data = { 'mac' : client_mac , '_limit' : limit , '_sort' : '-assoc_time' , } r = self . get ( self . endpoint ( '/api/s/%s/stat/session' % site ) , json = data ) return self . process_response ( r )
Get latest login sessions for a given client
returns an array of login sessions for a single client on a site
params:
Name        | required  | description
Get latest login sessions for a given client returns an array of login sessions for a single client on a site params : Name | required | description
'''
            Get latest login sessions for a given client
            -------------------------
            returns an array of login sessions for a single client on a site
            params:
                Name        | required  | description
                -----------------------------------------
                client_mac  |   True    | client mac to get sessions
                limit       |   False   | latest `limit` sessions will be returned, defaults to 5
                site        |   False   | site name to get sessions, defaults to `default`
        '''
self
client_mac
limit
site