Skip to content

Commit

Permalink
Remove unused API endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
v411e committed Jun 22, 2024
1 parent bc756d5 commit 6a681c9
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions ppim-migrator/api/immich_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,6 @@ def __init__(self, base_url: str, api_key: str):
self.base_url = base_url
self.api_key = api_key

# GET /api/album/:id
def _get_album_info(self, album_id: str) -> dict:
url = f"{self.base_url}/api/album/{album_id}"
headers = {"Accept": "application/json", "x-api-key": self.api_key}
response = requests.request("GET", url, headers=headers)
json_response = response.json()
return json_response

def get_album_asset_uids(self, album_id: str) -> dict:
album_info = self._get_album_info(album_id)
assets = album_info.get("assets")
asset_uids = [asset.get("id") for asset in assets]
return set(asset_uids)

# POST /api/search/metadata
def search_metadata(self, originalFileName: str) -> dict:
url = f"{self.base_url}/api/search/metadata"
Expand Down

0 comments on commit 6a681c9

Please # to comment.