varlib=require('./libs/helpers');functionmain(text,auth){/* lib.say(message to log); */lib.say('Hello World');}
Envoyer un e-mail en tant que notification@microshare.io
varlib=require('./libs/helpers');functionmain(text,auth){/* lib.sendMicroshareEmail(recipient's email address,
subject of your email,
body of your email);
The email sender will be notification@microshare.io
*/varTO='youremail@microshare.io';varSUBJECT='This is a test email';varBODY='Dear Resident,\n The time we spent together, however long it was, meant the world to me. I would love to see you again but unfortunately I cannot. You see, I am a ghost. I can only materialize once every decade, on the anniversary of my death. I chose to spend my one day among the living with you, sweet resident. Perhaps we will meet again, in another decade--provided you keep your figure.\n Until then, all my love from the beyond,\n Barney.';lib.sendMicroshareEmail(TO,SUBJECT,BODY);}
Envoyer un e-mail
varlib=require('./libs/helpers');functionmain(text,auth){/* lib.sendEmail(sender's email address,
recipient's email address,
subject of your email,
body of your email);
*/varFROM='youremail@microshare.io';varTO='youremail@microshare.io';varSUBJECT='This is a test email';varBODY='Dear Resident,\n The time we spent together, however long it was, meant the world to me. I would love to see you again but unfortunately I cannot. You see, I am a ghost. I can only materialize once every decade, on the anniversary of my death. I chose to spend my one day among the living with you, sweet resident. Perhaps we will meet again, in another decade--provided you keep your figure.\n Until then, all my love from the beyond,\n Barney.';lib.sendEmail(FROM,TO,SUBJECT,BODY);}
Envoyer un SMS via Twilio
varlib=require('./libs/helpers');functionmain(text,auth){/* lib.sendSMS(sender's phone number (should be your Twilio phone number),
recipient's phone number,
content of the SMS,
your Twilio ACCOUNT_SID,
your Twilio AUTH_TOKEN);
*/varfromPhoneNumber=???;vartoPhoneNumber=???;varmessageContent=???;varACCOUNT_SID=???;varAUTH_TOKEN=???;lib.sendSMS(fromPhoneNumber,toPhoneNumber,messageContent,ACCOUNT_SID,AUTH_TOKEN);}
Envoyer un message à un service WebSocket
varlib=require('./libs/helpers');functionmain(text,auth){/* lib.sendWSMessage(WebSocekt service uri, message to send); */varwsUri='wss://echo.websocket.org';varmessage='Hello World';lib.sendWSMessage(wsUri,message);}