Skip to content
Snippets Groups Projects

Vue docs entry

Merged Brian Perry requested to merge issue/api_client-3439060:docs-vue into canary
14 files
+ 366
16
Compare changes
  • Side-by-side
  • Inline
Files
14
@@ -66,7 +66,7 @@ const client = new JsonApiClient(
);
```
This creates a client using the specified baseUrl, but otherwise all default settings. It is also possible to pass in an [options object](/api/drupal-api-client/api-client/type-aliases/apiclientoptions) to customize the client.
This creates a client using the specified baseUrl, but otherwise all default settings. It is also possible to pass in an [options object](/api_client/api/drupal-api-client/api-client/type-aliases/apiclientoptions) to customize the client.
Next, use the client to get a collection of articles from Drupal.
@@ -87,7 +87,7 @@ export const client = new JsonApiClient(
);
export const articles = await client.getCollection("node--article");
<JsonView client:only collapsed={2} src={articles} />
<JsonView client:only="react" collapsed={2} src={articles} />
## Retrieve a single resource
@@ -122,7 +122,7 @@ export const article = await client.getResource(
</TabItem>
<TabItem label="Result">
<JsonView client:only collapsed={2} src={article} />
<JsonView client:only="react" collapsed={2} src={article} />
</TabItem>
</Tabs>
Loading