getRuleset method

Future<Ruleset> getRuleset(
  1. String name
)

Gets the Ruleset identified by the given name. The input name should be the short name string without the project ID prefix. For example, to retrieve the projects/project-id/rulesets/my-ruleset, pass the short name "my-ruleset". Rejects with a not-found error if the specified Ruleset cannot be found.

name - Name of the Ruleset to retrieve. Returns a future that fulfills with the specified Ruleset.

Implementation

Future<Ruleset> getRuleset(String name) async {
  final rulesetResponse = await _client.getRuleset(name);

  return Ruleset._fromResponse(rulesetResponse);
}