Skip to content

Commit

Permalink
chore(#307): add method examples (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher authored Oct 10, 2021
1 parent c7b267a commit cf43025
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/druxt/src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ class DruxtClient {
/**
* Create a JSON:API resource.
*
* @example @lang js
* await this.$druxt.createResource({ type: 'node--page', attributes: {}, relationships: {} })
*
* @param {object} resource - The JSON:API resource object
*
* @returns {object} The response data
Expand Down Expand Up @@ -309,6 +312,9 @@ class DruxtClient {
/**
* Update a JSON:API resource.
*
* @example @lang js
* await this.$druxt.updateResource({ type: 'node--page', id, attributes: {}, relationships: {} })
*
* @param {object} resource - The JSON:API resource object
*
* @returns {object} The response data
Expand Down

0 comments on commit cf43025

Please sign in to comment.