Skip to content

Commit

Permalink
Refactor Caido::Instance class initialization and automate session me…
Browse files Browse the repository at this point in the history
…thods
  • Loading branch information
hahwul committed Jun 24, 2024
1 parent b82a2ac commit 0e56e5d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 11 deletions.
30 changes: 30 additions & 0 deletions lib/caido/helpers/automate.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 automate_session(id)
query("query{
automateSession(id: \"#{id}\"){
id
name
raw
createdAt
}
}")['automateSession']
end

def automate_sessions
query('query{
automateSessions{
nodes{
id
name
raw
createdAt
}
}
}')['automateSessions']
end
end
end
11 changes: 0 additions & 11 deletions lib/caido/helpers/example.rb

This file was deleted.

0 comments on commit 0e56e5d

Please sign in to comment.