Skip to content

2.0.0

Compare
Choose a tag to compare
@GLEF1X GLEF1X released this 13 Feb 18:08
· 181 commits to dev-2.x since this release

glQiwiApi 2.x has breaking changes. It breaks backwards compatibility by introducing new breaking changes!

Features of glQiwiApi 2.x:

  • Separated concept of p2p API and wallet API so you can use it separately with help of QiwiWallet and QiwiP2PClient. Backward compatibility with glQiwiApi <= 1.1.4 is saved partially QiwiWrapper means
  • Error handling was rewritten and overthinking. Now full traceback from glQiwiApi is something like shown below:
async def main():
    async with QiwiWrapper(api_access_token="", phone_number="+") as wallet:
        # raises QiwiAPIError due to amount mustn't be negative and phone number must be in a valid format
        await wallet.to_wallet(to_number="wrong number", amount=-1) 

glQiwiApi.qiwi.exceptions.QiwiAPIError: Query syntax error (invalid data format). Can be related to wrong arguments, that you have passed to method
    * 400 HTTP status code
    * raw response {
    "code": "QWPRC-300",
    "message": "Техническая ошибка"
}
  • Polling of updates could be executed as a coroutine. So in your framework(aiogram or something else) you can do it like shown below:
from aiogram import Dispatcher

from glQiwiApi.core.event_fetching.executor import start_non_blocking_qiwi_api_polling


async def on_startup(dp: Dispatcher):
    await start_non_blocking_qiwi_api_polling()
  • Internal API of the glQiwiApi was changed for the better. Now the API methods are presented as python classes
  • Tests now cover more than 95% of critical use cases
  • QIWI Master API was fixed
  • Cache has became plugin-like, not neccessary feature
  • Self-signed SSL certificates can be easily generated using utility function. It could be helpful for aiogram webhooks either.
  • #9 fixed and now you can easily build your own proxy to add Referrer HTTP header or use built-in