mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 04:20:46 +00:00
67 KiB
67 KiB
GetTokenDetailsResponse
Example Usage
import {
AutoSelectSubtitle,
DefaultSubtitleAccessibility,
DefaultSubtitleForced,
Features,
GetTokenDetailsAuthenticationResponseStatus,
GetTokenDetailsAuthenticationStatus,
GetTokenDetailsFeatures,
GetTokenDetailsResponse,
GetTokenDetailsStatus,
MailingListStatus,
MediaReviewsVisibility,
WatchedIndicator,
} from "@lukehagar/plexjs/sdk/models/operations";
let value: GetTokenDetailsResponse = {
contentType: "<value>",
statusCode: 441711,
rawResponse: new Response("{\"message\": \"hello world\"}", {
headers: { "Content-Type": "application/json" },
}),
userPlexAccount: {
adsConsent: true,
adsConsentReminderAt: new Date("2019-08-24T14:15:22Z"),
adsConsentSetAt: new Date("2019-08-24T14:15:22Z"),
anonymous: false,
authToken: "CxoUzBTSV5hsxjTpFKaf",
backupCodesCreated: false,
confirmed: false,
country: "US",
email: "username@email.com",
emailOnlyAuth: false,
experimentalFeatures: false,
friendlyName: "friendlyUsername",
entitlements: [
"[]",
],
guest: false,
hasPassword: true,
home: false,
homeAdmin: false,
homeSize: 1,
id: 13692262,
joinedAt: 1721154902,
locale: null,
mailingListActive: false,
mailingListStatus: MailingListStatus.Active,
maxHomeSize: 15,
pin: "string",
profile: {
autoSelectAudio: true,
defaultAudioLanguage: "ja",
defaultSubtitleLanguage: "en",
autoSelectSubtitle: AutoSelectSubtitle.One,
defaultSubtitleAccessibility: DefaultSubtitleAccessibility.One,
defaultSubtitleForced: DefaultSubtitleForced.One,
watchedIndicator: WatchedIndicator.One,
mediaReviewsVisibility: MediaReviewsVisibility.Zero,
},
protected: false,
rememberExpiresAt: 1722364046,
restricted: false,
roles: [
"string",
],
scrobbleTypes: "",
services: [
{
identifier: "metadata-dev",
endpoint: "https://epg.provider.plex.tv",
token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv",
secret: "string",
status: GetTokenDetailsStatus.Online,
},
],
subscription: {
features: [
Features.AndroidDolbyVision,
],
active: true,
subscribedAt: "2021-04-12T18:21:12Z",
status: GetTokenDetailsAuthenticationStatus.Inactive,
paymentService: "string",
plan: "string",
},
subscriptionDescription: "string",
subscriptions: [
{
features: [
GetTokenDetailsFeatures.AndroidDolbyVision,
],
active: true,
subscribedAt: "2021-04-12T18:21:12Z",
status: GetTokenDetailsAuthenticationResponseStatus.Inactive,
paymentService: "string",
plan: "string",
},
],
thumb: "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101",
title: "UsernameTitle",
twoFactorEnabled: false,
username: "Username",
uuid: "dae343c1f45beb4f",
},
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
contentType |
string | ✔️ | HTTP response content type for this operation | |
statusCode |
number | ✔️ | HTTP response status code for this operation | |
rawResponse |
Response | ✔️ | Raw HTTP response; suitable for custom response parsing | |
userPlexAccount |
operations.GetTokenDetailsUserPlexAccount | ➖ | Logged in user details | { "adsConsent": true, "adsConsentReminderAt": "2019-08-24T14:15:22Z", "adsConsentSetAt": "2019-08-24T14:15:22Z", "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": [], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1721154902, "locale": null, "mailingListActive": false, "mailingListStatus": "subscribed", "maxHomeSize": 15, "pastSubscriptions": [ { "id": "string", "mode": "string", "renewsAt": "string", "endsAt": "1556281940", "canceled": "0", "gracePeriod": "0", "onHold": "0", "canReactivate": "0", "canUpgrade": "0", "canDowngrade": "0", "canConvert": "0", "type": "plexpass", "transfer": "string", "state": "ended", "billing": [ { "internalPaymentMethod": "string", "paymentMethodId": "string" } ] } ], "pin": "string", "profile": [ { "autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": 1, "defaultSubtitleAccessibility": 1, "defaultSubtitleForced": 0, "watchedIndicator": 1, "mediaReviewsVisibility": 0 } ], "protected": false, "rememberExpiresAt": 1722364046, "restricted": false, "roles": [ "string" ], "scrobbleTypes": "", "services": [ { "identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "string", "status": "online" } ], "subscription": { "features": [ "Android - Dolby Vision" ], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string" }, "subscriptionDescription": "string", "subscriptions": [ { "features": [ "Android - Dolby Vision" ], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string" } ], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "trials": [ {} ], "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f" } |