-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
There was a problem hiding this 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.
0f57a6b
to
683f789
Compare
src/client/index.ts
Outdated
const response = await this.fetch(url, { | ||
method, | ||
headers: { | ||
'Content-Type': finalContentType | ||
}, | ||
body | ||
body, | ||
publicKeyId: this.keypair.publicKeyId, |
There was a problem hiding this comment.
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
Outdated
} | ||
|
||
// Followers | ||
async listFollowers (actor: string): Promise<string[]> { |
There was a problem hiding this comment.
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.
hyphacoop/distributed-press-organizing#97