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

chore(sdk): dotCMS client general cleanup #28711 #28731

Merged
merged 32 commits into from
Jun 7, 2024

Conversation

zJaaal
Copy link
Contributor

@zJaaal zJaaal commented May 31, 2024

Proposed Changes

  • Rewrite JSDocs for more clear usage of the API
  • Change QueryBuilderCallback to BuildQuery for better understanding
  • Overload query method to support both string and buildQuery callback
  • Change folders from content/methods/get-collection to content/builders/collection
  • Change GetCollection to CollectionBuilder
  • Now you can call then method directly from the builder or use async/await without further calls of methods
  • Overall enhance of naming and code docs
  • Overall enhance of errors

Example of how to fetch content

 client.content.getCollection("Blog").then((res) => {
        console.log(res);
    });
    
const blogsResponse = await client.content.getCollection("Blog").language(2).depth(2);

@zJaaal zJaaal linked an issue May 31, 2024 that may be closed by this pull request
@zJaaal zJaaal requested a review from fmontes May 31, 2024 19:59
@zJaaal zJaaal marked this pull request as ready for review June 3, 2024 16:11
Copy link
Member

@fmontes fmontes left a comment

Choose a reason for hiding this comment

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

Most of this comments can be done in another PR if you want to.

@zJaaal zJaaal force-pushed the 28711-sdk-dotcms-client-general-cleanup branch from 86c1b4c to a0d85f9 Compare June 6, 2024 13:56
@zJaaal zJaaal requested review from fmontes and jdotcms June 6, 2024 20:21
@zJaaal zJaaal enabled auto-merge June 7, 2024 13:41
@zJaaal zJaaal added this pull request to the merge queue Jun 7, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jun 7, 2024
@zJaaal zJaaal added this pull request to the merge queue Jun 7, 2024
Merged via the queue into master with commit a674503 Jun 7, 2024
16 checks passed
@zJaaal zJaaal deleted the 28711-sdk-dotcms-client-general-cleanup branch June 7, 2024 17:59
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.

SDK: dotCMS client general Cleanup
5 participants