From 06dc88f122a4f82d2c5cab07902762b5a99b0959 Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Wed, 1 Dec 2021 23:42:01 +0100 Subject: [PATCH] Forgot to add Photo::get --- pychee/pychee.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pychee/pychee.py b/pychee/pychee.py index cb384e7..d8a1044 100644 --- a/pychee/pychee.py +++ b/pychee/pychee.py @@ -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.""" @@ -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