@@ -21,6 +21,7 @@ about its business.
2121* :py:class: `~botogram.Message `
2222* :py:class: `~botogram.Photo `
2323* :py:class: `~botogram.PhotoSize `
24+ * :py:class: `~botogram.ChatPhoto `
2425* :py:class: `~botogram.Audio `
2526* :py:class: `~botogram.Document `
2627* :py:class: `~botogram.Sticker `
@@ -772,6 +773,12 @@ about its business.
772773
773774 .. versionadded :: 0.3
774775
776+ .. py :attribute :: photo
777+
778+ The current chat photo, represented by a :py:class: `~botogram.ChatPhoto ` object.
779+
780+ .. versionadded :: 0.7
781+
775782 .. py :method :: status_of(user)
776783
777784 Return the status of the provided user (either an instance of
@@ -1445,6 +1452,20 @@ about its business.
14451452
14461453 .. versionadded :: 0.6
14471454
1455+ .. py :method :: set_photo(path)
1456+
1457+ Set a new chat photo, by providing its path.
1458+
1459+ :param str path: The path to the new photo
1460+
1461+ .. versionadded :: 0.7
1462+
1463+ .. py :method :: remove_photo()
1464+
1465+ Remove the current chat photo.
1466+
1467+ .. versionadded :: 0.7
1468+
14481469.. py :class :: botogram.ParsedText
14491470
14501471 This class contains the parsed representation of the text of a received
@@ -2419,6 +2440,32 @@ about its business.
24192440
24202441 :param str path: The file name path locating where the image should be saved.
24212442
2443+ .. py :class :: botogram.ChatPhoto
2444+
2445+ This class represents a Telegram API chat photo.
2446+
2447+ It consists of two file IDs, each one representing a different size of the current chat photo.
2448+
2449+ The photos can be saved using the method :py:meth: `~ChatPhoto.save `
2450+
2451+ .. py :attribute :: big
2452+
2453+ The string ID of the 640x640 version of the chat photo
2454+
2455+ .. py :attribute :: small
2456+
2457+ The string ID of the 160x160 version of the chat photo
2458+
2459+ .. py :method :: save(path [, big=True ])
2460+
2461+ Save the image represented to a file located by *path *. Be aware that
2462+ Telegram does not provide the name of the original file sent by its
2463+ sender. This should be generated as part of the path.
2464+
2465+ :param str path: The file name path locating where the image should be saved.
2466+ :param bool big: Whether it should save the big or the small version of the chat photo
2467+
2468+ .. versionadded :: 0.7
24222469
24232470.. py :class :: botogram.Audio
24242471
0 commit comments