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

feat: add support for listing Schema apps by organization #243

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

rossiam
Copy link
Contributor

@rossiam rossiam commented Aug 14, 2024

Added support for requesting Schema Apps by organization.

Related CLI pull request:

SmartThingsCommunity/smartthings-cli#612

Copy link

changeset-bot bot commented Aug 14, 2024

🦋 Changeset detected

Latest commit: 69acdce

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

This PR includes changesets to release 1 package
Name Type
@smartthings/core-sdk Minor

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

@@ -259,8 +259,11 @@ export class SchemaEndpoint extends Endpoint {
/**
* Returns a list of all ST Schema C2C connectors belonging to the principal (i.e. the user)
*/
public async list(): Promise<SchemaApp[]> {
const response = await this.client.get<SchemaAppList>('apps')
public async list(options?: { includeAllOrganizations?: boolean }): Promise<SchemaApp[]> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have been doing this style of arguments more and more in the CLI but haven't much yet in the core SDK so it's maybe a little out-of-place for now but you have to start somewhere and calling code reads so much better when with it.

@rossiam rossiam merged commit 4151977 into SmartThingsCommunity:main Aug 14, 2024
5 checks passed
@rossiam rossiam deleted the schema-by-org branch August 14, 2024 16:57
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