dlxedd_client module#

class dlxedd_client.DLXEDD_Client(url: str, user: str, password: str)[source]#

Bases: WP_Client

This class extends WP_Client and provides methods to use the dlxedd(discord-linker x easy-digital-downloads) api.

This class provides access to more endpoints. Extra Endpoints: [“DLXEDD_CART”, “DLXEDD_PRODUCTS”]

Args:

url (str): The URL of the website. user (str): The user we will use to connect. password (str): The application specific password.

cart_add(discord_id: str, product_id: str) dict[source]#

Add a product to the cart.

Args:

discord_id (str): The ID of the discord account. product_id (str): The ID of the product to add.

Returns:

dict: A dictionary representing the product that was added.

cart_clear(discord_id: str) None[source]#

Clear the cart of the user.

Args:

discord_id (str): The discord ID of the cart’s account.

cart_list(discord_id: str) list[dict][source]#

Get a list with all the products of the cart.

Args:

discord_id (str): The discord ID of the cart’s account.

Returns:

list[dict]: A list of dictionaries repersenting the cart with the products in it.

cart_remove(discord_id: str, product_id: str) dict[source]#

Remove a product from the cart.

Args:

discord_id (str): The ID of the discord account. product_id (str): The ID of the product to remove.

Returns:

dict: A dictionary representing the product that was removed.

get_products(from_datetime: ~datetime.datetime | None = None, tz_info: ~datetime.tzinfo = <StaticTzInfo 'GMT'>) list[dict][source]#

Get a list of products that were added after the specified date.

Args:

from_datetime (datetime, optional): The oldest acceptable date, if None, all products are returned. Defaults to None. tzinfo (tzinfo, optional): _description_. Defaults to timezone(“GMT”).

Returns:

list[dict]: A list of dictionaries representing the list of products of the website.