This is pretty simple, lets dive in!
Find a name that isn't taken and clearly describes what your module is doing
$ npm view your-first-node-module| Received messages payload in <class 'voip_gateway.views.ReceiveVoipMessagesView'> is {'data': {'site': {'product_id': '70002044'}, 'users': {'63': {'product_id': 63, 'platform_id': '438987201342869631', 'number': None, 'extension': 200, 'email_address': 'whui202106161519@bonline.com', 'photo_url': '/restletrouter/FilesService/avatar/TFJZNGNOUm85c0V4dGVuc2lvbi00Mzg5ODcyMDEzNDI4Njk2MzE=', 'name': 'Wyatt Wyatt', 'mobile_number': '07906161519', 'service_plan': "VoIP 'Entry' user", 'add_ons': []}}}} |
| { | |
| "_key": "b87a993e-30de-407b-8e8e-d3cee1eb3b5d", | |
| "args": { | |
| "public_numbers": { | |
| "type": "numbers", | |
| "value": [ | |
| "01300358976" | |
| ] | |
| } | |
| }, |
| { | |
| "name": "Main Number", | |
| "children": [ | |
| { | |
| "name": "business_hours", | |
| "type": "business_hours", | |
| "children": [ | |
| { | |
| "name": "TRANSFER_TO_GROUP", | |
| "type": "call_queuing_group", |
| require("dotenv").config(); | |
| module.exports = { | |
| mode: "universal", | |
| /* | |
| ** Headers of the page | |
| */ | |
| head: { | |
| titleTemplate: "", | |
| title: "MYbOnline | Customer Portal", |
| // https://serversideup.net/uploading-files-vuejs-axios/ | |
| // PUT https://mybonline-dev.appspot.com/portal/api/v1/voip/70000414/call-flows/current/audio-files/upload/ | |
| submitFile(){ | |
| /* | |
| Initialize the form data | |
| */ | |
| let formData = new FormData(); | |
| /* | |
| Add the form data we need to submit |
| # run in remote shell 70000938 developers@bonline.com | |
| # export HTTPS_PROXY=http://127.0.0.1:8123 | |
| # export HTTP_PROXY=http://127.0.0.1:8123 | |
| # sudo /usr/bin/pythonw /Users/user/Downloads/google-cloud-sdk/platform/google_appengine/remote_api_shell.py --secure -s ctst-testing.appspot.com | |
| import orm | |
| from products.models import Product | |
| import products.models | |
| import voip.services |
| import requests | |
| url='http://localhost:8000/voip-provisioning/v1/enterprises/4757724199815007735/welcome-attendant/958281871615315435/audio/upload/' | |
| files={'file': ("Took_my_love_away.mp3", open('Took_my_love_away.mp3','rb'), 'audio/mpeg')} | |
| r=requests.post(url, files=files) |
| DEV = os.environ['SERVER_SOFTWARE'].startswith('Dev') | |
| APP_ID = os.environ['APPLICATION_ID'] | |
| TESTSPACE = 'test.site3.bonlineapp.com' #change this to the namespace to delete | |
| def deleteDBandMemcache(): | |
| """Delete all entities in a namespace.""" | |
| from google.appengine.api import namespace_manager | |
| ###################################### | |
| namespace_manager.set_namespace(TESTSPACE) | |
| ###################################### |
| import orm | |
| from common.models import Lead, Kinds | |
| import sqlalchemy as sa | |
| from sqlalchemy import or_ | |
| with orm.session_scope() as session: | |
| lead = session.query(Lead).filter( | |
| Lead.source == 'Partner', | |
| or_( |