semvec/pypi-packages huggingface dataset:
cardmarket-api 0.1.4
Python client for CardMarket API v3+
License: MIT license
Requires Python: >=3.6
Keywords: cardmarket_api

Cardmakret API v3+
==================

|pypi|

|travis ci|

|Documentation Status|

Python client for CardMarket API v3+

-  Free software: MIT license
-  Documentation: https://cardmarket-api.readthedocs.io.

Features
--------

Python client wrapping HTTP calls to ``Cardmarket API v3+``

Installation
------------
   .. code:: shell

        $ pip install cardmarket-api


Usage
-----
   .. code:: python

        from cardmarket_api import CardMarketApi

        api = CardMarketApi(
            username="username",
            password="password",
            sandbox=True,
        )

        # Binders
        ## Create binder
        api.marketplace.binders_create(
            name="Monty Python",
        )
        binders = api.marketplace.binders_list()
        binder_id = binders[-1]["id"]

        # Product
        ## List products
        products = api.product.products_list()
        product_id = products[-1]["id"]

        ## Article attributes
        article_attributes_list = api.product.article_attributes_list()
        (foil, condition, language, *_) = article_attributes_list

        (is_not_foil, is_foil) = api.product.attribute_entities_detail_instances_list(foil["attributeEntityId"])
        (nm, mt, ex) = api.product.attribute_entities_detail_instances_list(condition["attributeEntityId"])
        (de, en) = api.product.attribute_entities_detail_instances_list(language["attributeEntityId"])

        # Marketplace
        ## Create article
        api.marketplace.articles_create(
            product_id=product_id,
            binder_id=binder_id,
            price={
                "currencyId": "EUR",
                "value": 11.11
            },
            quantity=1,
            article_attribute_instances_ids={
                is_foil["id"]: True,
                nm["id"]: True,
                en["id"]: True,
            },
        )

        ## List articles in marketplace
        articles = api.marketplace.articles_list()

Credits
-------

This package was created with
`Cookiecutter <https://github.com/audreyr/cookiecutter>`__ and the
`audreyr/cookiecutter-pypackage <https://github.com/audreyr/cookiecutter-pypackage>`__
project template.

.. |pypi| image:: https://img.shields.io/pypi/v/cardmarket-api.svg
   :target: https://pypi.python.org/pypi/cardmarket_api
.. |travis ci| image:: https://img.shields.io/travis/SukiCZ/cardmarket-api.svg
   :target: https://travis-ci.com/SukiCZ/cardmarket_api
.. |Documentation Status| image:: https://readthedocs.org/projects/cardmarket-api/badge/?version=latest
   :target: https://cardmarket-api.readthedocs.io/en/latest/?version=latest


History
=======

0.1.0 (2022-02-19)
------------------

-  First release on PyPI.