src/Devices.php
public function onFocus($id, array $data)
    {
        $data = $this->resolverFactory->createDeviceFocusResolver()->resolve($data);

        return $this->api->request('POST', '/players/'.$id.'/on_focus', [], json_encode($data));
    }
public function onFocus($id, array $data)
    {
        $data = $this->resolverFactory->createDeviceFocusResolver()->resolve($data);

        return $this->api->request('POST', '/players/'.$id.'/on_focus', [], json_encode($data));
    }
public function onFocus ( $ id , array $ data ) { $ data = $ this -> resolverFactory -> createDeviceFocusResolver ( ) -> resolve ( $ data ) ; return $ this -> api -> request ( 'POST' , '/players/' . $ id . '/on_focus' , [ ] , json_encode ( $ data ) ) ; }
Increment the device's total session length.

@param string $id   Device ID
@param array  $data Device data

@return array
Increment the device s total session length .