* Refactor for activeIdentityToken * Account selector stuff * Small refactor * Tweak * That's a wrap * comment * Lint fix * Localize * Lint fix * Close view on error * parse error when gathering tracking urls --------- Co-authored-by: github-action linter <githubaction@githubaction.com>
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
import "pkg:/source/utils/StringUtils.bs"
|
|
|
|
namespace YouTubeLoginAccountItemUtils
|
|
|
|
function CreateProfileContentNode(accountItem as object, accessToken as object) as object
|
|
profile = CreateObject("roSGNode", "ProfileContentNode")
|
|
profile.type = "youtube"
|
|
profile.serverUrl = "http://127.0.0.1:8888/playlet-invidious-backend"
|
|
username = accountItem.channelHandle
|
|
if StringUtils.IsNullOrEmpty(username)
|
|
username = accountItem.accountByline
|
|
end if
|
|
profile.username = username
|
|
profile.activeIdentifyToken = accountItem.activeIdentifyToken
|
|
profile.thumbnail = accountItem.accountPhoto
|
|
profile.accessToken = accessToken.accessToken
|
|
profile.refreshToken = accessToken.refreshToken
|
|
profile.scope = accessToken.scope
|
|
profile.tokenType = accessToken.tokenType
|
|
profile.expiresIn = accessToken.expiresIn
|
|
profile.expiresTimestamp = accessToken.expiresTimestamp
|
|
profile.clientId = accessToken.clientId
|
|
profile.clientSecret = accessToken.clientSecret
|
|
|
|
return profile
|
|
end function
|
|
end namespace
|