Skip to content

Commit

Permalink
up version in setup.py and changelog.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Soheab committed Aug 1, 2020
1 parent aacaca8 commit 23d8e82
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
22 changes: 9 additions & 13 deletions alexflipnote/client.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import asyncio
from asyncio import get_event_loop
from random import randint
from re import search
from typing import Union
from typing import Union, Tuple, Any

import typing
from aiohttp import ClientSession

from .classes import Colour, Steam, Image, Icon
Expand All @@ -24,6 +23,7 @@ def _parse_text(text: str) -> str:
"#": "%23",
"$": "%24",
"%": "%25",
"&": "%26",
"*": "%2A",
"=": "%3D",
"@": "%40",
Expand Down Expand Up @@ -56,7 +56,7 @@ async def _check_url(self, url: str):

# Json/URL

async def support_server(self, creator: bool = False) -> typing.Tuple[typing.Any, str]:
async def support_server(self, creator: bool = False) -> Tuple[Any, str]:
api = await self._session.get(self._api_url)
support_server = (await api.json()).get("support_server")
if creator:
Expand Down Expand Up @@ -130,7 +130,7 @@ async def github_colours(self) -> dict:
# Image

async def achievement(self, text: str, icon: Union[int, str, Icon] = None) -> Image:
text = _parse_text(text)
text = _parse_text(str(text))
actual_icon = ""
if icon is not None:
if isinstance(icon, int):
Expand Down Expand Up @@ -203,9 +203,6 @@ async def challenge(self, text: str, icon: Union[int, str, Icon] = None) -> Imag
if icon is not None and actual_icon != "":
actual_icon = f"&icon={actual_icon}"

if icon is not None and actual_icon != "":
actual_icon = f"&icon={actual_icon}"

url = f"{self._api_url}/challenge?text={text}{actual_icon}"

return Image(url, self._session)
Expand Down Expand Up @@ -250,16 +247,15 @@ async def colourify(self, image: str, colour="", background="") -> Image:
return Image(url, self._session)

async def didyoumean(self, top: str, bottom: str) -> Image:
top = top.replace(" ", "%20").replace("#", "%23")
bottom = bottom.replace(" ", "%20").replace("#", "%23")

top = _parse_text(top)
bottom = _parse_text(bottom)
url = f"{self._api_url}/didyoumean?top={top}&bottom={bottom}"

return Image(url, self._session)

async def drake(self, top: str, bottom: str) -> Image:
top = top.replace(" ", "%20").replace("#", "%23")
bottom = bottom.replace(" ", "%20").replace("#", "%23")
top = _parse_text(top)
bottom = _parse_text(bottom)
url = f"{self._api_url}/drake?top={top}&bottom={bottom}"

return Image(url, self._session)
Expand Down
4 changes: 2 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
See here what changed or broke each version. \
For any questions and support, you can join the [AlexFlipnote server](https://discord.gg/alexflipnote)

## 1.3.1
Added support for the new `wide` filter.
## 1.4.0
- Added support for the new `wide` filter.

## 1.3.1
This one fixed `alexflipnote.Image.read()` raising a TypeError instead of returning BytesIO.
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
description = 'An easy to use Python Wrapper for the AlexFlipnote API',
long_description = readme,
long_description_content_type = 'text/markdown',
version = '1.3.1',
version = '1.4.0',
packages = ['alexflipnote'],
url = 'https://github.com/Soheab/Alexflipnote.py',
download_url = 'https://github.com/Soheab/alexflipnote.py/archive/1.3.1.tar.gz',
download_url = 'https://github.com/Soheab/alexflipnote.py/archive/1.4.0.tar.gz',
license = 'MIT',
author = 'Soheab_',
install_requires = ['aiohttp'],
keywords = ['alexflipnote', 'discord', 'api'],
project_urls = {
"Discord": "https://discord.gg/alexflipnote",
"Discord": "https://discord.gg/DpxkY3x",
"Source": "https://github.com/Soheab/alexflipnote.py",
"Documentation": "https://github.com/Soheab/alexflipnote.py/blob/master/docs.md",
"Issue tracker": "https://github.com/Soheab/alexflipnote.py/issues",
Expand Down

0 comments on commit 23d8e82

Please sign in to comment.