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

Projects v2 #44

Merged
merged 7 commits into from
May 17, 2018
Merged

Projects v2 #44

merged 7 commits into from
May 17, 2018

Conversation

laander
Copy link
Contributor

@laander laander commented May 10, 2018

Motivation

We're working on a revised Projects model at Timekit that will be more native to the platform. With this also comes an update to our availability engine (successor to FindTime) and Microsoft related endpoints.

Added new endpoints:

// Availability
timekit.fetchAvailability({ ... })

// Projects
timekit.getProjects()
timekit.getProject({ id })
timekit.getHostedProject({ slug })
timekit.getEmbedProject({ id })
timekit.createProject({ ... })
timekit.updateProject({ id, ... })
timekit.deleteProject({ id })
timekit.addProjectResource({ id, ... })
timekit.setProjectResources({ id, resources })
timekit.removeProjectResource({ id, resourceId })

// Account
timekit.getAccounts()
timekit.accountGoogleSignup({ callback }, shouldAutoRedirect)
timekit.accountGoogleSync()
timekit.accountMicrosoftSignup({ callback }, shouldAutoRedirect)
timekit.accountMicrosoftSync()

Side-effects/other

Also improved the DX of the endpoints list in README so it includes a specification of which object properties you can send in the arguments to the methods.

Tests

Updated tests with new endpoints.

Release dependencies

timekit-io/booking-js#176

Who should review it

@Trolzie @vistik

@vistik
Copy link
Contributor

vistik commented May 10, 2018

🎱

@Trolzie
Copy link
Contributor

Trolzie commented May 17, 2018

@laander should we consider adding some info about /widgets endpoint to let people know that this is an old endpoint, and they should be using projects instead?

The same question goes to /availability and the old findtime.

timekit.accountGoogleSignup(data, shouldAutoRedirect:Boolean);
timekit.accountSync(data);
timekit.getAccounts()
timekit.accountGoogleSignup({ callback }, shouldAutoRedirect)
Copy link
Contributor

Choose a reason for hiding this comment

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

what about microsoft? does it use the same? should we consider renaming/adding?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, good point, I hadn't actually considered that. Let me check in the API routes

@laander
Copy link
Contributor Author

laander commented May 17, 2018

@Trolzie I have not mentioned in the README on purpose. Although it was public in our API reference at some point, so people don't get any funky ideas and start to use it. If there is a comment about it on http://developers.timekit.io/ , dont you think that would be enough?

@Trolzie
Copy link
Contributor

Trolzie commented May 17, 2018

You are right, docs should be where we do this. I just thought that both internally, plus if people inspect, then it is always nice to see a comment like this when I look at the widget method calls:

// widgets endpoint is no longer encouraged
// use: ´/projects´ instead for future-proofing

I know its a bad example, but you know what i mean :D

@laander
Copy link
Contributor Author

laander commented May 17, 2018

@Trolzie I like that, good idea, all add some comments in the code 👍

1 similar comment
@laander
Copy link
Contributor Author

laander commented May 17, 2018

@Trolzie I like that, good idea, all add some comments in the code 👍

@Trolzie
Copy link
Contributor

Trolzie commented May 17, 2018

swell @laander I'll wait for the next push 💃

@Trolzie
Copy link
Contributor

Trolzie commented May 17, 2018

lookin good 👾

@laander laander merged commit 5c94143 into master May 17, 2018
@laander laander deleted the projects-v2 branch May 17, 2018 11:09
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.

3 participants