Skip to content

Commit

Permalink
new: remove capture
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Jul 26, 2024
1 parent a64299d commit eab076e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pylookyloo/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,13 @@ def hide_capture(self, tree_uuid: str) -> dict[str, str]:
r = self.session.post(urljoin(self.root_url, str(PurePosixPath('admin', tree_uuid, 'hide'))))
return r.json()

def remove_capture(self, tree_uuid: str) -> dict[str, str]:
'''Remove a capture, it will be impossible to get it by UUID (requires an authenticated user, use init_apikey first)'''
if not self.apikey:
raise AuthError('You need to initialize the apikey to use this method (see init_apikey)')
r = self.session.post(urljoin(self.root_url, str(PurePosixPath('admin', tree_uuid, 'remove'))))
return r.json()

def get_redirects(self, capture_uuid: str) -> dict[str, Any]:
'''Returns the initial redirects.
Expand Down

0 comments on commit eab076e

Please sign in to comment.