This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |