<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: nescampos</title>
    <description>The latest articles on Forem by nescampos (@nescampos).</description>
    <link>https://forem.com/nescampos</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F375524%2F89c87ec5-c8d2-4337-a186-204061e42593.png</url>
      <title>Forem: nescampos</title>
      <link>https://forem.com/nescampos</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nescampos"/>
    <language>en</language>
    <item>
      <title>Javascript Library for implementing WebMonetization</title>
      <dc:creator>nescampos</dc:creator>
      <pubDate>Fri, 05 Jun 2020 14:38:33 +0000</pubDate>
      <link>https://forem.com/nescampos/javascript-library-for-implementing-webmonetization-1h58</link>
      <guid>https://forem.com/nescampos/javascript-library-for-implementing-webmonetization-1h58</guid>
      <description>&lt;h1&gt;
  
  
  WebMonetization Helper
&lt;/h1&gt;

&lt;p&gt;Despite the simplicity of the WebMonetization specification for use, I had the idea to implement a Javascript library to facilitate its use on any website, without having dependencies (such as Jquery, among others).&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;All code is available under MIT license at: &lt;a href="https://github.com/nescampos/webmonetizationhelper" rel="noopener noreferrer"&gt;https://github.com/nescampos/webmonetizationhelper&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The methods and functions are explained in the Readme&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjdl3o3oiad2qu51p5ws5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjdl3o3oiad2qu51p5ws5.png" alt="Code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Use
&lt;/h2&gt;

&lt;p&gt;For using, just need import the Javascript file (or minified version) and instance class &lt;strong&gt;WebMonetization&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Bugs or problems
&lt;/h2&gt;

&lt;p&gt;If you found a bug or problem, just create an issue on: &lt;a href="https://github.com/nescampos/webmonetizationhelper/issues" rel="noopener noreferrer"&gt;https://github.com/nescampos/webmonetizationhelper/issues&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webmonetization</category>
      <category>gftwhackathon</category>
    </item>
    <item>
      <title>Integrating Twilio for Whatsapp and Azure bots (LUIS)</title>
      <dc:creator>nescampos</dc:creator>
      <pubDate>Thu, 30 Apr 2020 21:15:34 +0000</pubDate>
      <link>https://forem.com/nescampos/integrating-twilio-for-whatsapp-and-azure-bots-luis-4pok</link>
      <guid>https://forem.com/nescampos/integrating-twilio-for-whatsapp-and-azure-bots-luis-4pok</guid>
      <description>&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Category Submission: Interesting Integrations (Twilio for Whatsapp with Azure Cognitive Service, LUIS)
&lt;/h4&gt;

&lt;p&gt;I built a library (a class called TwilioAzCognitiveIntegrator) in C# for using LUIS (the Azure service for Language Understanding&lt;/p&gt;

&lt;p&gt;Why? Because I had a chatbot build with Azure Bot Framework, and I have to evaluate if my bot can work with whatsapp. But in Azure Bot Service, the only channel with Twilio is SMS, so I had to create a new solution for that&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo Link
&lt;/h2&gt;

&lt;p&gt;The demo works with Twilio for whatapp. &lt;br&gt;
In your account, you can configure the webhook in whatsapp sandbox with this URL: &lt;a href="https://demotwilioluis.azurewebsites.net/message/index" rel="noopener noreferrer"&gt;https://demotwilioluis.azurewebsites.net/message/index&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fnescampos%2Ftwilioluisdemo%2Fraw%2Fmaster%2Fimages%2F0.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fnescampos%2Ftwilioluisdemo%2Fraw%2Fmaster%2Fimages%2F0.PNG" alt="Demo in sandbox"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Link to Code
&lt;/h2&gt;

&lt;p&gt;The code is in my github repo: &lt;a href="https://github.com/nescampos/twilioluisdemo" rel="noopener noreferrer"&gt;https://github.com/nescampos/twilioluisdemo&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How I built it
&lt;/h2&gt;

&lt;p&gt;To do this, and considering that my bot used LUIS to interpret the questions (and give me a score for the user's question, to know if it was a normal or negative comment), I built a class that calls the API of this service simulating the Same use of Bot Framework, and depending on the score of the question (positive or negative) I can have different answers for the user (the answers are saved by database, but for this demo, they are in a JSON file in the project).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fnescampos%2Ftwilioluisdemo%2Fraw%2Fmaster%2Fimages%2F2.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fnescampos%2Ftwilioluisdemo%2Fraw%2Fmaster%2Fimages%2F2.PNG" alt="Responses JSON file"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, using C#, I created this API call in combination with the Twilio library for C#, in order to generate the answers to the detected question / intention.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fnescampos%2Ftwilioluisdemo%2Fraw%2Fmaster%2Fimages%2F1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fnescampos%2Ftwilioluisdemo%2Fraw%2Fmaster%2Fimages%2F1.PNG" alt="C# library"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, I created a web application with ASP.NET MVC that calls my new class (with the parameters in the web.config file for LUIS app keys) to return the response using Twilio Webhook.&lt;/p&gt;

&lt;p&gt;Hope you enjoyed it, I am able for helping you with my experience #twiliohackaton&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Resources/Info
&lt;/h2&gt;

&lt;p&gt;If you want to understand more about LUIS (if you implement Azure Bots and you want to connect with Twilio for Whatsapp): &lt;a href="https://docs.microsoft.com/en-us/azure/cognitive-services/LUIS/luis-get-started-get-intent-from-rest?pivots=programming-language-csharp" rel="noopener noreferrer"&gt;https://docs.microsoft.com/en-us/azure/cognitive-services/LUIS/luis-get-started-get-intent-from-rest?pivots=programming-language-csharp&lt;/a&gt;&lt;/p&gt;

</description>
      <category>twiliohackathon</category>
      <category>csharp</category>
      <category>azure</category>
    </item>
  </channel>
</rss>
