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
// create contact in Openscreen | |
await os.project(process.env.OS_PROJECT_ID).contacts().create({ | |
firstName, | |
lastName, | |
emailAddress, | |
cellPhone, | |
consent, | |
}) | |
// add profile to list in Klaviyo |
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
require('dotenv').config() | |
const { Openscreen } = require('@openscreen/sdk') | |
// initialize Openscreen SDK | |
const os = new Openscreen().config({ | |
key: process.env.OS_API_KEY, | |
secret: process.env.OS_API_SECRET, | |
}) | |
// script that generates a QR code in the project's /public directory |
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
require('dotenv').config() | |
const express = require('express') | |
const path = require('path') | |
const bodyParser = require('body-parser') | |
const { Openscreen } = require('@openscreen/sdk') | |
// initialize Openscreen SDK | |
const os = new Openscreen().config({ | |
key: process.env.OS_API_KEY, | |
secret: process.env.OS_API_SECRET, |
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
// Run the following code to test that you have successfully created a project and installed the Openscreen SDK. | |
// Initiate the Openscreen node SDK | |
const{ Openscreen }=require("@openscreen/sdk"); | |
require('dotenv').config(); | |
const os = new Openscreen().config({key: process.env.OS_API_KEY, secret: process.env.OS_API_SECRET}); | |
// Insert the project ID that you received using the Openscreen dashboard | |
const projectId ='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; | |
async function main(){ | |
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
const { Openscreen } = require("@openscreen/sdk"); | |
require('dotenv').config(); | |
const os = new Openscreen().config({key: process.env.OS_API_KEY, secret: process.env.OS_API_SECRET}); | |
// Input the project ID that you received in the Openscreen dashboard as a string, your project ID should look similar to the one provided below | |
const projectId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; |
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
// Initiate the Openscreen node SDK | |
const { Openscreen } = require("@openscreen/sdk"); | |
require('dotenv').config(); | |
const os = new Openscreen().config({key: process.env.OS_API_KEY, secret: process.env.OS_API_SECRET}); | |
// Obtain ProjectID from Openscreen Dashboard | |
const projectId = 'YOUR PROJECT ID'; | |
async function main() { | |
// Create an asset for a new listing sign being hosted for 123 Main Street |
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
// Initiate the Openscreen node SDK and include the project ID that you recieved using the Openscreen dashboard | |
const { Openscreen } = require("@openscreen/sdk"); | |
require('dotenv').config(); | |
const os = new Openscreen().config({key: process.env.OS_API_KEY, secret: process.env.OS_API_SECRET}); | |
const projectId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' | |
async function main() { | |
// Create an asset and generate a Static QR Code | |
const res = await os.project(projectId).assets().create({ |
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
{ | |
"entityType": "get_scans_by_asset_id.response_body", | |
"assetId": "0a43a07c-0e57-4879-9420-332a13174458", | |
"numberOfScans": 1, | |
"scans": [ | |
{ | |
"entityType": "app.scan", | |
"created": "2021-10-07T18:38:06.616Z", | |
"modified": "2021-10-07T18:38:06.616Z", | |
"assetId": "0a43a07c-0e57-4879-9420-332a13174458", |
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
// Initiate the Openscreen node SDK and include the project ID that you received using the Openscreen dashboard | |
const { Openscreen } = require("@openscreen/sdk"); | |
require('dotenv').config(); | |
const os = new Openscreen().config({key: process.env.OS_API_KEY, secret: process.env.OS_API_SECRET}); | |
const projectId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; | |
async function main(){ | |
// Create a new contact |
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
"contact": { | |
"contactId": "864422e9-0741-43e6-8b73-b46ea0c0cc16", | |
"firstName": "Brian", | |
"lastName": "Smith", | |
"emailAddress": "bsmith@test.com", | |
"mailingAddress": { | |
"address": "123 Street", | |
"city": "Toronto", | |
"provinceOrState": "ON", | |
"country": "Canada", |
OlderNewer