diff --git a/.prospector.yaml b/.prospector.yaml index 185d398..f7981b9 100644 --- a/.prospector.yaml +++ b/.prospector.yaml @@ -6,6 +6,8 @@ test-warnings: false ignore-patterns: - (^|/)\..+ - .*\.html + - docs/.* + - tmp.py pylint: disable: diff --git a/README.rst b/README.rst index 84e5509..63d7675 100644 --- a/README.rst +++ b/README.rst @@ -47,6 +47,15 @@ Basic Usage .. code-block:: python - from pybugsnag import BugsnagDataAccessClient - - bugsnag_client = BugsnagDataAccessClient("$ACCESS_TOKEN") + from pybugsnag import BugsnagDataClient + from pybugsnag.models import Error + + client = BugsnagDataClient("$AUTH_TOKEN") + organization = client.organizations[0] # first organization for the auth token + project = organization.projects[0] # first project in the organization + project.get_errors( + sort=Error.Sort.LAST_SEEN, + direction=Error.Sort.Direction.DESCENDING, + per_page=30, + ) # gets errors for this project, + project.get_trend_buckets() # data for a trend histogram diff --git a/docs/pybugsnag/quickstart.rst b/docs/pybugsnag/quickstart.rst index 99f70de..eff47c6 100644 --- a/docs/pybugsnag/quickstart.rst +++ b/docs/pybugsnag/quickstart.rst @@ -25,7 +25,18 @@ Basic Usage .. code-block:: python - from pybugsnag import BugsnagDataClient + from pybugsnag import BugsnagDataClient + from pybugsnag.models import Error + + client = BugsnagDataClient("$AUTH_TOKEN") + organization = client.organizations[0] # first organization for the auth token + project = organization.projects[0] # first project in the organization + project.get_errors( + sort=Error.Sort.LAST_SEEN, + direction=Error.Sort.Direction.DESCENDING, + per_page=30, + ) # gets errors for this project, + project.get_trend_buckets() # data for a trend histogram Rate Limiting