r4nkt
  • Introduction
  • Getting Started
  • Concepts
    • Overview
    • Achievements
    • Actions
    • Activities
    • Badges
    • Criteria
    • Criteria Conditions
    • Criteria Groups
    • Custom Data Reference
    • Games
    • Leaderboards
    • Players
    • Rewards
    • Scores
  • Cookbook
    • Criteria Conditions
    • Achievements
  • API
    • Overview
    • Authentication
    • Achievements
    • Actions
    • Activities
    • Criteria
    • Criteria Groups
    • Leaderboards
    • Players
    • Player Badges
    • Rewards
    • Scores
  • Webhooks
    • Overview
    • Getting Started
    • Events
  • PHP SDK
    • Overview
    • Getting Started
  • Laravel Package
    • Overview
    • Installation
    • Webhooks
Powered by GitBook
On this page
  • Description
  • Properties
  • UUID
  • Custom Action ID
  • Custom Player ID
  • Custom Session ID
  • Amount
  • Date/Time
  • Custom Data

Was this helpful?

  1. Concepts

Activities

PreviousActionsNextBadges

Last updated 3 years ago

Was this helpful?

Description

Activities in r4nkt are key. Your app will report your player activities, which is how r4nkt knows what your have performed. You do this via .

Whenever your player performs a given action, you report this to r4nkt. The player activity is recorded and r4nkt goes into action. Among other things, it triggers any defined reactions, it determines whether any achievements have been earned, it updates leaderboards, if necessary, and it notifies you if anything interesting has taken place.

Properties

Actions have the following properties:

Name
Type
Default

uuid

string

-

custom_action_id

string

-

custom_player_id

string

-

custom_session_id

string

empty

amount

integer

1

date_time_utc

string

now

custom_data

json

empty

UUID

This is a universally unique identifier for the individual activity. You may provide your own UUID when reporting a new activity, otherwise r4nkt will automatically generate one.

Custom Action ID

This is the custom ID for the action that the player has performed. This must match an existing action within your game.

Custom Player ID

This is the player's custom ID.

If this custom ID is new to r4nkt, then a new player will be automatically created with this custom ID.

Custom Session ID

@todo 🤓

Amount

This is the number of times the player has performed the specified action.

Sometimes it makes sense that the player has performed something more than once at a given moment. Consider, for example, that you have an action for archiving documents. If the player archives a single document, then you could not send this field and r4nkt will default it to 1. Alternatively, you can send the field and the explicit value of 1. But, if your app supports a bulk archive function, then you would send this field with the amount of files that are bulk archived.

Date/Time

If this field is not sent, then r4nkt assumes that the player has just performed this action. If you choose to send this data, however, it must be a date/time in the past.

The date/time is always interpreted as belonging to the UTC time zone. You must remember to convert the date/time from any non-UTC time zone before reporting the player activity.

The date/time must have the following format: 2021-03-14 12:34:56

Custom Data

You can pass whenever player activity is reported. Taking advantage of this feature opens up a great deal of possibilities when it comes to defining interesting and unique-to-your-app achievement criteria. Please read about for more information.

actions
players
API
custom data references
custom data