Repository navigation
Add ask and feedback, new search engines, and pagination (v0.3.0) - #3
Merged
Merged
Conversation
Resync the OpenAPI snapshot with the live contract: POST /ask and POST /feedback, the bingcn, yandex and grokipedia engines (sogou removed), page on /search, and published_date plus GitHub and Hacker News fields on results. ask() defaults to a 45s timeout because the gateway allows Ask 35s; feedback() is never retried because the API has no idempotency key.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动
ask(),对应POST /ask:只接受query,最多 500 字符,每次 5 credits。默认超时 45 秒,因为网关给 Ask 的上限是 35 秒feedback(),对应POST /feedback:免费,API 没有幂等键,所以默认不重试bingcn、yandex、grokipedia,删除sogou/search新增page,只有bing、bingcn、baidu、grokipedia支持分页published_date、GitHub 字段(kind、stars、language、num_comments)和 Hacker News 字段(story_url、points、num_comments)https://api.search1api.com/openapi.json重新同步 OpenAPI 快照,并重新生成src/generated.ts验证
npm run generate后生成文件没有差异/ask和/feedback