Beispiel #1
0
        // Can be used in case you use multiple tokens (originally planned but not implemented yes)
        private static async void LoadToken(string channelID)
        {
            JsonStorage json = new JsonStorage("Data/Database/googleTokens.json");
            List <KeyValuePair <string, object> > list = await json.GetDataAsync(channelID);

            string token = (list.Count > 0) ? JsonConvert.SerializeObject(list[0].Value) : "{}";

            System.IO.File.WriteAllText("token.json/Google.Apis.Auth.OAuth2.Responses.TokenResponse-user", token);
        }