Metadata-Version: 2.1
Name: randomstuff.py
Version: 1.0.2
Summary: An easy to use python API wrapper for Random Stuff API.
Home-page: https://github.com/nerdguyahmad/randomstuff.py
Author: nerdguyahmad
Author-email: nerdguyahmad.contact@gmain.com
License: MIT
Project-URL: Documentation, https://nerdguyahmad.gitbook.io/randomstuff/
Project-URL: Source, https://github.com/nerdguyahmad/randomstuff.py
Project-URL: Tracker, https://github.com/nerdguyahmad/randomstuff.py/issues
Keywords: api-wrapper randomstuff api wrapper
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: aiohttp
Requires-Dist: requests

# randomstuff.py
An easy to use python API wrapper for the Random Stuff API.

## Quickstart
Firstly make sure to [get the API key from here](https://api.pgamerx.com/register)

Here are few examples to get you started.

### Getting AI response
```py
import randomstuff

client = randomstuff.Client(key='api-key-here')

response = client.get_ai_response("Hi there")
client.close()
print(response)
```

### Getting random joke
```py
import randomstuff

client = randomstuff.Client(key='api-key-here')

response = client.get_joke(type="any")
client.close()
print(response.joke)
```

### Getting random image
```py
import randomstuff

client = randomstuff.Client(key='api-key-here')

response = client.get_joke(type="any")
client.close()
print(response)
```

## Async Support
This library also supports async usage.
```py
import randomstuff
import asyncio

client = randomstuff.AsyncClient()

def coro():
  response = await client.get_ai_response("Hello world")
  await client.close()  
  print(response)

loop = asyncio.get_event_loop()
loop.run_until_complete(coro())
```


