Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions atomic_sdk/api/response_tickets.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def get_summary(self, ticket_id: str) -> Dict[str, Any]:
Returns:
A dictionary containing the summary of the ticket.
"""
endpoint = f"/response-ticket/get/summary/{ticket_id}"
return self._get(endpoint)
endpoint = "/response-ticket/get/summary"
return self._post(endpoint, data={"response-ticket-id": ticket_id})

def get_full(self, ticket_id: str) -> Dict[str, Any]:
"""
Expand All @@ -34,5 +34,18 @@ def get_full(self, ticket_id: str) -> Dict[str, Any]:
Returns:
A dictionary containing the full details of the ticket.
"""
endpoint = f"/response-ticket/get/full/{ticket_id}"
return self._get(endpoint)
endpoint = "/response-ticket/get/full"
return self._post(endpoint, data={"response-ticket-id": ticket_id})

def get_multi_status(self, ticket_ids: list[str]) -> Dict[str, Any]:
"""
Gets the status of multiple response tickets in a single request.

Args:
ticket_ids: A list of response ticket IDs.

Returns:
A dictionary containing the status of multiple tickets.
"""
Comment on lines +41 to +49

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in caa781f — added the blank line before Returns: and indented the description to match the other docstrings.

endpoint = "/response-ticket/multi-status"
return self._post(endpoint, data={"response-tickets[]": ticket_ids})
17 changes: 17 additions & 0 deletions atomic_sdk/api/sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,23 @@ def update_meta(self, key: str, value: Any, site_id: Optional[int] = None, domai
endpoint = f"/site-meta/{identifier}/{key}/update"
return self._post(endpoint, data={"value": value})

def remove_meta(self, key: str, site_id: Optional[int] = None, domain: Optional[str] = None) -> dict:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving this as dict intentionally — the immediate siblings update_meta and remove_alias in this file also return plain dict, so changing only remove_meta would reduce local consistency. A file-wide annotation cleanup would be better done separately.

"""
Removes a single metadata key for a site.

Args:
key: The metadata key to remove (e.g., 'php_version', 'suspended').
site_id: The Atomic site ID.
domain: The domain name of the site.

Returns:
The API response data.
"""

_, identifier = self._get_service_and_identifier(site_id, domain)
endpoint = f"/site-meta/{identifier}/{key}/remove"
return self._get(endpoint)

def get_phpmyadmin_url(self, site_id: Optional[int] = None, domain: Optional[str] = None) -> str:
"""
Gets a time-limited URL for accessing a site's database via phpMyAdmin.
Expand Down