Struct: FPatreonUserInfo
// PatreonUserInfo.h : 19
struct NBPATREONAPICLIENT_API FPatreonUserInfo;
Reflection-enabled
Specifiers:
- BlueprintType
Contains basic information about a user obtained from the Patreon API. This is meant as a convenience to cover the information most applications might need(e.g.to display to the user their pledge status or to unlock specific content based on the tiers they've pledged to). If any information you need about a user is not included here, you can still extract that information manually from an API request or submit a feature request for this plugin to nbpsup@gmail.com
Properties
-
CampaignLifetimeSupportCentspublic: int64 CampaignLifetimeSupportCents;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|User Info
The total amount of money this user has ever contributed to this campaign, in cents. Can be used to unlock content for users only after reaching specific subscription thresholds. NOTE: Gifted subscriptions will not increase this value!
-
CanSeeNSFWpublic: bool CanSeeNSFW;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|User Info
Whether or not the user has enabled NSFW content on their Patreon profile -
CurrentlyEntitledAmountCentspublic: int64 CurrentlyEntitledAmountCents;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|User Info
The amount of money this user is currently entitled to, e.g. their current pledge amount, in cents. This can be used to unlock content based on how much money they are contributing rather than checking which tier they belong to.
-
FirstNamepublic: FString FirstName;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|User Info
-
FullNamepublic: FString FullName;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|User Info
-
ImageURLpublic: FString ImageURL;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|User Info
URL of the user's avatar image -
IsCreatorpublic: bool IsCreator;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|User Info
Whether or not the current user is also the creator of a campaign. -
LastNamepublic: FString LastName;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|User Info
-
PatronStatuspublic: FString PatronStatus;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|User Info
Can be one of: active_patron: They are currently subscribed to a campaigndeclined_patron: They have attempted to subscribe, but payment failed!!former_patron: They used to subscribe, but currently do not<empty>: They have never subscribed before
-
Tierspublic: TArray<FPatreonTierInfo> Tiers;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|User Info
A list of all tiers this user is entitled to. In many cases this will include not just the specific tier they have pledged to, but also any lower tiers. -
URLpublic: FString URL;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|User Info
URL of the user's profile -
VanityNamepublic: FString VanityName;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|User Info
If set, represents the user's preferred nickname
Constructors
-
FPatreonUserInfo// PatreonUserInfo.h : 27 public: FPatreonUserInfo();Empty constructor does not provide any default values.
-
FPatreonUserInfo// PatreonUserInfo.h : 35 public: FPatreonUserInfo( const FString& json, const FString& CampaignID = TEXT("") );Constructs FPatreonUserInfo from a JSON string. Populates any fields it can find in the provided JSON. If the provided json string cannot be parsed for any reason, the result will be uninitialized.
Arguments
-
jsonconst FString& json -
CampaignIDconst FString& CampaignID = TEXT("")
-
Methods
-
GetCampaignID// PatreonUserInfo.h : 47 public: static FString GetCampaignID( const TSharedPtr<FJsonObject> relationshipEntry );Attempts to find a field 'campaign.data.id' in the given JSON object.
Arguments
-
relationshipEntryconst TSharedPtr<FJsonObject> relationshipEntryObject to begin searching from.
Returns
-
FStringThe Campaign ID if one was false, otherwise an empty string.
-
-
HasBenefit// PatreonUserInfo.h : 69 public: bool HasBenefit( const FString& benefitName ) const;Convenience method to check if this user is entitled to a particular benefit. Will check all tiers the user is pledged to.
Arguments
-
benefitNameconst FString& benefitNameName of the benefit to check for, case-insensitive
Returns
-
boolTrue if the user is entitled to the given benefit
-
-
HasTier// PatreonUserInfo.h : 54 public: bool HasTier( const FString& tierName ) const; -
HasTierId// PatreonUserInfo.h : 61 public: bool HasTierId( const FString& tierId ) const; -
ParseTier// PatreonUserInfo.h : 40 public: static FPatreonTierInfo ParseTier( const TSharedPtr<FJsonObject> tierEntry, const TSharedPtr<FJsonObject> tierattributes );Parses tier information from JSON
Arguments
-
tierEntryconst TSharedPtr<FJsonObject> tierEntry -
tierattributesconst TSharedPtr<FJsonObject> tierattributes
Returns
-
FPatreonTierInfo
-
For any questions, help, suggestions or feature requests, please feel free to contact me at nbpsup@gmail.com