Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(rest): remove api method #3229

Merged
merged 6 commits into from
Mar 25, 2025
Merged

chore(rest): remove api method #3229

merged 6 commits into from
Mar 25, 2025

Conversation

shabaraba
Copy link
Member

@shabaraba shabaraba commented Mar 21, 2025

Why

  • We have decided not to provide the client.api() method.

What

  • remove client.api() method.
  • rewrite README.md and migration-from-rest-api-client.md to use client.request() instead of client.api().

How to test

  • e2e test

Checklist

  • Read CONTRIBUTING.md
  • Updated documentation if it is required.
  • Added tests if it is required.
  • Passed pnpm lint and pnpm test on the root directory.

@shabaraba shabaraba requested a review from a team as a code owner March 21, 2025 07:03
@shabaraba shabaraba requested review from chihiro-adachi and tasshi-me and removed request for a team March 21, 2025 07:03
@@ -68,15 +68,12 @@ const client = createClient({
});

try {
const resp = await client.GET("/k/v1/records.json", {
const resp = await client.request("get", "/k/v1/records.json", {
params: {
query: { app: "1" },
Copy link
Contributor

Choose a reason for hiding this comment

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

@shabaraba
お手間でなければ "1" -> 1もついでに修正できるとありがたいです!

- query: { app: "1" },
+ query: { app: 1 },

Copy link
Member Author

Choose a reason for hiding this comment

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

@chihiro-adachi
すみません、直しました!

@@ -189,7 +135,5 @@ export const iterator = <Paths extends {} = any, Media extends MediaType = any>(
init,
client.TRACE,
),
api: (url, method, init, handleRequest, hasNext) =>
createKintoneApiIteratorMethod(url, handleRequest, hasNext, init, method),
};
Copy link
Contributor

Choose a reason for hiding this comment

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

@shabaraba
requestメソッドの追加は別で実装しますか?

Copy link
Member Author

Choose a reason for hiding this comment

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

@chihiro-adachi
ここで実装します!

@shabaraba shabaraba force-pushed the fix/remove-api-method branch from 1e6b5da to 0e0a870 Compare March 24, 2025 04:52
@shabaraba shabaraba force-pushed the fix/remove-api-method branch from 0e0a870 to 4ce4042 Compare March 24, 2025 05:03
@shabaraba shabaraba merged commit 99f32b1 into main Mar 25, 2025
18 checks passed
@shabaraba shabaraba deleted the fix/remove-api-method branch March 25, 2025 02:19
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