backlog-js 0.16.0 → 0.17.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 +18 -2
- package/dist/backlog.iife.js +3278 -0
- package/dist/backlog.iife.min.js +4 -0
- package/dist/backlog.js +3243 -3867
- package/dist/backlog.min.js +4 -1
- package/dist/chunk-CfYAbeIz.mjs +13 -0
- package/dist/index.cjs +1286 -0
- package/dist/index.d.cts +2047 -0
- package/dist/index.d.mts +2047 -0
- package/dist/index.mjs +1229 -0
- package/package.json +36 -31
- package/CHANGELOG.md +0 -142
- package/dist/types/backlog.d.ts +0 -606
- package/dist/types/entity.d.ts +0 -544
- package/dist/types/error.d.ts +0 -37
- package/dist/types/index.d.ts +0 -7
- package/dist/types/oauth2.d.ts +0 -21
- package/dist/types/option.d.ts +0 -437
- package/dist/types/request.d.ts +0 -27
- package/dist/types/types.d.ts +0 -59
package/README.md
CHANGED
|
@@ -14,8 +14,6 @@ $ npm install --save backlog-js
|
|
|
14
14
|
Append your "API Key" or "OAuth2 Access Token" to requests to the API to return data.
|
|
15
15
|
|
|
16
16
|
``` javascript
|
|
17
|
-
import 'isomorphic-form-data';
|
|
18
|
-
import 'isomorphic-fetch';
|
|
19
17
|
import * as backlogjs from 'backlog-js';
|
|
20
18
|
|
|
21
19
|
// 'xxx.backlog.jp' or 'xxx.backlogtool.com' or 'your package host'
|
|
@@ -143,6 +141,24 @@ app.listen(3000);
|
|
|
143
141
|
console.log('Express server started on port 3000');
|
|
144
142
|
````
|
|
145
143
|
|
|
144
|
+
## HTTP proxy support
|
|
145
|
+
|
|
146
|
+
You can route requests through an HTTP proxy by injecting a custom `fetch` function
|
|
147
|
+
into `Backlog` and `OAuth2` constructors.
|
|
148
|
+
|
|
149
|
+
```javascript
|
|
150
|
+
import { Backlog } from 'backlog-js';
|
|
151
|
+
import { ProxyAgent, fetch as undiciFetch } from 'undici';
|
|
152
|
+
|
|
153
|
+
const dispatcher = new ProxyAgent('https://proxy.example.com:8080');
|
|
154
|
+
|
|
155
|
+
const backlog = new Backlog({
|
|
156
|
+
host: 'example.backlog.com',
|
|
157
|
+
apiKey: 'YOUR_API_KEY',
|
|
158
|
+
fetch: (input, init) => undiciFetch(input, { ...init, dispatcher }),
|
|
159
|
+
});
|
|
160
|
+
```
|
|
161
|
+
|
|
146
162
|
## License
|
|
147
163
|
|
|
148
164
|
MIT License
|