{"id":21454639,"url":"https://github.com/khalidhoffman/wake-up-call","last_synced_at":"2025-10-12T03:15:11.835Z","repository":{"id":135138596,"uuid":"71069913","full_name":"khalidhoffman/wake-up-call","owner":"khalidhoffman","description":"Programmatic wake up calls","archived":false,"fork":false,"pushed_at":"2016-10-17T15:34:09.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T03:22:07.504Z","etag":null,"topics":["tropo"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khalidhoffman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-10-16T18:46:18.000Z","updated_at":"2021-07-05T05:44:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6ec6425-32ae-40b9-9e28-cdada905a072","html_url":"https://github.com/khalidhoffman/wake-up-call","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/khalidhoffman/wake-up-call","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidhoffman%2Fwake-up-call","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidhoffman%2Fwake-up-call/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidhoffman%2Fwake-up-call/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidhoffman%2Fwake-up-call/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khalidhoffman","download_url":"https://codeload.github.com/khalidhoffman/wake-up-call/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidhoffman%2Fwake-up-call/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010174,"owners_count":26084691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["tropo"],"created_at":"2024-11-23T05:08:29.894Z","updated_at":"2025-10-12T03:15:11.826Z","avatar_url":"https://github.com/khalidhoffman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wake Up Call\n\n## About\nThis ia a quick project whipped up for [TAD Hackathon](http://tadhack.com/2016/global/Orlando). \nIt utilizes [Tropo's Voice API](https://www.tropo.com/) to place phone calls.\nThe idea is to create automated wake up call alarm service that interacts with the recipient to provide\na more personal and effective method of waking up.\n\n## Installation\n1. run `npm install`\n2. create a json file named `wakeup.config.json`. This file should resemble:\n```\n{\n  \"token\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n}\n```\n- `token` being your Tropo voice app key\n\n## Example Usage\n\n```\nvar TropoDialer = require('./lib/tropo-dialer'),\n    TropoSession = require('./lib/tropo-session'),\n\n\n    testTropoDialer = new TropoDialer(),\n    testTropoSession = new TropoSession('+15551230987', {\n        // logic can be assigned here with a map like object\n        start: {\n            question: 'Good morning. Are you awake?',\n            options: \"yes, no, tired\",\n            getNextAction: function (result) {\n                switch (result.actions.value) {\n                    // return values are used to execute the next action\n                    case 'yes':\n                        return false;\n                    case 'tired':\n                        return 'inspirational';\n                    case 'no' :\n                    default:\n                        return 'notAwake';\n                        break;\n                }\n            }\n        },\n        notAwake: {\n            message: 'Then wake up!'\n        },\n        inspirational: {\n            message: \"Remember the early bird gets the worm\"\n        }\n    });\n\n\n\ntestTropoDialer.pickup(function(){\n    testTropoDialer.dial(testTropoSession, function(){\n        console.log('session complete');\n        testTropoDialer.hangup();\n    })\n});\n```\n\n### More\n`TropoSession` takes a logic object map which can be used to handle the conversation.\nEach root member of the logic map specifies an action.\nActions can either be a question or message. \nQuestion objects must follow the structure:\n```\n{\n    question: \"A string consisting of the question to pose\",\n    options: \"A, string, of, comma, separated, options\", // Tropo suggests use of single words\n    getNextAction: \"A function that accepts the recipients response and returns the name of the next action\"\n}\n```\n- Returning false on getNextAction ends the conversation.\n\nMessages must simply have one field: `message`. Ex:\n```\n{\n    message: \"A string to read to the recipient\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhalidhoffman%2Fwake-up-call","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhalidhoffman%2Fwake-up-call","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhalidhoffman%2Fwake-up-call/lists"}