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
4 changes: 4 additions & 0 deletions .github/workflows/starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
paths:
- 'examples/odds_workspace.py'
- 'examples/odds-migration/**'
- 'examples/support-report/**'
- 'examples/test_odds_workspace.py'
- 'parlay_api/**'
- 'tests/**'
Expand All @@ -14,6 +15,7 @@ on:
paths:
- 'examples/odds_workspace.py'
- 'examples/odds-migration/**'
- 'examples/support-report/**'
- 'parlay_api/**'
- 'pyproject.toml'
permissions:
Expand All @@ -36,3 +38,5 @@ jobs:
run: |
python "$GITHUB_WORKSPACE/tests/test_installed_package.py"
python -m pytest -q --import-mode=importlib "$GITHUB_WORKSPACE/tests/test_odds_coverage.py" "$GITHUB_WORKSPACE/tests/test_first_response.py" "$GITHUB_WORKSPACE/tests/test_migration_example.py"
- name: Exercise the offline support report
run: python -B -m unittest discover -s examples/support-report -p test_support_repro.py
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ and invalid outcomes are excluded with diagnostics on stderr. Missing timestamps
stay empty; timestamps are not freshness guarantees. The starter makes no
rankings or profit claims, and has no automatic retries, polling or key storage.

If your first request fails, [prepare a private support report](examples/support-report/) from the HTTP status, route and optional request ID. The example runs offline.

### Serve a private FastAPI snapshot

[Run the FastAPI coverage starter](examples/fastapi-coverage/) to read game and
Expand Down Expand Up @@ -251,4 +253,4 @@ checkout to verify the installed entry point and replay the same fixture tests.
All test requests are mocked.

Report bugs at [GitHub issues](https://github.com/JacobiusMakes/parlay-api-python/issues)
or contact [support](mailto:peakpotentialmediaventures@gmail.com).
or [contact Support privately](https://parlay-api.com/support).
2 changes: 2 additions & 0 deletions SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ ParlayAPI is founder-run. Questions and bug reports land directly with the perso
## What helps

For bugs, a minimal snippet that reproduces the problem plus your `parlayapi` package version and Python version gets you the fastest turnaround.

For an account-specific request, [prepare a local support report](examples/support-report/) and paste the reviewed details into the [private support form](https://parlay-api.com/support) or reply in your existing Support thread. Keep keys, raw headers and private response bodies out of public issues.
2 changes: 1 addition & 1 deletion examples/first-response/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ Use the HTTP status and service error code to decide what to do with a failed re

**Worked example.** You receive an NBA moneyline at 12:04:00 UTC. Its market last updated at 12:00:00 UTC. The observed age is 240 seconds. If your application requires a price no older than 90 seconds, withhold the quote. Game start time and a fresh timestamp on a different book cannot establish when this quote changed.

A separate HTTP 429 means a request-rate limit was reached. Pause callers sharing the limit and respect a supplied `Retry-After`. For a support reproduction, retain the request ID if supplied, the UTC time, status, error code and route template. Keep the key, raw authorization headers and private response out of the report.
A separate HTTP 429 means a request-rate limit was reached. Pause callers sharing the limit and respect a supplied `Retry-After`. To [prepare a private support report offline](../support-report/), retain the request ID if supplied, the UTC time, status, error code and route template. Keep the key, raw authorization headers and private response out of the report.

[Check historical coverage](https://parlay-api.com/historical-coverage) · [Check current plan limits](https://parlay-api.com/pricing) · [Rehearse retry decisions offline](https://github.com/JacobiusMakes/parlayapi-notebooks/tree/main/labs/response-triage) · [Inspect an NBA response without a key](https://parlay-api.com/try)
41 changes: 41 additions & 0 deletions examples/support-report/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Prepare a private support report

If a sports odds request returned an unexpected status, empty result or stale quote, record what you observed before retrying. This Python 3.9+ tool turns selected response metadata into a small JSON report on your computer. It requires no packages, API key or network connection.

## Try the fictional request

[Download the standalone kit](https://github.com/JacobiusMakes/parlay-api-python/releases/download/support-report-2026-12/parlayapi-support-report.zip), unzip it and run the following from the extracted directory. From a repository checkout, run it in `examples/support-report/`.

```sh
python3 -B support_repro.py --input synthetic-example.json
```

The example shows a fictional HTTP 400 on the NBA odds route. Its error code is `QUERY_PARAMETER_TYPO` and its suggested parameter is `markets`. The HTTP date is 12:00:00 UTC and the client received the response at 12:00:02 UTC. Neither clock establishes when a sportsbook changed a price.

## Record one request

1. Copy `template.json` to `my-input.json`. Enter the HTTP status you actually received. For a timeout with no response, describe the timeout and local time to Support directly. A guessed HTTP status can send the investigation in the wrong direction.
2. Add any available fields from the table. Omit unavailable values. Enter selected metadata by hand. Keep raw logs, headers, curl commands, credentials and customer records on your machine.
3. Create a new report and open it locally to review it.

```sh
python3 -B support_repro.py --input my-input.json --output my-report.json
```

| Optional input | What to enter |
| --- | --- |
| `observation.received_at` | Your client’s response time, including an offset, for example `2026-12-01T11:30:00-05:00`. The report converts it to UTC. |
| `observation.sport`, `market`, `region` | A supported sport key or filter you actually used. The sport choices are the six public preview sports. Market choices are `h2h`, `spreads` and `totals`. The script lists the supported regions. Leave any unsupported scope out and describe it privately. |
| `response_headers` | Copy individual `Date`, `Retry-After` or `x-requests-used`, `x-requests-remaining`, `x-requests-last` values as strings. |
| `diagnostics` | The HTTP method, known route template and recognized error code. Use a template such as `/v1/sports/{sport_key}/odds` or `/v1/try/{sport_key}/odds`. An optional `result_count` describes the reported top-level list only. |
| `response_headers.X-Request-ID` | The report omits the value by default. If you reviewed the response ID and want to give it privately to Support, rerun with `--include-request-id` and a new output filename. The tool accepts 16 or 32 hexadecimal characters. Callers can supply their own IDs, so the format alone cannot establish provenance. |

The report labels a recognized supplied code separately from a default inferred from HTTP status. For example, a 403 alone cannot tell Support whether you ran out of credits. An HTTP 200 can still contain an empty board or an older quote. Use the [first-response guide](https://github.com/JacobiusMakes/parlay-api-python/tree/main/examples/first-response) to interpret those cases.

## Give Support the reviewed facts

Reply in your existing Support email thread when you have one. For a new technical question, open the [private support form](https://parlay-api.com/support), choose **Integration / API**, and paste the relevant reviewed JSON as text in **Message**. Include a short description of what you expected. The form accepts 10–5,000 characters in the message. Keep private request IDs out of public GitHub issues.

For a freshness investigation, include the affected event, bookmaker, market and selection in the private message. Specify pregame or in-play and the period or line when applicable. Record the UTC time of your observation and any **separately timed** change you observed at the sportsbook. An HTTP response date alone cannot demonstrate a frozen price.

The script sends nothing. It refuses credential or cookie header names, drops unrecognized response fields, and refuses to overwrite an existing report. On POSIX it creates the file with owner-only permissions. The fictional example and regression suite can be run locally with `python3 -B -m unittest discover -s . -p test_support_repro.py`.
Loading
Loading