Skip to content

Commit

Permalink
Fix readme sections
Browse files Browse the repository at this point in the history
  • Loading branch information
markwylde committed Jan 12, 2021
1 parent 519b49c commit 40cf1c3
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 @@ -58,6 +58,7 @@ console.log( {
### Examples
<details>
<summary>1. Get item by id</summary>

```javascript
client.get('tests', {
query: {
Expand All @@ -69,6 +70,7 @@ client.get('tests', {

<details>
<summary>2. Get document count in a collection</summary>

```javascript
client.count('tests', {
query: {
Expand All @@ -80,7 +82,7 @@ client.count('tests', {

<details>
<summary>3. Get items in a collection</summary>
**Client:**

```javascript
client.get('tests', {
query: {
Expand All @@ -94,6 +96,7 @@ client.get('tests', {

<details>
<summary>4. Create a new document in a collection</summary>

```javascript
client.post('tests', {
firstName: 'Joe'
Expand All @@ -103,6 +106,7 @@ client.post('tests', {

<details>
<summary>5. Replace a document by id</summary>

```javascript
client.put('tests', {
firstName: 'Joe'
Expand All @@ -112,6 +116,7 @@ client.put('tests', {

<details>
<summary>6. Replace multiple documents by query</summary>

```javascript
client.put('tests', {
firstName: 'Zoe',
Expand All @@ -127,6 +132,7 @@ client.put('tests', {

<details>
<summary>7. Partially update multiple documents by id</summary>

```javascript
client.patch('tests', {
timezone: 'GMT'
Expand All @@ -140,6 +146,7 @@ client.patch('tests', {

<details>
<summary>8. Partially update multiple documents by query</summary>

```javascript
client.patch('tests', {
timezone: 'GMT'
Expand All @@ -153,6 +160,7 @@ client.patch('tests', {

<details>
<summary>9. Delete a document by id</summary>

```javascript
client.delete('tests', {
query: {
Expand All @@ -165,6 +173,7 @@ client.delete('tests', {

<details>
<summary>10. Delete multiple documents by query</summary>

```javascript
client.delete('tests', {
query: {
Expand All @@ -176,13 +185,15 @@ client.delete('tests', {

<details>
<summary>11. Lock a collection/document/field combination</summary>

```javascript
const lockId = await client.lock('users');
```
</details>

<details>
<summary>12. Release a lock</summary>

```javascript
const lockId = await client.lock(['users']);
const newDocument = await client.post('users', {
Expand Down

0 comments on commit 40cf1c3

Please sign in to comment.