#pragma warning restore 0649 public static async Task <bool> ReadCreds(string path) { // Read credentials as Token and DevID into a struct object from creds.json string info = ""; using (FileStream fs = File.OpenRead(path)) using (StreamReader sr = new StreamReader(fs)) info = await sr.ReadToEndAsync(); CredsJson creds = JsonConvert.DeserializeObject <CredsJson>(info); C_API_K = creds.C_API_K; C_API_S_K = creds.C_API_S_K; TOKEN = creds.TOKEN; TOKEN_S = creds.TOKEN_S; TWITCH_CID = creds.TWITCH_CID; return(true); }
#pragma warning restore 0649 public static async Task <bool> ReadCreds(string path) { // Read credentials as Token and DevID into a struct object from creds.json string info = ""; using (FileStream fs = File.OpenRead(path)) using (StreamReader sr = new StreamReader(fs)) info = await sr.ReadToEndAsync(); CredsJson creds = JsonConvert.DeserializeObject <CredsJson>(info); ConsumerKey = creds.ConsumerKey; ConsumerSecret = creds.ConsumerSecret; AuthToken = creds.AuthToken; AuthSecret = creds.AuthSecret; TwitchId = creds.TwitchId; TwitchSecret = creds.TwitchSecret; return(true); }