Skip to content

Latest commit

 

History

History
171 lines (112 loc) · 8.79 KB

README.md

File metadata and controls

171 lines (112 loc) · 8.79 KB

Devices

(devices)

Overview

Available Operations

refresh_session

Refresh the cookie to keep a user logged in

Example Usage

from moov import Moov
import os

s = Moov(
    gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)

res = s.devices.refresh_session(request={
    "fingerprint": "fBkwz3q43jlTHB8wFtiDgxT0WMpjUmDvMsTbQbz1",
})

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
request models.DeviceInfo ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.Session

Errors

Error Type Status Code Content Type
models.SDKError 4XX, 5XX */*

list_devices_for_user

Returns the list of devices that are currently remembered

Example Usage

from moov import Moov
import os

s = Moov(
    gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)

res = s.devices.list_devices_for_user(user_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description Example
user_id str ✔️ Which userID to list the devices of ec7e1848-dc80-4ab0-8827-dd7fc0737b43
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.ListDevicesForUserResponse

Errors

Error Type Status Code Content Type
models.SDKError 4XX, 5XX */*

get_device_for_user

Get Information on a specific device

Example Usage

from moov import Moov
import os

s = Moov(
    gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)

res = s.devices.get_device_for_user(user_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43", device_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description Example
user_id str ✔️ Which userID to list the devices of ec7e1848-dc80-4ab0-8827-dd7fc0737b43
device_id str ✔️ Which device that belongs to the user to get ec7e1848-dc80-4ab0-8827-dd7fc0737b43
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.GetDeviceForUserResponse

Errors

Error Type Status Code Content Type
models.SDKError 4XX, 5XX */*

disable_device_for_user

Disable a specific device

Example Usage

from moov import Moov
import os

s = Moov(
    gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)

res = s.devices.disable_device_for_user(user_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43", device_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description Example
user_id str ✔️ Which userID to list the devices of ec7e1848-dc80-4ab0-8827-dd7fc0737b43
device_id str ✔️ Which device that belongs to the user to get ec7e1848-dc80-4ab0-8827-dd7fc0737b43
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.DisableDeviceForUserResponse

Errors

Error Type Status Code Content Type
models.SDKError 4XX, 5XX */*