@communecter/cocolight-api-client 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/cocolight-api-client.browser.js +7 -6
- package/dist/cocolight-api-client.browser.js.LICENSE.txt +1 -0
- package/dist/cocolight-api-client.cjs +2 -1
- package/dist/cocolight-api-client.cjs.LICENSE.txt +1 -0
- package/dist/cocolight-api-client.mjs.js +2 -1
- package/dist/cocolight-api-client.mjs.js.LICENSE.txt +1 -0
- package/package.json +12 -4
- package/src/Api.js +157 -0
- package/src/ApiClient.js +105 -8
- package/src/api/EntityMixin.js +249 -0
- package/src/api/NewsMixin.js +168 -0
- package/src/api/Organization.js +131 -0
- package/src/api/Project.js +131 -0
- package/src/api/User.js +226 -0
- package/src/api/UserApi.js +48 -0
- package/src/api/UserMixin.js +59 -0
- package/src/api/UtilMixin.js +82 -0
- package/src/endpoints.module.js +2 -2
- package/src/error.js +51 -3
- package/src/index.js +5 -0
package/README.md
CHANGED
|
@@ -38,12 +38,12 @@ package.json # Dépendances, scripts, métadonnées
|
|
|
38
38
|
### ESM
|
|
39
39
|
|
|
40
40
|
```js
|
|
41
|
-
import ApiClient from "@communecter/cocolight-api-client";
|
|
41
|
+
import { ApiClient, Api } from "@communecter/cocolight-api-client";
|
|
42
42
|
```
|
|
43
43
|
### CommonJS
|
|
44
44
|
|
|
45
45
|
```js
|
|
46
|
-
const {
|
|
46
|
+
const { ApiClient, Api } = require("@communecter/cocolight-api-client").default;
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
### 🔗 Intégration via CDN
|
|
@@ -53,7 +53,7 @@ Vous pouvez inclure le client directement dans une page HTML :
|
|
|
53
53
|
```html
|
|
54
54
|
<script src="https://cdn.jsdelivr.net/npm/@communecter/cocolight-api-client/dist/cocolight-api-client.browser.js"></script>
|
|
55
55
|
<script>
|
|
56
|
-
const client = new CocolightApiClient({
|
|
56
|
+
const client = new CocolightApiClient.ApiClient({
|
|
57
57
|
baseURL: "https://www.communecter.org"
|
|
58
58
|
});
|
|
59
59
|
|
|
@@ -80,7 +80,7 @@ client.callEndpoint("AUTHENTICATE_URL", {
|
|
|
80
80
|
## 🔧 Utilisation de base
|
|
81
81
|
|
|
82
82
|
```js
|
|
83
|
-
import ApiClient from "@communecter/cocolight-api-client";
|
|
83
|
+
import { ApiClient } from "@communecter/cocolight-api-client";
|
|
84
84
|
|
|
85
85
|
const client = new ApiClient({
|
|
86
86
|
baseURL: "https://mon-api.com"
|