Skip to content

Commit

Permalink
feat: Add Caido::Instance class with scopes and scope methods
Browse files Browse the repository at this point in the history
  • Loading branch information
hahwul committed Jun 30, 2024
1 parent 1e75950 commit caa3d5a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions lib/caido/helpers/scope.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit caa3d5a

Please sign in to comment.