Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement js client for social inbox #25

Merged
merged 14 commits into from
Jan 10, 2024
Merged

feat: implement js client for social inbox #25

merged 14 commits into from
Jan 10, 2024

Conversation

akhileshthite
Copy link
Collaborator

@akhileshthite akhileshthite added the enhancement New feature or request label Nov 17, 2023
@akhileshthite akhileshthite self-assigned this Nov 17, 2023
Copy link
Contributor

@RangerMauve RangerMauve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API structure looks good.

Mind replacing fetch with https://www.npmjs.com/package/http-signed-fetch

Also could you write a test that starts a local server and uses the client to talk to it.

src/client/index.ts Outdated Show resolved Hide resolved
@RangerMauve RangerMauve changed the base branch from initial to main November 23, 2023 19:48
@types/http-signed-fetch.d.ts Show resolved Hide resolved
src/client/README.md Outdated Show resolved Hide resolved
src/client/README.md Outdated Show resolved Hide resolved
src/client/README.md Show resolved Hide resolved
src/client/README.md Show resolved Hide resolved
src/client/README.md Show resolved Hide resolved
const response = await this.fetch(url, {
method,
headers: {
'Content-Type': finalContentType
},
body
body,
publicKeyId: this.keypair.publicKeyId,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field does not exist, it should be passed in as an option. Surprised the lint step missed this.

src/client/index.ts Show resolved Hide resolved
}

// Followers
async listFollowers (actor: string): Promise<string[]> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everywhere we pass an actor, have it be set to this.actor as a default and make sure it's the last argument.

@RangerMauve RangerMauve self-requested a review January 5, 2024 18:05
@RangerMauve RangerMauve merged commit 420cc1b into main Jan 10, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

None yet

2 participants