Skip to content

Commit e89206f

Browse files
authored
Added support for shame endpoint. (#7)
1 parent 01d3d03 commit e89206f

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

alexflipnote/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
__license__ = "MIT"
66
__author__ = "Soheab_"
7-
__version__ = "2.0.2"
7+
__version__ = "2.1.0"

alexflipnote/classes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77

88
class Image:
9-
def __init__(self, url: str, session) -> None:
9+
def __init__(self, url: str, response) -> None:
1010
self.url: str = url
11-
self.response: ClientResponse = session
11+
self.response: ClientResponse = response
1212

1313
def __str__(self) -> str:
1414
return self.url if self.url is not None else ""

alexflipnote/client.py

+4
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@ async def what(self, image: str) -> Image:
264264
response = await self._api_request("what", {"image": str(image)})
265265
return Image(str(response.url), response)
266266

267+
async def shame(self, image: str) -> Image:
268+
response = await self._api_request("shame", {"image": str(image)})
269+
return Image(str(response.url), response)
270+
267271
# Other
268272

269273
async def support_server(self, creator: bool = False) -> Union[str, Tuple]:

changelog.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
See here what changed or broke each version.
33

44
---
5+
### v2.1.0 - January 3, 2021
6+
- Added support for a new endpoint: `.shame()` [See more in docs](docs.md#await-alex_apishameimage)
7+
58
### v2.0.2 - November 24, 2020
69
- Push better README to PyPi
710
- Fixes `.pornhub()` having the same value for text2.
@@ -13,7 +16,7 @@ See here what changed or broke each version.
1316
This introduced the required token in the constructor to be up to date with the api.
1417

1518
### v1.7.0 - November 1, 2020
16-
- Added support for new endpoint: `.what()` [See more in docs](docs.md#await-alex_apiwhatimage)
19+
- Added support for a new endpoint: `.what()` [See more in docs](docs.md#await-alex_apiwhatimage)
1720
- Now using urllib.parse to parse text.
1821
- Added `bytesio=True` to `Image.read()` set it to False if you want the bytes returned instead of an io.BytesIO object.
1922
- Removed `.steam()`.

0 commit comments

Comments
 (0)