Skip to content

Quantum-0/memealerts

Repository files navigation

Memealerts Python Client

This project is a library which provides you clients for interaction with memealerts.

Install

pip install memealerts

Usage

Using sync client

from memealerts import MemealertsClient

token = "<Your bearer token>"

cli = MemealertsClient(token)

supporters = cli.get_supporters()
first_supporter = supporters.data[0].supporterId
cli.give_bonus(first_supporter, 5)

Using async client

import asyncio
from memealerts import MemealertsAsyncClient

token = "<Your bearer token>"

cli = MemealertsAsyncClient(token)

async def main():
    supporters = await cli.get_supporters()
    first_supporter = supporters.data[0].supporterId
    await cli.give_bonus(first_supporter, 5)

asyncio.run(main())

Badges

wakatime Black GitHub Org's stars PyPI - License PyPI PyPI - Status PyPI - Python Version PyPI - Downloads

License

MIT License

TODO

  • handle errors from api
  • iterator for all supporters
  • user/find
  • other methods and schemas

Packages

No packages published

Languages