This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local nk = require("nakama") | |
--[[ | |
Send a push notification to a segment of users via One Signal. | |
]]-- | |
local function send_push_notification(context, payload) | |
local auth = "YOUR ONE SIGNAL REST API KEY" | |
local url = "https://onesignal.com/api/v1/notifications" | |
local method = "POST" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local nk = require("nakama") | |
local function setup_user(context, _) | |
local value = { | |
coins = 100 | |
level = 1 | |
} | |
local record = { | |
Bucket = "mygame", | |
Collection = "saves", |
NewerOlder