-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from clvrk/dev
Docs
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Usage of search function: | ||
```python | ||
import cocktaildb | ||
|
||
async def tequila_info(): | ||
return await cocktaildb.search(query='tequila') | ||
``` | ||
Parameters include query, id, key, category, dict: bool, first_letter_only: bool, ingredient: bool, random: bool. | ||
All of which default to either None or False. | ||
|
||
Lists of categories, ingredients etc. that may appear: | ||
``` | ||
import cocktaildb | ||
# This is in literally a list, not in the form of a dict or string | ||
async def list_of_categories(): | ||
return await cocktaildb.categories() | ||
``` | ||
There are more functions such as glasses() and ingredients(). | ||
|
||
This is a simple api wrapper that only supports free endpoints (for now atleast). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from cocktaildb import search, categories, ingredients, glasses |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import setuptools | ||
|
||
with open("requirements.txt", "r") as f: | ||
requirements = f.readlines() | ||
|
||
|
||
setuptools.setup ( | ||
name='cocktail-wrapper', | ||
author='clvrk', | ||
author_email="[email protected]", | ||
url="https://github.com/clvrk/cocktail-wrapper", | ||
version='1.0.0', | ||
packages=['cocktaildb'], | ||
python_requires=">= 3.6", | ||
include_package_data=True, | ||
install_requires=requirements, | ||
description="An unofficial asynchronous API wrapper for thecocktaildb.com.", | ||
long_description=None, | ||
long_description_content_type="text/markdown", | ||
keywords="api wrapper food cocktails asynchronous library free", | ||
classifiers = ( | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3", | ||
"Natural Language :: English", | ||
"Intended Audience :: Developers", | ||
"Operating System :: OS Independent", | ||
), | ||
project_urls = { | ||
'Funding': 'https://ko-fi.com/foodbot', | ||
'Support': 'https://discord.gg/csUnYsr', | ||
'Source': 'https://github.com/clvrk/cocktail-wrapper', | ||
}, | ||
) |