nulab / backlog-js Goto Github PK
View Code? Open in Web Editor NEWBacklog API version 2 client for browser and node.
Home Page: https://developer.nulab-inc.com/docs/backlog/
Backlog API version 2 client for browser and node.
Home Page: https://developer.nulab-inc.com/docs/backlog/
fetch
as used in src/request.ts#L54 is not part of the common nodejs runtime and returns in an error (making it difficult to use the backlog api)
Line 432 in 3e9f817
keyword: string;
This means keyword
is necessary, but it's not necessary actually.
I'm trying to use backlog-js in TypeScript project.
When I run tsc
, I get an error:
node_modules/backlog-js/dist/backlog.d.ts:20:19 - error TS2304: Cannot find name 'IResponse'.
20 }): Promise<IResponse>;
How can I resolve this issue?
TypeScript 4.0 and later versions show strikethrough when @deprecated
is written in a JSDoc comment.
ref: https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/#deprecated-support
This is useful to inform developers that some APIs, such as https://developer.nulab.com/docs/backlog/api/2/get-list-of-groups/#, are deprecated.
Because backlog-js has its own definitions.
https://www.npmjs.com/package/@types/backlog-js
https://docs.npmjs.com/cli/v8/commands/npm-deprecate
es6-promise
can be removed after IE11 retirement (June 15, 2022) as we can expect Promise
exists in most environments.
es6-promise
is currently in:
Hi, thank you for great library!
I found subtle issues on Issue
declaration.
https://github.com/nulab/backlog-js/blob/master/src/entity.ts#L233
export interface Issue {
id: number;
:
keyId: 1; // <---- should be number
:
resolution: Resolution; // <----- should be Resolution | undefined
:
assignee: User.User; // <------ should be User.User | undefined
:
}
Please consider fixing ๐
There are no type annotations in backlog.ts. This detracts from the developer experience.
I am interested in this task. Can I work on it?
Backlog APIใไฝฟใใใฆใใใ ใใฆใใใฎใงใใใ
backlog-jsใฎใใผใธใงใณใ 0.9.1 ใใ 0.10.0 ใซใขใใใใผใใใใจใ
Backlogใธไธ่จๆๅญๅใๅซใใ ่ชฒ้กใๆ็จฟใใใจใๅคฑๆใใใใใซใชใใพใใใ
''&color(#ffffff, #ff0000) { ่ตค่ๆฏ็ฝๆๅญ }''
ๅ้ฟ็ญใชใฉใใใใฐๆใใฆใใใ ใใพใใงใใใใใ
ใใใใใ้กใใใพใใ
Thanks to Travis CI.
I tried backlog-js
in my Angular project and I got some compile errors.
Error: node_modules/backlog-js/dist/backlog.d.ts:178:5 - error TS7010: 'postWatchingListItem', which lacks return-type annotation, implicitly has an 'any' return type.
178 postWatchingListItem(params: any);
~~~~~~~~~~~~~~~~~~~~
Error: node_modules/backlog-js/dist/backlog.d.ts:180:5 - error TS7010: 'deletehWatchingListItem', which lacks return-type annotation, implicitly has an 'any' return type.
180 deletehWatchingListItem(watchId: number);
~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/backlog-js/dist/backlog.d.ts:183:5 - error TS7010: 'getProjectGroupList', which lacks return-type annotation, implicitly has an 'any' return type.
183 getProjectGroupList(projectIdOrKey: string | number);
~~~~~~~~~~~~~~~~~~~
Error: node_modules/backlog-js/dist/backlog.d.ts:185:5 - error TS7010: 'postProjectGroup', which lacks return-type annotation, implicitly has an 'any' return type.
185 postProjectGroup(projectIdOrKey: string | number, params: any);
~~~~~~~~~~~~~~~~
Error: node_modules/backlog-js/dist/backlog.d.ts:187:5 - error TS7010: 'deleteProjectGroup', which lacks return-type annotation, implicitly has an 'any' return type.
187 deleteProjectGroup(projectIdOrKey: string | number);
These errors occurred when I enabled noImplicitAny
option in tsconfig.json
.
And noImplicitAny
option is enabled by default in Angular projects.
I think it's better to add types to the return value of these functions.
src | doc | desc |
---|---|---|
https://github.com/nulab/backlog-js/blob/master/src/backlog.ts#L717 | https://developer.nulab.com/docs/backlog/api/2/get-wiki-page-list/ | keyword is missing |
Hello. I using a code example for oauth2. After I click allow and redirect to my web. This is my function handled callback.
app.get('/callback', async (req, res) => {
const code = req.query.code;
try {
const accessToken = await oauth2.getAccessToken({ host, code, redirectUri });
console.log('Access Token:', accessToken);
// save access token.
const myself = await new backlogjs.Backlog({
host, accessToken: accessToken.access_token
}).getMyself();
console.log('Myself:', myself);
res.redirect('/');
} catch (e) {
console.log('Access Token Error:', e.message);
res.redirect('/login');
}
});
I got an error: Access Token Error: FormData is not defined.
This exception throw in this line: const accessToken = await oauth2.getAccessToken({ host, code, redirectUri });
When posting the following issue:
{
categoryId: 22853
description: "Test 2"
issueTypeId: 87099
priorityId: 2
projectId: 20805
summary: "Test 2"
}
The following error is returned:
{
message: "error.unknownParameter : categoryId",
code: 7,
moreInfo: ""
}
After removing the categoryId
parameter, the issue is successfully posted.
https://github.com/nulab/backlog-js/blob/master/.github/workflows/nodejs.yml#L15
In src/backlog.ts
:
patchGroup
groupId
is not used. It should be in the url parameter.deleteCustomFieldItem
params
is not used. It's not necessary.itemId
is necessary in the url parameter.getSharedFiles
params
is not used. It should be passed to get
method.I have to edit dist/backlog.d.ts
by myself if I change a type in src/
. There's some problems:
dist/backlog.d.ts
.No manually editing dist/backlog.d.ts
.
npm run build-tsd
creates declaration files in dist/src/*.d.ts
. I want to use the files instead of dist/backlog.d.ts
. Can "types": "dist/src/index.d.ts"
in package.json
do it?
Hi,
I could not find any documents in API list to query all tickets that have startDate is unset. Could you provide some information?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.