@datocms/cma-client
Advanced tools
Comparing version 0.1.0 to 0.1.2
import { Client } from './generated/Client'; | ||
export default class BaseResource { | ||
client: Client; | ||
protected client: Client; | ||
constructor(client: Client); | ||
} |
@@ -939,5 +939,3 @@ declare const _default: { | ||
})[]; | ||
simpleTypings: string; | ||
typings: string; | ||
}; | ||
export default _default; |
import { Client } from './generated/Client'; | ||
export default class BaseResource { | ||
client: Client; | ||
protected client: Client; | ||
constructor(client: Client); | ||
} |
@@ -939,5 +939,3 @@ declare const _default: { | ||
})[]; | ||
simpleTypings: string; | ||
typings: string; | ||
}; | ||
export default _default; |
{ | ||
"name": "@datocms/cma-client", | ||
"version": "0.1.0", | ||
"version": "0.1.2", | ||
"description": "JS client for DatoCMS REST Content Management API", | ||
@@ -10,3 +10,3 @@ "keywords": [ | ||
"author": "Stefano Verna <s.verna@datocms.com>", | ||
"homepage": "https://github.com/datocms/js-toolkit/tree/main/packages/cma-client#readme", | ||
"homepage": "https://github.com/datocms/js-rest-api-clients/tree/main/packages/cma-client#readme", | ||
"license": "MIT", | ||
@@ -30,3 +30,3 @@ "main": "dist/cjs/index.js", | ||
"type": "git", | ||
"url": "git+https://github.com/datocms/js-toolkit.git" | ||
"url": "git+https://github.com/datocms/js-rest-api-clients.git" | ||
}, | ||
@@ -38,11 +38,11 @@ "scripts": { | ||
"bugs": { | ||
"url": "https://github.com/datocms/js-toolkit/issues" | ||
"url": "https://github.com/datocms/js-rest-api-clients/issues" | ||
}, | ||
"dependencies": { | ||
"@datocms/rest-client-utils": "^0.1.0" | ||
"@datocms/rest-client-utils": "^0.1.2" | ||
}, | ||
"devDependencies": { | ||
"@datocms/dashboard-client": "^0.1.0" | ||
"@datocms/dashboard-client": "^0.1.2" | ||
}, | ||
"gitHead": "41036fc6a62b20638bf91f8c9f58ff8ebabb69bf" | ||
"gitHead": "9edc89423c21752d61d2b776cb11821b5334c83b" | ||
} |
@@ -1,24 +0,19 @@ | ||
# `@datocms/cma-client` | ||
[![Node.js CI](https://github.com/datocms/js-rest-api-clients/actions/workflows/node.js.yml/badge.svg)](https://github.com/datocms/js-rest-api-clients/actions/workflows/node.js.yml) | ||
> TODO: description | ||
# DatoCMS Content Management JS API Client (Common) | ||
## Usage (NodeJS) | ||
API client for [DatoCMS](https://www.datocms.com). Take a look at the full [API documentation](https://www.datocms.com/docs/content-management-api) for examples. | ||
```js | ||
const { buildClient } = require('@datocms/cma-client'); | ||
<br /><br /> | ||
<a href="https://www.datocms.com/"> | ||
<img src="https://www.datocms.com/images/full_logo.svg" height="60"> | ||
</a> | ||
<br /><br /> | ||
const client = buildClient({ apiToken: 'XXX' }); | ||
const items = await client.items.list(); | ||
``` | ||
## Contributing | ||
## Usage (browser module) | ||
Bug reports and pull requests are welcome on GitHub at https://github.com/datocms/js-rest-api-clients. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. | ||
```html | ||
<script type="module"> | ||
// also valid: https://cdn.jsdelivr.net/npm/@datocms/cma-client/dist/browser/index.js | ||
import { buildClient } from 'https://unpkg.com/@datocms/cma-client/dist/browser/index.js'; | ||
## License | ||
const client = buildClient({ apiToken: 'XXX' }); | ||
const items = await client.items.list(); | ||
</script> | ||
``` | ||
The package is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT). |
import { Client } from './generated/Client'; | ||
export default class BaseResource { | ||
client: Client; | ||
protected client: Client; | ||
@@ -6,0 +6,0 @@ constructor(client: Client) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
2978556
86247
20