@localisprimary/esi 1.0.1 → 1.1.0

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,10 @@
1
1
  # @localisprimary/esi
2
2
 
3
- A slightly opinionated TypeScript client library for the EVE Online ESI (EVE Swagger Interface) API.
3
+ A slightly opinionated TypeScript client for the [EVE Online API](https://developers.eveonline.com/api-explorer).
4
+
5
+
6
+ [![NPM Version](https://img.shields.io/npm/v/%40localisprimary%2Fesi)](https://www.npmjs.com/package/@localisprimary/esi)
7
+
4
8
 
5
9
  ## Usage
6
10
 
@@ -24,10 +28,10 @@ console.log(alliance.data)
24
28
  This client provides methods for all EVE ESI endpoints. Methods return a Promise that resolves to an `EsiResponse<T>` object or throws an `EsiError`.
25
29
 
26
30
  ```typescript
27
- interface EsiResponse<T> {
28
- data: T;
31
+ interface EsiResponse<TData, THeaders = Record<string, string>> {
32
+ data: TData;
29
33
  status: number;
30
- headers: Partial<Record<string, string>>;
34
+ headers: THeaders;
31
35
  }
32
36
 
33
37
  interface EsiError {
@@ -42,7 +46,7 @@ All methods are fully typed: `getAlliance` will take `GetAllianceParams` and ret
42
46
  ```typescript
43
47
  const esi = new EsiClient({ token: 'bearer-token' })
44
48
 
45
- // https://esi.evetech.net/characters/{character_id}/mail
49
+ // POST https://esi.evetech.net/characters/{character_id}/mail
46
50
  esi.postCharacterMail({
47
51
  // character_id path parameter
48
52
  character_id: 91884358,