diff --git a/lib/caido/helpers/scope.rb b/lib/caido/helpers/scope.rb new file mode 100644 index 0000000..e505fad --- /dev/null +++ b/lib/caido/helpers/scope.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +module Caido + # Instance class + class Instance + def scopes + query("query{ + scopes{ + id + name + allowlist + denylist + indexed + } + }")['scopes'] + end + + def scope(id) + query("query{ + scope(id: \"#{id}\"){ + id + name + allowlist + denylist + indexed + } + }")['scope'] + end + end +end