Metadata-Version: 2.1
Name: willofsteel
Version: 0.1
Summary: A Python wrapper for the Discord API
Home-page: https://wrapper.itsneil.tech
Author: ItsNeil
License: MIT
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.8.0
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: aiohttp<4,>=3.7.4
Provides-Extra: voice
Requires-Dist: PyNaCl<1.6,>=1.3.0; extra == "voice"
Provides-Extra: docs
Requires-Dist: sphinx==4.4.0; extra == "docs"
Requires-Dist: sphinxcontrib_trio==1.1.2; extra == "docs"
Requires-Dist: sphinxcontrib-websupport==1.2.4; extra == "docs"
Requires-Dist: sphinxcontrib-applehelp==1.0.4; extra == "docs"
Requires-Dist: sphinxcontrib-devhelp==1.0.2; extra == "docs"
Requires-Dist: sphinxcontrib-htmlhelp==2.0.1; extra == "docs"
Requires-Dist: sphinxcontrib-jsmath==1.0.1; extra == "docs"
Requires-Dist: sphinxcontrib-qthelp==1.0.3; extra == "docs"
Requires-Dist: sphinxcontrib-serializinghtml==1.1.5; extra == "docs"
Requires-Dist: typing-extensions<5,>=4.3; extra == "docs"
Requires-Dist: sphinx-inline-tabs==2023.4.21; extra == "docs"
Provides-Extra: speed
Requires-Dist: orjson>=3.5.4; extra == "speed"
Requires-Dist: aiodns>=1.1; extra == "speed"
Requires-Dist: Brotli; extra == "speed"
Requires-Dist: cchardet==2.1.7; python_version < "3.10" and extra == "speed"
Provides-Extra: test
Requires-Dist: coverage[toml]; extra == "test"
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-asyncio; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: pytest-mock; extra == "test"
Requires-Dist: typing-extensions<5,>=4.3; extra == "test"
Requires-Dist: tzdata; sys_platform == "win32" and extra == "test"

Will of Steel API Wrapper
=========================

A modern, easy to use, Pythonic API wrapper for the Will of Steel API in
Python.

Installing
~~~~~~~~~~

**Python 3.8 or higher is required**

On windows, the library can be installed using the following command:

.. code:: py

   py -3 -m install willofsteel

On macOS/linux, use the following command:

::

   python3 pip install willofsteel

If desired, you can also clone the repository directly:

::

   git clone https://github.com/WillofSteel-Devs/api-wrapper

Using the library
~~~~~~~~~~~~~~~~~

**Creating a Client**

To create a client to interact with the API with, you can use the
followning code:

.. code:: py

   import willofsteel

   API_KEY = 'Place your api key here'

   client = willofsteel.Wrapper(API_KEY)

**Example**

A quick example of using this library is to look up your profile every
hour and send the results to a text file, this can be accomplished with
the following:

.. code:: py

   import willofsteel
   import time

   API_KEY = 'Place your api key here'
   client = willofsteel.Wrapper(API_KEY)


   def scheduled_query():

       # Querying the api for the api key holder's profile
       player = client.get_player()
       
       # Creating a file name to log the results with
       timestamp = time.asctime().replace(':', '_')

       # Logging results
       with open(f'{timestamp}.txt', 'x', encoding='utf-8') as f:
           f.write(player)
       
       print(f"Query made at {timestamp}")

   while True:
       scheduled_query()
       time.sleep(3600)
