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

Client create collection via http client #17

Merged
merged 5 commits into from
Jul 28, 2023
Merged

Conversation

StefMa
Copy link
Collaborator

@StefMa StefMa commented Jul 19, 2023

Does not fix anything, but is somewhat part of #14
This adds the support for the HTTP client to create a collection.

https://www.getoutline.com/developers#tag/Collections/paths/~1collections.create/post

Only "name" is required, so I added it.
We can later adjust it. Not sure (yet) what the default value for private is.
I assume it is true, but if not, we should add it to the request and make it later configurable.

I also fixed a few typos suggested by my IDE :)

@StefMa StefMa requested a review from rsjethani July 19, 2023 06:28
Copy link
Collaborator

@rsjethani rsjethani left a comment

Choose a reason for hiding this comment

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

Good work overall! Thanks!
I would also request adding suitable test(s), see other api call related tests

collections.go Outdated Show resolved Hide resolved
collections.go Outdated Show resolved Hide resolved
collections.go Outdated Show resolved Hide resolved
collections.go Show resolved Hide resolved
collections.go Outdated Show resolved Hide resolved
@StefMa StefMa requested a review from rsjethani July 20, 2023 14:48
@StefMa
Copy link
Collaborator Author

StefMa commented Jul 28, 2023

@rsjethani can you please have another look on this so I can continue with the CLI 🙏 🙂

@rsjethani rsjethani linked an issue Jul 28, 2023 that may be closed by this pull request
Copy link
Collaborator

@rsjethani rsjethani left a comment

Choose a reason for hiding this comment

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

Just noting that this new API does not provide a way to provide optional properties for the new collection. We would need a new issue for that later.

@rsjethani rsjethani merged commit 3239b80 into main Jul 28, 2023
3 checks passed
@rsjethani rsjethani deleted the client-create-collection branch July 28, 2023 14:36
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.

Feature: create collections via cli
2 participants