Profile Module
Version 0.6.0-alpha.1
OpenRPC
This document was generated from an OpenRPC JSON-Schema, and is intended to provide a human readable overview and examples of the methods contained in the module.
For the full schema, see the link below.
Schema |
---|
profile.json |
Table of Contents
Usage
To use the Profile module, you can import it into your project from the Firebolt SDK:
import { Profile } from '@firebolt-js/sdk'
Overview
Methods for getting information about the current user/account profile
Events
Methods
approveContentRating
Verifies that the current profile should have access to mature/adult content.
function approveContentRating(): Promise<boolean>
Promise Resolution
Type | Description |
---|---|
boolean | Whether or not to allow access |
Examples
Default Example
JavaScript
import { Profile } from '@firebolt-js/sdk'
Profile.approveContentRating()
.then(allow => {
console.log(allow)
})
Value of allow
false
JSON-RPC
approvePurchase
Verifies that the current profile should have access to making purchases.
function approvePurchase(): Promise<boolean>
Promise Resolution
Type | Description |
---|---|
boolean | Whether or not to allow access |
Examples
Default Example
JavaScript
import { Profile } from '@firebolt-js/sdk'
Profile.approvePurchase()
.then(allow => {
console.log(allow)
})
Value of allow
false
JSON-RPC
flags
Get a map of profile flags for the current session.
function flags(): Promise<FlatMap>
Promise Resolution
Type | Description |
---|---|
FlatMap | The profile flags. |
Examples
Default Example
JavaScript
import { Profile } from '@firebolt-js/sdk'
Profile.flags()
.then(flags => {
console.log(flags)
})
Value of flags
{
"userExperience": "1000"
}