Skip to content

Commit

Permalink
Forgot to add Photo::get
Browse files Browse the repository at this point in the history
  • Loading branch information
Chostakovitch committed Dec 1, 2021
1 parent f013b45 commit 06dc88f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pychee/pychee.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from typing import List
from requests import Session

__version__ = 0.1
__version__ = 0.2

class LycheeForbidden(Exception):
"""Raised when the Lychee request is unauthorized."""
Expand Down Expand Up @@ -216,6 +216,11 @@ def get_frame_settings(self) -> dict:
"""
return self._session.post('Frame::getSettings').json()

def get_photo(self, photo_id) -> dict:
"""Get information about a photo."""
data = {'photoID': photo_id}
return self._session.post('Photo::get', data=data).json()

def get_random_photo(self) -> bytes:
"""Get a random photo with current auth."""
return self._session.post('Photo::getRandom').content
Expand Down

0 comments on commit 06dc88f

Please sign in to comment.