Skip to content

Instantly share code, notes, and snippets.

View icebeam7's full-sized avatar
💭
🎶 You can roam the world with colours, flying high 🎶

Luis Beltran icebeam7

💭
🎶 You can roam the world with colours, flying high 🎶
View GitHub Profile
@icebeam7
icebeam7 / Tweet.cs
Created April 12, 2018 14:53
SentimentalTweets: Tweet.cs
namespace SentimentalTweets.Modelos
{
public class Tweet
{
public string Mensaje { get; set; }
public string Idioma { get; set; }
}
}
@icebeam7
icebeam7 / TweetAnalytics.cs
Last active April 12, 2018 14:53
SentimentalTweets: TweetAnalytics.cs
namespace SentimentalTweets.Modelos
{
public class TweetAnalytics : Tweet
{
public double Sentimiento { get; set; }
public string PalabrasClave { get; set; }
}
}
@icebeam7
icebeam7 / ServicioTextAnalytics.cs
Last active April 12, 2018 14:54
Sentimental Tweets: ServicioTextAnalytics.cs
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using SentimentalTweets.Modelos;
using SentimentalTweets.Helpers;
using System.Net.Http;
using System.Net.Http.Headers;
using Newtonsoft.Json.Linq;
@icebeam7
icebeam7 / Document.cs
Created April 12, 2018 14:54
Sentimental Tweets: Document.cs
namespace SentimentalTweets.Modelos
{
public class Document
{
public string Id { get; set; }
public string Text { get; set; }
public string Language { get; set; }
}
}
@icebeam7
icebeam7 / StringToColorConverter.cs
Created April 12, 2018 14:55
Sentimental Tweets: StringToColorConverter.cs
using System;
using System.Globalization;
using Xamarin.Forms;
namespace SentimentalTweets.Helpers
{
public class StringToColorConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
@icebeam7
icebeam7 / Constantes.cs
Created April 12, 2018 14:55
Sentimental Tweets: Constantes.cs
namespace SentimentalTweets.Helpers
{
public static class Constantes
{
public static readonly string TwitterApiKey = "";
public static readonly string TwitterApiSecret = "";
public static readonly string TextAnalyticsApiKey = "";
public static readonly string TextAnalyticsEndpoint = "";
}
}
@icebeam7
icebeam7 / Constantes.cs
Created April 16, 2018 10:41
Hora Local: Constantes.cs
namespace HoraLocal.Helpers
{
public static class Constantes
{
public static readonly string TimeZoneApiKey = "";
}
}
@icebeam7
icebeam7 / App.xaml.cs
Created April 16, 2018 10:44
Hora Local: App.xaml.cs
using Xamarin.Forms;
namespace HoraLocal
{
public partial class App : Application
{
public App ()
{
InitializeComponent();
@icebeam7
icebeam7 / TimeZoneInfo.cs
Last active April 16, 2018 10:45
Hora Local: TimeZoneInfo.cs
namespace HoraLocal.Modelos
{
public class TimeZoneInfo
{
public long dstOffset { get; set; }
public long rawOffset { get; set; }
public string status { get; set; }
public string timeZoneId { get; set; }
public string timeZoneName { get; set; }
}
@icebeam7
icebeam7 / ServicioGelocalizacion.cs
Last active April 16, 2018 11:20
Hora Local: ServicioGelocalizacion
// Ejemplo adaptado de la documentación: https://jamesmontemagno.github.io/GeolocatorPlugin/CurrentLocation.html
using Plugin.Geolocator;
using Plugin.Geolocator.Abstractions;
using System;
using System.Threading.Tasks;
namespace HoraLocal.Servicios
{
public static class ServicioGelocalizacion
{