Skip to content

Add image upload support (/image API) - #10

Open
tanysheng wants to merge 3 commits into
masterfrom
implement-image-api
Open

Add image upload support (/image API) #10
tanysheng wants to merge 3 commits into
masterfrom
implement-image-api

Conversation

@tanysheng

Copy link
Copy Markdown

@tanysheng
tanysheng requested review from jvmvik and a lite review from Copilot September 9, 2026 11:33

Copilot AI 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.

Pull request overview

Adds first-class support for SerpApi’s Image API (/image) by introducing a client method for multipart image uploads, plus documentation and a unit test that validates request construction.

Changes:

  • Add SerpApiClient.UploadImage(...) and multipart upload implementation in serpapi.go.
  • Add unit tests for /image upload behavior and unsupported input validation.
  • Document Image API usage (file path + io.Reader) in README sources.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
serpapi.go Implements UploadImage and multipart POST request builder for /image.
test/image_test.go Adds unit tests that mock HTTP transport and assert multipart fields/body.
README.md.erb Documents new Image API usage in the README template.
README.md Publishes the Image API documentation section to the generated README.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread serpapi.go
Comment thread serpapi.go
Comment thread test/image_test.go Outdated
tanysheng and others added 2 commits September 9, 2026 20:04
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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