Skip to content

Commit

Permalink
chore: add simple example to README [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloashmore committed May 12, 2021
1 parent b5e77a6 commit a384c8f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,20 @@ The official JavaScript + TypeScript client library for [Prismic][prismic].
- Automatically query draft content during [preview sessions][prismic-previews].
- Built for browser and server usage.

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

// First, create a client
const endpoint = prismic.getEndpoint('my-repository')
const client = prismic.createClient(endpoint)

// Then query for your content
const response = await client.getAllByType('blog_post')
```

## Install

```sh
npm install @prismicio/client
```

Expand Down

0 comments on commit a384c8f

Please sign in to comment.