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}); | |
// Obtain projectId from the Openscreen Dashboard | |
const projectId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; | |
// Capture scanId from the QR code scan | |
const scanId = '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
// 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
//Obtain your projectId from the Openscreen Dashboard and paste below | |
const projectId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; | |
const create_contact_by_project_id = await os.project(projectId).contacts().create({ | |
firstName: "Brian", | |
lastName: "Smith", | |
emailAddress: "bsmith@test.com", | |
cellPhone: "+14162121212", | |
mailingAddress: { | |
address: "123 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
{ | |
"assets": [ | |
{ | |
"assetId": "59e5c13e-8ac3-499e-8d4b-5fd4abf5b2af", | |
"projectId": "c166f2dd-9ea8-4a79-90d5-fa6989f885e6", | |
"name": "Billboard 1", | |
"description": "Billboard at Yonge and Eglington for 123 Cherry Street Listing", | |
"qrCodes": [ | |
{ | |
"qrCodeId": "24678051-b380-4fdb-98d6-541d8d08e850", |
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
projectId = os.environ.get('PROJECT_ID') | |
sms_template = os.project(projectId).smsTemplates().create({ | |
'body': 'Body of the message for {{asset.name}}', | |
'smsTemplateName': 'firstTemplate', | |
'responseUrl': 'https://myapp/sms-response', | |
'statusUrl': 'https://myapp/sms-status' | |
}) |
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
from openscreen import Openscreen | |
import os | |
#Obtain your access key and secret from Openscreen Dashboard | |
ospro = Openscreen(access_key=os.environ.get('OS_ACCESS_KEY'), access_secret=os.environ.get('OS_ACCESS_SECRET')) | |
#Create a new project on Openscreen Dashboard. Paste the projectId below | |
projectId = os.environ.get('PROJECT_ID') | |
assetId = 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' | |
scans = os.asset(assetId).scans().get() |
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
from openscreen import Openscreen | |
import os | |
#Obtain your access key and secret from Openscreen Dashboard | |
ospro = Openscreen(access_key=os.environ.get('OS_ACCESS_KEY'), access_secret=os.environ.get('OS_ACCESS_SECRET')) | |
#Create a new project on Openscreen Dashboard. Paste the projectId below | |
projectId = os.environ.get('PROJECT_ID') | |
create_contact_by_project_id = ospro.project(projectId).contacts().create({ | |
'firstName': 'Brian', | |
'lastName': 'Smith', |
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", |
NewerOlder