Skip to content

Commit

Permalink
Merge pull request #12 from 2digits-agency/changeset-release/main
Browse files Browse the repository at this point in the history
  • Loading branch information
V1RE committed Mar 14, 2023
2 parents fbf6a0f + 85ecfa6 commit e59a7e8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
5 changes: 0 additions & 5 deletions .changeset/rotten-papayas-move.md

This file was deleted.

24 changes: 12 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# propr

## 1.0.6

### Patch Changes

- 0cbff7c: Added @2digits/prettier-config, @2digits/eslint-config and @2digits/tsconfig

## 1.0.5

### Patch Changes
Expand Down Expand Up @@ -50,26 +56,23 @@
To use propr, import the createPreprClient function from the package and call it with the options for your Prepr account:

```typescript
import { createPreprClient } from "propr";
import { createPreprClient } from 'propr';
const client = createPreprClient({
token: "your_token_here",
token: 'your_token_here',
});
```
Once you have created the client, you can use it to fetch data from Prepr:
```typescript
const articles = await client.fetch("/articles");
const articles = await client.fetch('/articles');
```
You can also chain various methods to the client to specify additional options:
```typescript
const articles = await client
.sort("publishedAt")
.limit(10)
.fetch("/articles");
const articles = await client.sort('publishedAt').limit(10).fetch('/articles');
```
The client also supports GraphQL queries:
Expand All @@ -83,12 +86,9 @@
}
}`;
const variables = { slug: "your-article-slug" };
const variables = { slug: 'your-article-slug' };
const article = await client
.graphqlQuery(query)
.graphqlVariables(variables)
.fetch();
const article = await client.graphqlQuery(query).graphqlVariables(variables).fetch();
```
## API
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@2digits/propr",
"version": "1.0.5",
"version": "1.0.6",
"description": "A proper way to interface with prepr.io",
"license": "MIT",
"private": false,
Expand Down

0 comments on commit e59a7e8

Please sign in to comment.