معرفی شرکت ها


campfire-basic-1.1.1


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Campfire API basic functions
ویژگی مقدار
سیستم عامل OS Independent
نام فایل campfire-basic-1.1.1
نام campfire-basic
نسخه کتابخانه 1.1.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده Camper-CoolDie <campercooldie@gmail.com>
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/campfire-basic/
مجوز MIT License Copyright (c) 2022 theCoolDie Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This module includes several basic functions for asynchronously sending and receiving data from Campfire server. It can also receive push notifications. [![campfire-basic PyPI](https://img.shields.io/pypi/v/campfire-basic.svg)](https://pypi.org/project/campfire-basic) # Installation Using `pip` command: ``` pip install campfire-basic ``` Clone this repository using `git` command: ``` git clone https://github.com/Camper-CoolDie/campfire-basic ``` # Examples ## Requesting ```py import campfire import asyncio async def main(): print(await campfire.send("RProjectVersionGet")) # {'ABParams': {}, 'version': '1.290'} asyncio.run(main()) ``` Code above gets current version of Campfire. ## Log in A lot of requests will raise exception if user is not logged in. ```py import campfire import asyncio req = { "fandomId": 10, "languageId": 1 } async def main(): print(await campfire.send("RFandomsGet", req)) # ApiRequestException: Error occurred while processing request ("ERROR_UNAUTHORIZED") log = campfire.login("email", "password") print(await log.send("RFandomsGet", req)) # {'fandom': {'subscribesCount': 1105, 'imageId'... asyncio.run(main()) ``` ## Receiving notifications You can receive all notifications Campfire server sending to you. ```py import campfire log = campfire.login("email", "password") # Generate FCM token token = campfire.token() async def main(): # Send token to Campfire server if it is not added if not token.exists(): await log.send("RAccountsAddNotificationsToken", {"token": ntoken.fcm}) # Listen to notifications def notifi(n): print(notifi) await campfire.listen(token, notifi) print("It works asynchronously!") asyncio.run(main()) ``` Or, wait for notification: ```py import campfire import asyncio log = campfire.login("email", "password") token = campfire.token() async def main(): if not token.exists(): await log.send("RAccountsAddNotificationsToken", {"token": token}) # Wait for notification async with campfire.wait(token) as n: print(n) # With filter (wait for subscriber) async with campfire.wait(token, {"J_N_TYPE": 4}) as n: print(n["account"]["J_NAME"]) # Timeout! try: async with campfire.wait(token, {}, 15.0) as n: print(n) except asyncio.TimeoutError: print("Time is out") asyncio.run(main()) ```


نیازمندی

مقدار نام
>=3.1 cryptography
- oscrypto
- http-ece
<=3.20 protobuf


زبان مورد نیاز

مقدار نام
>=3.7 Python


نحوه نصب


نصب پکیج whl campfire-basic-1.1.1:

    pip install campfire-basic-1.1.1.whl


نصب پکیج tar.gz campfire-basic-1.1.1:

    pip install campfire-basic-1.1.1.tar.gz