Skip to content

Instantly share code, notes, and snippets.

View DamianRyse's full-sized avatar

Damian Ryse DamianRyse

View GitHub Profile
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
namespace TwitchBitch
{
public interface IPlugin
public async static Task<string> GetWeather(string City)
{
HttpClient client = new HttpClient();
const string openweathermap_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx";
dynamic JSON = client.GetStringAsync("http://api.openweathermap.org/data/2.5/weather?q=" + City.ToLower() + "&APPID=" + openweathermap_id + "&units=metric").Result;
// Be sure, there is no error.
try
{
@DamianRyse
DamianRyse / myClass.cs
Created April 28, 2017 23:00
TwitchBitch Plugin template
using System.Linq;
using System.Text.RegularExpressions;
using TwitchBitch2;
namespace TwitchBitch_Plugin_Template
{
[PluginDisplayName("Your Plugin name")] // you must provice a display name...
[PluginDescription("Description of plugin")] // as well as a description (max 140 chars)...
[PluginCopyright("Copyright (c) YourCompany")] // and your copyright declaration.
[PluginVersion("1.0.0.0")]