Skip to content

Commit

Permalink
18 error too many requests (#25)
Browse files Browse the repository at this point in the history
* Added error handling for too many requests

* Bumped version number

* linter run

* Corrected undeline length

* Bumped version to 0.6.1, updated python versions and keywords

* Fixed typos

Co-authored-by: tcmetzger <ticon@gmx.net>
  • Loading branch information
hanneshapke and tcmetzger committed May 30, 2020
1 parent f21627d commit 5392800
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 25 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PyZillow could always use more documentation, whether as part of the
official PyZillow docs, in docstrings, or even on the web in blog posts,
articles, or tweets.

Submitzing feedback
Submitting feedback
~~~~~~~~~~~~~~~~~~~

The best way to send feedback is to file an issue at https://github.com/hanneshapke/pyzillow/issues.
Expand All @@ -50,7 +50,7 @@ If you are proposing a feature:
* Remember that this is a volunteer-driven project, and that contributions
are welcome :)

Geting started
Getting started
--------------

Ready to contribute? Here's how to set up PyZillow for
Expand Down
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Version history
---------------

0.6.1 (2020-05-28)
++++++++++++++++++
* Updated error handling, too many request error, Github issue 18

0.6.0 (2020-05-28)
++++++++++++++++++

Expand Down
4 changes: 2 additions & 2 deletions docs/pyzillow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ The ``ZillowWrapper`` class
:undoc-members:

The ``GetDeepSearchResults`` class
***************************
**********************************
.. autoclass:: pyzillow.pyzillow.GetDeepSearchResults
:show-inheritance:

The ``GetUpdatedPropertyDetails`` class
***************************
***************************************
.. autoclass:: pyzillow.pyzillow.GetUpdatedPropertyDetails
:members:
:show-inheritance:
Expand Down
2 changes: 1 addition & 1 deletion pyzillow/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__author__ = "Hannes Hapke"
__email__ = "hannes.hapke@gmail.com"
__version__ = "0.6.0"
__version__ = "0.6.1"
16 changes: 2 additions & 14 deletions pyzillow/pyzillowerrors.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import sys


class ZillowError(Exception):
"""A ZillowError exception is raised if the API endpoint responded
with an error code (http://www.zillow.com/howto/api/GetDeepSearchResults.htm).
Expand Down Expand Up @@ -37,6 +34,7 @@ class ZillowError(Exception):
+ "The Zillow Web Service is currently not available. "
+ "Please come back later and try again.",
),
(7, "Too many requests. \n" + "Daily requests exceeded.",),
(
500,
"Invalid or missing address parameter.\n"
Expand Down Expand Up @@ -104,19 +102,9 @@ def __init__(self, status, url=None, response=None):
self.url = url
self.response = response

def __unicode__(self):
def __str__(self):
return self.message

if sys.version_info[0] >= 3: # Python 3

def __str__(self):
return self.__unicode__()

else: # Python 2

def __str__(self):
return self.__unicode__().encode("utf8")


class ZillowFail(Exception):
"""A ZillowFail exception is raised if the API endpoint could not be reached or
Expand Down
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
Documentation
-------------
The full documentation is at http://pyzillow.rtfd.org."""
The full documentation is at https://pyzillow.readthedocs.io/."""
history = open("HISTORY.rst").read().replace(".. :changelog:", "")

setup(
name="pyzillow",
version="0.6.0",
version="0.6.1",
description="Python API wrapper for Zillow's API",
long_description=readme + "\n\n" + doclink + "\n\n" + history,
author="Hannes Hapke",
Expand All @@ -43,14 +43,14 @@
install_requires=["requests"],
license="MIT",
zip_safe=False,
keywords="pyzillow",
keywords=["pyzillow", "zillow", "api", "real estate"],
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
)

0 comments on commit 5392800

Please sign in to comment.