-
Notifications
You must be signed in to change notification settings - Fork 37
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
RSDK-6171-add-client-api-for-debugging-grpc-calls #384
RSDK-6171-add-client-api-for-debugging-grpc-calls #384
Conversation
@@ -51,7 +51,7 @@ export interface Base extends Resource { | |||
stop(extra?: Struct): Promise<void>; | |||
|
|||
/** Return true if the base is in motion. */ | |||
isMoving(extra?: Struct): Promise<boolean>; | |||
isMoving(): Promise<boolean>; |
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 is technically a breaking change. None of the other isMoving
functions have an extra
parameter and BaseClient.isMoving
was not using it as well, leading me to believe it was mistakenly included. I thought to remove it, but let me know if I should not do this.
export const addMetadata = ( | ||
key: string, | ||
value: string, | ||
opts?: CallOptions | ||
): CallOptions => { | ||
const finalOpts = | ||
opts ?? ({ headers: {} as Record<string, string> } as CallOptions); | ||
(finalOpts.headers as Record<string, string>)[key] = value; | ||
return finalOpts; | ||
}; | ||
|
||
export const deleteMetadata = (opts: CallOptions, key: string): void => { | ||
const { [key]: _, ...remainingHeaders } = opts.headers as Record< | ||
string, | ||
string | ||
>; | ||
opts.headers = remainingHeaders; | ||
}; |
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.
Are these helpers used? Or just for potential users ?
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.
These two helpers not being used right now, but these would be good to include for potential usage. This was also introduced in the Python SDK, so I thought it would be good to keep things similar. Should I remove it?
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.
I think we should leave it in personally. We're now offering users access to passing metadata so we might as well make it easy for them to do so.
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.
we can leave in. i was just wondering if i missed something
Working example: