Skip to content

Instantly share code, notes, and snippets.

View timelincoln7648's full-sized avatar

Kody timelincoln7648

View GitHub Profile
@timelincoln7648
timelincoln7648 / AppDelegate.swift
Created January 10, 2020 21:56
Install Optimizely Swift
import UIKit
import Optimizely
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
// Build OptimizelyClient
let optimizely = OptimizelyClient(sdkKey: "REPLACE_WITH_SDK_KEY", periodicDownloadInterval: 30)
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
# Local Accounts table
RESULT=$(aws dynamodb describe-table \
--region us-east-1 \
--endpoint-url $DYNAMODB_ENDPOINT \
--table-name test_Accounts)
CODE=$?
if [ $? -eq 0 ]; then
aws dynamodb delete-table \
--region us-east-1 \
--endpoint-url $DYNAMODB_ENDPOINT \
XeroDataHelper.prototype.formatOrgName = function(orgName) {
if (orgName) {
return `You are currently connected to the Zero Organisation: ${orgName}. To get a status report for this organisation, say: weekly status report.`;
} else {
return "There was an issue getting the name of your Zero organisation. Please link your account using the Alexa app and try again."
}
};
/**
* Get Current Connected Xero Org
*/
app.intent('getOrgName', {
'slots': {},
'utterances': ['{which|what} {|zero} {org|organisation|account|company|file} {|am I} {connected|attached|looking} {|at|to|on|in}'],
}, function(req, res) {
return checkSession(req)
.then(function(xeroDataHelper) {
return xeroDataHelper.getOrgName()