Skip to content

Commit

Permalink
chore: update IDEAS based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloashmore committed May 3, 2021
1 parent 0f43762 commit 8bd6754
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions IDEAS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ This document explores API ideas before they are implemented.
```typescript
import * as prismic from '@prismicio/client'

prismic.getEndpoint('repo-name')
// => https://repo-name.cdn.prismic.io/api/v2
```

The following example will not be used. If someone wants to create a more custom
endpoint URL, such as without the CDN or using `wroom.io`, it can be created
manually without `getEndpoint`.

```typescript
import * as prismic from '@prismicio/client'

prismic.getEndpoint('repo-name')
// => https://repo-name.cdn.prismic.io/api/v2

Expand Down Expand Up @@ -110,6 +121,10 @@ const blogPosts = await client.getAllByType('blog_post', {
{ field: 'document.last_publication_date', order: 'desc' },
'first_publication_date desc',
],
// Total limit. If multiple network requests are made to get all documents in
// this method, it would stop once it reached 100 documents, even if there are
// more to fetch.
limit: 100,
})
// the `q` REST API parameter effectively will contain:
// prismic.predicates.at('document.type', 'blog_post')
Expand Down

0 comments on commit 8bd6754

Please sign in to comment.