Skip to content

Commit

Permalink
Added support for new endpoint: .drip() and fixed links on pypi.
Browse files Browse the repository at this point in the history
  • Loading branch information
Soheab committed Jan 9, 2021
1 parent f046c29 commit 2770831
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 20 deletions.
40 changes: 28 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[![Downloads Total](https://pepy.tech/badge/vacefron-py)](https://pepy.tech/project/vacefron-py)
[![Downloads Month](https://pepy.tech/badge/vacefron-py/month)](https://pepy.tech/project/vacefron-py)
[![Downloads Week](https://pepy.tech/badge/vacefron-py/week)](https://pepy.tech/project/vacefron-py)
[![PyPi Version](https://img.shields.io/pypi/v/vacefron.py.svg)](https://pypi.python.org/pypi/vacefron.py/)
[![Downloads](https://pepy.tech/badge/vacefron-py)](https://pepy.tech/project/vacefron-py)
[![MIT License](https://img.shields.io/apm/l/atomic-design-ui.svg?)](https://github.com/tterb/Atomic-Design-UI/blob/master/LICENSE.md)
[![MIT License](https://img.shields.io/apm/l/atomic-design-ui.svg?)](https://github.com/tterb/atomic-design-ui/blob/master/LICENSEs)

# VACEfron.py

A Wrapper for [vacefron.nl/api](https://vacefron.nl/api/) written in Python.
A Wrapper for [vacefron.nl/api][base_url] written in Python.

## Requirements

Expand All @@ -22,22 +24,36 @@ Install the package by doing one of the following commands:

## Documentation

See the full and detailed [docs here](docs.md)
See the full and detailed [docs here][docs]

## Links

[API](https://vacefron.nl/api/) | [Changelogs](https://github.com/Soheab/vacefron.py/blob/master/changelog.md)
| [Examples](https://github.com/Soheab/vacefron.py/blob/master/docs.md#examples)
[API][base_url] | [Changelogs][changelog] | [Examples][examples] | [Github][github] | [PyPi][pypi]

## Made by

This wrapper is made by **Soheab#6240**. DM me on Discord or join my server [here](https://discord.gg/yCzcfju) for
anything related to this wrapper.
This wrapper is made by **Soheab#6240**, DM me on Discord or join my server [here][discord_mine] for anything related to
this wrapper.

You can join VAC Efron's server [here](https://discord.gg/xJ2HRxZ) to suggest or report anything on the API.
You can join VAC Efron's server [here][discord_vacefron] to suggest or report anything on the API.

## Other Wrappers

- **Csharp:** [GitHub](https://github.com/VACEfron/VACEfron.NET) | [Nuget](https://www.nuget.org/packages/VACEfron.NET)
- **Javascript:** [GitHub](https://github.com/Sidemen19/VACEfron.js) | [Npm](https://npmjs.com/package/vacefron)
- **Java:** [GitHub](https://github.com/thunderstorm010/VACEfron4J)
- **Csharp:** [GitHub][wrappers_csharp-github] | [Nuget][wrapper_csharp-nuget]
- **Javascript:** [GitHub][wrappers_js-github] | [Npm][wrapper_js-npm]
- **Java:** [GitHub][wrappers_java-github]


[docs]: https://github.com/Soheab/vacefron.py/blob/master/docs.md
[changelog]: https://github.com/Soheab/vacefron.py/blob/master/changelog.md
[examples]: https://github.com/Soheab/vacefron.py/blob/master/docs.md#examples
[base_url]: https://vacefron.nl/api/
[github]: https://github.com/Soheab/vacefron.py
[pypi]: https://pypi.org/project/vacefron.py/
[discord_vacefron]: https://discord.gg/xJ2HRxZ
[discord_mine]: https://discord.gg/yCzcfju
[wrappers_csharp-github]: https://github.com/VACEfron/VACEfron.NET
[wrapper_csharp-nuget]: https://www.nuget.org/packages/VACEfron.NET
[wrappers_js-github]: https://github.com/Sidemen19/VACEfron.js
[wrapper_js-npm]: https://npmjs.com/package/vacefron
[wrappers_java-github]: https://github.com/thunderstorm010/VACEfron4J
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ See here what changed or broke each version.

---

### v1.6.0 - January 9, 2020

- Added support for a new endpoint: [.drip()](docs.md#await-vac_apidock_of_shameuser). See more in the docs.
- Fixed hyperlinks to docs and others for PyPi's description.

### v1.5.1 - January 8, 2020

- Added support for `circle_avatar` arg in [.rank_card()](docs.md#rank-card). See more in the docs.
Expand Down
20 changes: 16 additions & 4 deletions docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@ Generate that "dock of shame" meme with your avatar.

---

### await vac_api.drip(user)

For your own Goku drip memes :)

**Parameters**:

- user `string` | Avatar of user.

**Return type:** [Image](docs.md#image "Image object attributes")

---

### await vac_api.car_reverse(text)

Generate that "car reverse" meme with your own text.
Expand Down Expand Up @@ -336,10 +348,10 @@ async def rank(ctx, member: discord.Member = None):
current_xp = int(user_rank['current_xp']),
next_level_xp = 500, # you will need calculate this according the current_xp
previous_level_xp = 50, # you will need calculate this according the current_xp
custom_background = str(user_rank["background"]), # optional
xp_color = str(user_rank["bar_color"]), # optional
is_boosting = bool(member.premium_since), # optional
circle_avatar = True # optional
custom_background = str(user_rank["background"]), # optional custom background.
xp_color = str(user_rank["bar_color"]), # optional progress bar color. Defaults to #fcba41.
is_boosting = bool(member.premium_since), # optional server boost icon next to username.
circle_avatar = True # optional circle avatar instead of a square.
)
rank_image = discord.File(fp = await gen_card.read(), filename = f"{member.name}_rank.png")
await ctx.send(f"{member.name}'s rank in {ctx.guild.name}", file = rank_image)
Expand Down
2 changes: 1 addition & 1 deletion vacefron/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

__license__ = "MIT"
__author__ = "Soheab_"
__version__ = "1.5.1"
__version__ = "1.6.0"
10 changes: 7 additions & 3 deletions vacefron/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,17 @@ async def batman_slap(self, text: str, text2: str, batman: str = None, robin: st
return Image(str(response.url), response)

async def distracted_bf(self, boyfriend: str, girlfriend: str, woman: str) -> Image:
response = await self._api_request(
"distractedbf", {"boyfriend": str(boyfriend), "girlfriend": str(girlfriend), "woman": str(woman)})
response = await self._api_request("distractedbf", {"boyfriend": str(boyfriend), "girlfriend": str(girlfriend),
"woman": str(woman)})
return Image(str(response.url), response)

async def dock_of_shame(self, user: str) -> Image:
response = await self._api_request("dockofshame", {"user": str(user)})
return Image(str(response.url), response)

async def drip(self, user: str) -> Image:
response = await self._api_request(
"dockofshame", {"user": str(user)})
"drip", {"user": str(user)})
return Image(str(response.url), response)

async def car_reverse(self, text: str) -> Image:
Expand Down

0 comments on commit 2770831

Please sign in to comment.