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

SDK: dotCMS client general Cleanup #28711

Closed
6 tasks done
Tracked by #28415
zJaaal opened this issue May 31, 2024 · 0 comments · Fixed by #28731
Closed
6 tasks done
Tracked by #28415

SDK: dotCMS client general Cleanup #28711

zJaaal opened this issue May 31, 2024 · 0 comments · Fixed by #28731

Comments

@zJaaal
Copy link
Contributor

zJaaal commented May 31, 2024

Parent Issue

#28415

Tasks

Proposed Objective

Technical User Experience

Proposed Priority

Priority 3 - Average

Acceptance Criteria

All tasks mentioned above should be done.

Assumptions & Initiation Needs

  • You understand how the content API works
  • You understand how the SDK Client works
@zJaaal zJaaal self-assigned this May 31, 2024
@zJaaal zJaaal linked a pull request May 31, 2024 that will close this issue
github-merge-queue bot pushed a commit that referenced this issue Jun 7, 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

```typescript
 client.content.getCollection("Blog").then((res) => {
        console.log(res);
    });
    
const blogsResponse = await client.content.getCollection("Blog").language(2).depth(2);
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants