From 006d79e46e016880e8028f3dd8df52f137c8a7f2 Mon Sep 17 00:00:00 2001 From: juanmesa2097 Date: Wed, 27 Apr 2022 19:12:17 -0500 Subject: [PATCH] Rename project & refactor logs --- .github/workflows/create-assets.yaml | 4 ++-- Ekisa.Chatbots.Listener/Models/ListaCitas.cs | 14 -------------- ....Listener.sln => Kibot.Appointment.Listener.sln | 2 +- .../Kibot.Appointment.Listener.csproj | 0 .../Models/Cita.cs | 8 ++------ Kibot.Appointment.Listener/Models/ListaCitas.cs | 8 ++++++++ .../Program.cs | 14 ++++++++------ .../appsettings.json | 0 8 files changed, 21 insertions(+), 29 deletions(-) delete mode 100644 Ekisa.Chatbots.Listener/Models/ListaCitas.cs rename Ekisa.Chatbots.Listener.sln => Kibot.Appointment.Listener.sln (83%) rename Ekisa.Chatbots.Listener/Ekisa.Chatbots.Listener.csproj => Kibot.Appointment.Listener/Kibot.Appointment.Listener.csproj (100%) rename Ekisa.Chatbots.Listener/Models/ChatBotCita.cs => Kibot.Appointment.Listener/Models/Cita.cs (80%) create mode 100644 Kibot.Appointment.Listener/Models/ListaCitas.cs rename {Ekisa.Chatbots.Listener => Kibot.Appointment.Listener}/Program.cs (88%) rename {Ekisa.Chatbots.Listener => Kibot.Appointment.Listener}/appsettings.json (100%) diff --git a/.github/workflows/create-assets.yaml b/.github/workflows/create-assets.yaml index e540c7b..4991cb6 100644 --- a/.github/workflows/create-assets.yaml +++ b/.github/workflows/create-assets.yaml @@ -30,7 +30,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.run_number }} - release_name: Ekisa.Chatbots.Listener ${{ github.ref }} + release_name: ${{ github.ref }} draft: false prerelease: false @@ -41,5 +41,5 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./kibot-x64.zip - asset_name: kibot_${{ github.event.release.tag_name }}_listener-x64.zip + asset_name: kibotlistener_${{ github.event.release.tag_name }}-x64.zip asset_content_type: application/zip diff --git a/Ekisa.Chatbots.Listener/Models/ListaCitas.cs b/Ekisa.Chatbots.Listener/Models/ListaCitas.cs deleted file mode 100644 index e71d912..0000000 --- a/Ekisa.Chatbots.Listener/Models/ListaCitas.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Ekisa.ChatBot.Client.Models -{ - public class ListaCitas - { - public string Citas { get; set; } - public int IdCliente { get; set; } - } -} diff --git a/Ekisa.Chatbots.Listener.sln b/Kibot.Appointment.Listener.sln similarity index 83% rename from Ekisa.Chatbots.Listener.sln rename to Kibot.Appointment.Listener.sln index f34e314..73f67fa 100644 --- a/Ekisa.Chatbots.Listener.sln +++ b/Kibot.Appointment.Listener.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.1.32228.430 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ekisa.Chatbots.Listener", "Ekisa.Chatbots.Listener\Ekisa.Chatbots.Listener.csproj", "{9D3B306A-1FDC-40CD-B972-036F641E5507}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kibot.Appointment.Listener", "Kibot.Appointment.Listener\Kibot.Appointment.Listener.csproj", "{9D3B306A-1FDC-40CD-B972-036F641E5507}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Ekisa.Chatbots.Listener/Ekisa.Chatbots.Listener.csproj b/Kibot.Appointment.Listener/Kibot.Appointment.Listener.csproj similarity index 100% rename from Ekisa.Chatbots.Listener/Ekisa.Chatbots.Listener.csproj rename to Kibot.Appointment.Listener/Kibot.Appointment.Listener.csproj diff --git a/Ekisa.Chatbots.Listener/Models/ChatBotCita.cs b/Kibot.Appointment.Listener/Models/Cita.cs similarity index 80% rename from Ekisa.Chatbots.Listener/Models/ChatBotCita.cs rename to Kibot.Appointment.Listener/Models/Cita.cs index 6b80219..3d546d7 100644 --- a/Ekisa.Chatbots.Listener/Models/ChatBotCita.cs +++ b/Kibot.Appointment.Listener/Models/Cita.cs @@ -1,12 +1,8 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace Ekisa.ChatBot.Client.Models +namespace Kibot.Appointment.Listener.Models { - public class ChatBotCita + public class ChatbotCita { public int Id { get; set; } public short? IdCliente { get; set; } diff --git a/Kibot.Appointment.Listener/Models/ListaCitas.cs b/Kibot.Appointment.Listener/Models/ListaCitas.cs new file mode 100644 index 0000000..342eb8e --- /dev/null +++ b/Kibot.Appointment.Listener/Models/ListaCitas.cs @@ -0,0 +1,8 @@ +namespace Kibot.Appointment.Listener.Models +{ + public class ListaCitas + { + public string Citas { get; set; } + public int IdCliente { get; set; } + } +} diff --git a/Ekisa.Chatbots.Listener/Program.cs b/Kibot.Appointment.Listener/Program.cs similarity index 88% rename from Ekisa.Chatbots.Listener/Program.cs rename to Kibot.Appointment.Listener/Program.cs index e812a94..2adb607 100644 --- a/Ekisa.Chatbots.Listener/Program.cs +++ b/Kibot.Appointment.Listener/Program.cs @@ -1,4 +1,4 @@ -using Ekisa.ChatBot.Client.Models; +using Kibot.Appointment.Listener.Models; using Microsoft.AspNetCore.SignalR.Client; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; @@ -9,7 +9,7 @@ using System.IO; using System.Linq; -namespace Ekisa.Chatbots.Listener +namespace Kibot.Appointment.Listener { public class Program { @@ -41,15 +41,17 @@ private static void ConnectHub() } else { - Console.WriteLine("SignalR connection established"); + Console.WriteLine($"Client: {_clientId}"); + Console.WriteLine("Connection established"); + Console.WriteLine($"Listening events from {_hubAddress}\n"); } }).Wait(); connection.On("received", citasRecibidas => { - var citas = JsonConvert.DeserializeObject>(citasRecibidas); + var citas = JsonConvert.DeserializeObject>(citasRecibidas); var citasCliente = citas.Where(x => x.IdCliente == _clientId).ToList(); - Console.WriteLine($"Citas recibidas: {citasCliente.Count}"); + Console.WriteLine($"Citas: {citasCliente.Count}"); foreach (var cita in citasCliente) { @@ -66,7 +68,7 @@ private static void ConnectHub() } } - static void ActualizarCita(ChatBotCita cita) + static void ActualizarCita(ChatbotCita cita) { try { diff --git a/Ekisa.Chatbots.Listener/appsettings.json b/Kibot.Appointment.Listener/appsettings.json similarity index 100% rename from Ekisa.Chatbots.Listener/appsettings.json rename to Kibot.Appointment.Listener/appsettings.json