Class: UNBSubscribeStarAPIClient
// NBSubscribeStarAPIClient.h : 12
class NBSUBSCRIBESTARAPICLIENT_API UNBSubscribeStarAPIClient
: public UBlueprintFunctionLibrary;
Reflection-enabled
Exposes several useful functions to Blueprints
Methods
-
HasTokenExpired
// NBSubscribeStarAPIClient.h : 21 public: static bool HasTokenExpired( const FNBSubscribeStarAPITokenInfo& token );
Reflection-enabled
Specifiers:
- BlueprintPure
- BlueprintCallable
- Category = NBSubscribeStarAPIClient
Meta Specifiers:
- DisplayName = Has API Token Expired
- Keywords = SubscribeStar
Checks if a token's lifetime has expired.
Arguments
-
token
const FNBSubscribeStarAPITokenInfo& token
Returns
-
bool
-
IsTokenValid
// NBSubscribeStarAPIClient.h : 27 public: static bool IsTokenValid( const FNBSubscribeStarAPITokenInfo& token );
Reflection-enabled
Specifiers:
- BlueprintPure
- BlueprintCallable
- Category = NBSubscribeStarAPIClient
Meta Specifiers:
- DisplayName = Is API Token Valid
- Keywords = SubscribeStar
Checks if the access token is present and not yet expired
Arguments
-
token
const FNBSubscribeStarAPITokenInfo& token
Returns
-
bool
-
OpenURL
// NBSubscribeStarAPIClient.h : 52 public: static void OpenURL( const FString URL );
Reflection-enabled
Specifiers:
- BlueprintCallable
- Category = NBSubscribeStarAPIClient|HTTP
Meta Specifiers:
- DisplayName = Open URL
- Keywords = SubscribeStar HTTP URL
Opens a given URL in the user's default web browser
Arguments
-
URL
const FString URL
-
ParseTokenInfo
// NBSubscribeStarAPIClient.h : 46 public: static bool ParseTokenInfo( FString JsonStr, FNBSubscribeStarAPITokenInfo& TokenInfo );
Reflection-enabled
Specifiers:
- BlueprintCallable
- Category = NBSubscribeStarAPIClient
Meta Specifiers:
- DisplayName = Parse API Token Info
- Keywords = SubscribeStar
Parses a JSON string containing an access token, as provided by the SubscribeStar API. This expects a JSON string of the form:
{ "access_token": <single use token>, "refresh_token" : <single use token>, "expires_in" : <token lifetime duration>, "scope" : <token scopes> }
Arguments
-
JsonStr
FString JsonStr
The JSON string to parse
-
TokenInfo
FNBSubscribeStarAPITokenInfo& TokenInfo
The parsed TokenInfo object
Returns
-
bool
True if the JsonStr could be parsed, otherwise False. If this returns False, TokenInfo should not be used.
For any questions, help, suggestions or feature requests, please feel free to contact me at nbpsup@gmail.com