@ix-xs/metamob.api 3.0.22 → 3.0.24

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 CHANGED
@@ -1,6 +1,6 @@
1
- # ![Metamob](https://beta.metamob.fr/img/pierre_dame_small.png) [Metamob](https://beta.metamob.fr)
1
+ # ![Metamob](https://metamob.fr/img/pierre_dame_small.png) [Metamob](https://metamob.fr)
2
2
 
3
- <img align=right src="https://beta.metamob.fr/img/ocre.png">
3
+ <img align=right src="https://metamob.fr/img/ocre.png">
4
4
  <div>
5
5
  <div>
6
6
  <h3>Complétez votre quête du Dofus Ocre</h3>
@@ -126,11 +126,18 @@ Toutes les requêtes retournent un objet JSON **normalisé** avec une structure
126
126
  status: 200,
127
127
  statusText: "OK",
128
128
  data: [
129
- { id: 1, name: "Brial", community: "France", ... },
130
- { id: 2, name: "Rafal", community: "France", ... },
129
+ {
130
+ username: "player1",
131
+ avatar: {
132
+ id: 123,
133
+ name: { fr: "Tofu", en: "Tofu", es: "Tofu" },
134
+ image: "tofu.png"
135
+ },
136
+ last_active: "2026-01-27 14:22:00"
137
+ }
131
138
  ],
132
139
  pagination: {
133
- total: 20,
140
+ total: 5,
134
141
  limit: 20,
135
142
  offset: 0
136
143
  }
@@ -303,28 +310,28 @@ getServers(options?: { server_name?: string })
303
310
 
304
311
  #### Serveurs disponibles
305
312
 
306
- | France | World |
307
- | ---------- | ---------- |
308
- | Brial | Brial |
309
- | Rafal | Rafal |
310
- | Salar | Salar |
311
- | Kourial | Kourial |
312
- | Dakal | Dakal |
313
- | Mikhal | Mikhal |
314
- | Imagiro | Imagiro |
315
- | Hell Mina | Hell Mina |
316
- | Tylezia | Tylezia |
317
- | Orukam | Orukam |
318
- | Tal Kasha | Tal Kasha |
319
- | Draconiros | Draconiros |
320
- | Ombre | Ombre |
321
- | Fallanster | Fallanster |
322
- | Boune | Boune |
323
- | Allisteria | Allisteria |
324
- | Blair | Blair |
325
- | Kelerog | Kelerog |
326
- | Talok | Talok |
327
- | Tiliwan | Tiliwan |
313
+ | Serveur | Communauté | Version |
314
+ | --- | --- | --- |
315
+ | Brial | World | Dofus (Unity) |
316
+ | Rafal | World | Dofus (Unity) |
317
+ | Salar | World | Dofus (Unity) |
318
+ | Kourial | World | Dofus (Unity) |
319
+ | Dakal | World | Dofus (Unity) |
320
+ | Mikhal | World | Dofus (Unity) |
321
+ | Imagiro | France | Dofus (Unity) |
322
+ | Hell Mina | France | Dofus (Unity) |
323
+ | Tylezia | France | Dofus (Unity) |
324
+ | Orukam | France | Dofus (Unity) |
325
+ | Tal Kasha | World | Dofus (Unity) |
326
+ | Draconiros | World | Dofus (Unity) |
327
+ | Ombre | World | Dofus (Unity) |
328
+ | Fallanster | World | Dofus Retro (1.29) |
329
+ | Boune | World | Dofus Retro (1.29)
330
+ | Allisteria | World | Dofus Retro (1.29) |
331
+ | Blair | World | Dofus Touch |
332
+ | Kelerog | France | Dofus Touch
333
+ | Talok | World | Dofus Touch |
334
+ | Tiliwan | France | Dofus Touch |
328
335
 
329
336
  #### Exemples
330
337
 
@@ -360,26 +367,6 @@ if (response.ok) {
360
367
  }
361
368
  ```
362
369
 
363
- **Grouper par communauté**
364
-
365
- ```javascript
366
- const response = await client.getServers();
367
-
368
- if (response.ok) {
369
- const byRegion = response.data.reduce((acc, server) => {
370
- if (!acc[server.community]) acc[server.community] = [];
371
- acc[server.community].push(server.name);
372
- return acc;
373
- }, {});
374
-
375
- console.log(byRegion);
376
- // {
377
- // France: ["Brial", "Rafal", ...],
378
- // World: ["Brial", "Rafal", ...]
379
- // }
380
- }
381
- ```
382
-
383
370
  ---
384
371
 
385
372
  ### Types de monstres
@@ -655,7 +642,6 @@ getUser(username: string)
655
642
  * @property {string} username - Nom d'utilisateur
656
643
  * @property {string} bio - Biographie de l'utilisateur
657
644
  * @property {UserAvatar} avatar - Avatar utilisateur
658
- * @property {string} created_at - Date de création du compte (ISO 8601)
659
645
  * @property {string} last_active - Dernière activité (ISO 8601)
660
646
  */
661
647
  ```
@@ -676,7 +662,6 @@ console.log(`
676
662
  ${user.username}
677
663
  Avatar: ${user.avatar.name.fr}
678
664
  Bio: ${user.bio || "Pas de bio"}
679
- Compte créé: ${new Date(user.created_at).toLocaleDateString("fr-FR")}
680
665
  Dernière activité: ${new Date(user.last_active).toLocaleDateString("fr-FR")}
681
666
  `);
682
667
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ix-xs/metamob.api",
3
- "version": "3.0.22",
3
+ "version": "3.0.24",
4
4
  "description": "API Metamob Javascript",
5
5
  "keywords": [
6
6
  "API",
@@ -34587,7 +34587,7 @@
34587
34587
  ]
34588
34588
  },
34589
34589
  {
34590
- "id": 638,
34590
+ "id": 274,
34591
34591
  "name": {
34592
34592
  "fr": "Robot Fléau",
34593
34593
  "en": "Robo Mace",
@@ -34604,41 +34604,21 @@
34604
34604
  "es": "monstruo"
34605
34605
  }
34606
34606
  },
34607
- "zones": []
34608
- },
34609
- {
34610
- "id": 274,
34611
- "name": {
34612
- "fr": "Robot Fléau",
34613
- "en": "Robo Mace",
34614
- "es": "Robot mangual"
34615
- },
34616
- "image": "robot_fleau.png",
34617
- "level_min": 138,
34618
- "level_max": 138,
34619
- "type": {
34620
- "id": 1,
34621
- "name": {
34622
- "fr": "monstre",
34623
- "en": "monster",
34624
- "es": "monstruo"
34625
- }
34626
- },
34627
34607
  "zones": [
34628
34608
  {
34629
- "id": 1,
34609
+ "id": 12,
34630
34610
  "name": {
34631
- "fr": "Amakna",
34632
- "en": "Amakna",
34633
- "es": "Amakna"
34611
+ "fr": "Plaines de Cania",
34612
+ "en": "Cania Plains",
34613
+ "es": "Llanuras de Cania"
34634
34614
  },
34635
34615
  "subzones": [
34636
34616
  {
34637
- "id": 160,
34617
+ "id": 158,
34638
34618
  "name": {
34639
- "fr": "Territoire souterrain des Porcos",
34640
- "en": "Underground Porco Territory",
34641
- "es": "Territorio subterráneo de los porcos"
34619
+ "fr": "Massif de Cania",
34620
+ "en": "Cania Massif",
34621
+ "es": "Sierra de Cania"
34642
34622
  }
34643
34623
  }
34644
34624
  ]
package/src/MetamobAPI.js CHANGED
@@ -840,12 +840,20 @@ module.exports = class MetamobAPI {
840
840
  /**
841
841
  * ### Profil utilisateur
842
842
 
843
+ * @typedef {object} UserQuest
844
+ * @property {string} slug
845
+ * @property {string} character_name
846
+ * @property {number} current_step
847
+ * @property {number} parallel_quests
848
+ * @property {Server} server
849
+ * @property {QuestTemplate} quest_template
850
+
843
851
  * @typedef {object} User
844
852
  * @property {string} username
845
853
  * @property {string} bio
846
854
  * @property {UserAvatar} avatar
847
- * @property {string} created_at
848
855
  * @property {string} last_active
856
+ * @property {Array<Quest>} quests
849
857
 
850
858
  * @param {string} username
851
859
 
@@ -885,8 +893,6 @@ module.exports = class MetamobAPI {
885
893
 
886
894
  if (result.ok) {
887
895
  data = convertIds(await _.json());
888
-
889
- delete data.data.quests;
890
896
  }
891
897
 
892
898
  result = {