Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,40 @@

.. include:: ../README.rst

=======
Modules
=======
==================
Web Service Client
==================

.. automodule:: minfraud
:members:
:inherited-members:
:show-inheritance:
:no-undoc-members:

.. automodule:: minfraud.webservice
:members:
:inherited-members:
:show-inheritance:
:no-undoc-members:

===============
Response Models
===============

.. automodule:: minfraud.models
:members:
:inherited-members:
:show-inheritance:
:no-undoc-members:

======
Errors
======

.. automodule:: minfraud.errors
:members:
:inherited-members:
:show-inheritance:
:no-undoc-members:

==================
Expand Down
7 changes: 1 addition & 6 deletions minfraud/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
"""
minfraud
~~~~~~~~

A client API to MaxMind's minFraud Score and Insights web services.
"""
"""minFraud client module."""

# flake8: noqa: F401
from .errors import (
Expand Down
33 changes: 7 additions & 26 deletions minfraud/errors.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
"""
minfraud.errors
~~~~~~~~~~~~~~~

This module contains errors that are raised by this package.

"""
"""Typed errors thrown by this library."""

from typing import Optional

Expand All @@ -26,30 +20,16 @@ class HTTPError(MinFraudError):

This class represents an HTTP transport error. It extends
:py:exc:`MinFraudError` and adds attributes of its own.

.. attribute:: http_status:

The HTTP status code returned

:type: int

.. attribute:: uri:

The URI queried

:type: str

.. attribute:: decoded_content:

The decoded response content

:type: str

"""

http_status: Optional[int]
"""The HTTP status code returned"""

uri: Optional[str]
"""The URI queried"""

decoded_content: Optional[str]
"""The decoded response content"""

def __init__(
self,
Expand All @@ -58,6 +38,7 @@ def __init__(
uri: Optional[str] = None,
decoded_content: Optional[str] = None,
) -> None:
"""Initialize an HTTPError instance."""
super().__init__(message)
self.http_status = http_status
self.uri = uri
Expand Down
Loading
Loading