Skip to content

Commit

Permalink
updating the quick start document
Browse files Browse the repository at this point in the history
  • Loading branch information
jpetrucciani committed Sep 25, 2018
1 parent 17ff964 commit cc36fb6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .prospector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ test-warnings: false
ignore-patterns:
- (^|/)\..+
- .*\.html
- docs/.*
- tmp.py

pylint:
disable:
Expand Down
15 changes: 12 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 12 additions & 1 deletion docs/pybugsnag/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc36fb6

Please sign in to comment.