Skip to content

New Feature: add new APIs to leetcode.cn and leecode.com & fix some errors #105

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

Merged

Conversation

jinzcdev
Copy link
Contributor

@jinzcdev jinzcdev commented Apr 10, 2025

  • feat(leetcode.cn): add submission detail query and corresponding test
  • feat(leetcode.cn): add lang and status parameters to user's submissions query
  • fix(leetcode.com): add GraphQL query support for the submission_detail interface of the leetcode.com to fix API errors
  • feat(leetcode.com): add user_progress_questions method to retrieve user progress with filters to the leetcode.com

Copy link

changeset-bot bot commented Apr 10, 2025

🦋 Changeset detected

Latest commit: 0c58c96

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
leetcode-query Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jinzcdev
Copy link
Contributor Author

Sorry, I forgot to add the submission_detail API to leetcode.cn

@jinzcdev jinzcdev force-pushed the feature/leetcode-cn-submission-detail branch from 900d28b to 381236f Compare April 10, 2025 12:34
@jinzcdev
Copy link
Contributor Author

I haven't modified any cache-related configurations. Can you rerun the pipeline?

@jinzcdev jinzcdev closed this Apr 10, 2025
@jinzcdev jinzcdev reopened this Apr 11, 2025
@jinzcdev jinzcdev changed the title New Feature: add the submission_detail API to leetcode.cn endpoint New Feature: add new APIs to leetcode.cn and leecode.com & fix some errors Apr 11, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 9 out of 13 changed files in this pull request and generated no comments.

Files not reviewed (4)
  • src/graphql/leetcode-cn/submission-detail.graphql: Language not supported
  • src/graphql/leetcode-cn/user-problem-submissions.graphql: Language not supported
  • src/graphql/leetcode-cn/user-progress-questions.graphql: Language not supported
  • src/graphql/submission-detail.graphql: Language not supported
Comments suppressed due to low confidence (2)

src/leetcode.ts:205

  • The previous version used a rate limiter with explicit lock and unlock calls, but these have been removed. Please confirm that the GraphQL method now handles rate limiting appropriately to prevent potential unbounded concurrent requests.
return data.submissionDetails as SubmissionDetail;

src/leetcode-types.ts:266

  • Changing 'runtime_distribution' from an array to a string may cause confusion if downstream code expects an array of values. Consider clarifying the new type (for example, renaming it to 'runtimeDistributionJSON' or adding documentation) to ensure proper handling.
runtimeDistribution: string;

Copy link
Owner

@JacobLinCool JacobLinCool left a comment

Choose a reason for hiding this comment

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

It seems that .changeset/curvy-planets-pay.md is already covered by .changeset/warm-lobsters-act.md.

Since it's a major update with breaking changes, I think it's better to mention the breaking changes in the changeset.

Other changes LGTM!

@jinzcdev jinzcdev requested a review from JacobLinCool April 11, 2025 11:02
Copy link
Owner

@JacobLinCool JacobLinCool left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM!

@JacobLinCool JacobLinCool merged commit acb4855 into JacobLinCool:main Apr 11, 2025
2 checks passed
@github-actions github-actions bot mentioned this pull request Apr 11, 2025
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy