OAuthGenerator.fromYamlCredentials constructor

OAuthGenerator.fromYamlCredentials({
  1. required String credentialsFile,
  2. required Dio dio,
})

Implementation

factory OAuthGenerator.fromYamlCredentials(
    {required String credentialsFile, required Dio dio}) {
  return OAuthGenerator(
      oauthCredentials: OAuthCredentials.fromJson(jsonDecode(
          jsonEncode(loadYaml(File(credentialsFile).readAsStringSync())))),
      dio: dio);
}