Skip to content

feat: add create_import and get_import to APIClient - #146

Merged
sydneycollins-cio merged 2 commits into
mainfrom
claude/mbl-2915-import-calls-7c1cc1
Dec 1, 2026
Merged

sydneycollins-cio merged 2 commits into
mainfrom
claude/mbl-2915-import-calls-7c1cc1

Conversation

@sydneycollins-cio

Copy link
Copy Markdown
Contributor

What changed

  • APIClient.create_import(import_data) starts a CSV import with POST /v1/imports. It checks that data_file_url and type are present and lets the API validate the rest.
  • APIClient.get_import(import_id) reads an import with GET /v1/imports/{id}.
  • send_request now sends no body when data is None, so GET calls work.
  • The README has a new section, "Import data from a CSV", with a device import example.

How it was tested

  • New unit tests cover both calls and their required fields. The test server now answers GET.
  • make lint and make test pass (92 tests).

🤖 Generated with Claude Code

create_import starts a CSV import through POST /v1/imports and get_import reads one through GET /v1/imports/{id}. send_request now sends no body when data is None, and the test server answers GET.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@sydneycollins-cio
sydneycollins-cio marked this pull request as ready for review November 27, 2026 17:44
@sydneycollins-cio
sydneycollins-cio requested a review from a team as a code owner November 27, 2026 17:44

@Shahroz16 Shahroz16 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. The two calls follow the existing App API pattern, and the test covers the GET going out without a body. One README point inline.

Comment thread README.md Resolved
error_download_url is an App API route that needs the app key and answers with a link to the CSV.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@Shahroz16 Shahroz16 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks Sydney. The README now explains how to fetch the skipped rows file, and it matches what the API returns.

@sydneycollins-cio
sydneycollins-cio merged commit 45b8282 into main Dec 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants