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

Entry point for completed/get_all #30

Closed
wants to merge 5 commits into from
Closed

Conversation

phbernard
Copy link

@@ -365,6 +365,15 @@ export const Todoist = (token: string, userOptions = defaultOptions) => {
get: (options: any) => request({ url: `${options.endpoint}/activity/get`, query: options }),
}

const completedItems = {
get: async (opts: any) => {
Copy link
Owner

Choose a reason for hiding this comment

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

Why get() rather than getAll()? The later has the advantage of conserving a 1-1 mapping with the API's method names.

Copy link
Owner

Choose a reason for hiding this comment

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

Idem for completedItems vs completed.

@romgrk
Copy link
Owner

romgrk commented May 10, 2022

Looks good but the dist folder shouldn't be commited to the repo, it's only needed on NPM.

@phbernard
Copy link
Author

Oh, my bad. I committed dist because it was easier for me to use the fork for my personal use, but it makes the PR quite messy. In additions, you've made a few legit comments about the code itself.

The update is small. You can drop this PR and simply pick the parts you want and adapt them yourself if you're comfortable with this approach.

@phbernard
Copy link
Author

And by the way, thank you for making this project!

@romgrk
Copy link
Owner

romgrk commented May 10, 2022

Thanks but I'll close the PR if you don't wish to complete it. You or anyone else is welcome to re-open at anytime.

@romgrk romgrk closed this May 10, 2022
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.

None yet

2 participants