{ "info": { "author": "Ryan Eschinger", "author_email": "ryanesc@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "checkmate_python\n===================\n\nCheckMate\n-----------\n\nA Python wrapper for the CheckMate REST API\n\nInstallation\n----------------\n\nInstall:\n\n pip install checkmate-api\n\nor\n\n easy_install checkmate-api\n\nUsage\n------------\n\n.. code-block:: python\n\n import checkmate\n client = checkmate.CheckMate(api_key='YOUR_KEY_HERE')\n\n**Note:**: You can also pass in a different API url if needed using the *api_base* keyword argument.\n\n.. code-block:: python\n\n client = checkmate.CheckMate(api_key='YOUR_KEY_HERE', api_base='API_URL_HERE')\n\nRefer to the `documentation `_ for the final word on what's required/optional for each call.\n\nSearch for a property\n~~~~~~~~~~~~~~~~~~~~~~\n\nYou can query the API for a property. All of the fields referenced in the query are required.\n\n.. code-block:: python\n\n client.properties.search({\n 'name': 'Hotel Kabuki',\n 'phone': '14159223200',\n 'address': {\n 'street': '1625 Post St',\n 'city': 'San Francisco',\n 'region': 'CA',\n 'postal_code': '94115',\n 'country_code': 'US'\n }\n })\n\nList reservations\n~~~~~~~~~~~~~~~~~~~~~~\n\nYou can query the API for all your reservations or the reservations for a specific property.\n\n.. code-block:: python\n\n # paginated list of all reservations\n client.reservations.list()\n\n # fetching a different page of reservations\n client.reservations.list({'page': 2})\n\n # reservations with a specific confirmation number\n client.reservations.list({'confirmation_num': '12349asdf'})\n\n # reservations for property with id 13434543\n client.reservations.list({'property_id': 13434543})\n\n # exclude property data from the response\n client.reservations.list({'exclude_properties': 'true'})\n\nShow reservation\n~~~~~~~~~~~~~~~~~~~~~~\n\nYou can request a specific reservation from the Checkmate API.\n\n.. code-block:: python\n\n # reservation with id 123452 \n client.reservations.show(123452)\n\nCreate reservation\n~~~~~~~~~~~~~~~~~~~~~~\n\nYou can create a reservation in Checkmate using either an existing property id, or by creating a new property within the request.\n\n.. code-block:: python\n\n # reservation under property 93\n client.reservations.create({\n 'external_id': 'someid123',\n 'confirmation_number': 'sdlfkjweo324',\n 'first_name': 'Jane',\n 'last_name': 'Smith',\n 'email': 'jane@smith.io',\n 'start_on': '2016-12-20',\n 'end_on': '2016-12-24',\n 'property_id': 93\n })\n\n # creating a new property\n client.reservations.create({\n 'external_id': 'someid123',\n 'confirmation_number': 'sdlfkjweo324',\n 'first_name': 'Jane',\n 'last_name': 'Smith',\n 'email': 'jane@smith.io',\n 'start_on': '2016-12-20',\n 'end_on': '2016-12-24',\n 'property': {\n 'name': 'New Hotel',\n 'address': {\n 'street': '123 Leaf Lane',\n 'city': 'Brooklyn',\n 'region': 'NY',\n 'postal_code': '11201',\n 'country_code': 'US'\n }\n }\n })\n\nUpdate reservation\n~~~~~~~~~~~~~~~~~~~~~~\n\nYou can update an existing reservation in Checkmate using a reservation_id.\n\n.. code-block:: python\n\n # reservation id 12345\n client.reservations.update(12345, {'loyalty_number': 'abs2332'})\n\nDelete reservation\n~~~~~~~~~~~~~~~~~~~~~~\n\nYou can delete an existing reservation in Checkmate using a reservation_id.\n\n.. code-block:: python\n\n # reservation id 12345\n client.reservations.destroy(12345)\n\nBulk create reservations\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nEach reservation follows the same format as a single reservation (an optional webhook can be added at the end).\n\n.. code-block:: python\n\n client.reservations.bulk_create([{\n 'external_id': 'fdoo',\n 'confirmation_number': '',\n 'first_name': 'Frank',\n 'last_name': 'Smith',\n 'email': 'frank@example.com',\n 'start_on': '2015-12-20',\n 'end_on': '2015-12-24',\n 'property_id': 123\n }, {\n 'external_id': 'hfg34',\n 'confirmation_number': 'gjhhffgh456',\n 'first_name': 'John',\n 'last_name': 'Doe',\n 'email': 'johndoe@example.com',\n 'start_on': '2015-11-20',\n 'end_on': '2015-11-24',\n 'property_id': 123\n }], 'https://example.com/callback')\n\nTesting\n--------\n\nInstall `nose testing framework `_:\n\n pip install nose\n\nInstall the `mock `_ mocking and testing library:\n\n pip install mock\n\nYou can run tests by running the following command:\n\n nosetests\n\nLinting\n--------\n\nInstall `flake8 `_:\n\n pip install flake8\n\nYou can run the linter by running\n\n flake8 checkmate\n\nin the root directory.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.checkmate.io/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "checkmate-api", "package_url": "https://pypi.org/project/checkmate-api/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/checkmate-api/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.checkmate.io/" }, "release_url": "https://pypi.org/project/checkmate-api/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "A Python wrapper for the CheckMate REST API.", "version": "1.0.0" }, "last_serial": 1359284, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "ac35108f8275ce865f45b9a6856f07db", "sha256": "29f4a9b4de213ea56d156f014f20cc8c01e3a1d8f00db24740bbc41de22988b5" }, "downloads": -1, "filename": "checkmate-api-1.0.0.tar.gz", "has_sig": false, "md5_digest": "ac35108f8275ce865f45b9a6856f07db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3962, "upload_time": "2014-12-23T20:19:40", "url": "https://files.pythonhosted.org/packages/12/60/ef59801cc3185e98fbe600b7bb5130ab03c6b5eaf486dcf5cc87dc9669b0/checkmate-api-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ac35108f8275ce865f45b9a6856f07db", "sha256": "29f4a9b4de213ea56d156f014f20cc8c01e3a1d8f00db24740bbc41de22988b5" }, "downloads": -1, "filename": "checkmate-api-1.0.0.tar.gz", "has_sig": false, "md5_digest": "ac35108f8275ce865f45b9a6856f07db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3962, "upload_time": "2014-12-23T20:19:40", "url": "https://files.pythonhosted.org/packages/12/60/ef59801cc3185e98fbe600b7bb5130ab03c6b5eaf486dcf5cc87dc9669b0/checkmate-api-1.0.0.tar.gz" } ] }