SDK in the client code
Import API from sdk
The Typescript client SDK exports an API constant which can be easily imported into your code and used to access every endpoint of the Bridge API.
Example
client.tsts
async () => {const {data ,error } = awaitAPI .user .getMe ({headers : {token : 'secretToken' }})if (data )console .log (data )if (error ) {switch (error .name ) {case "User not found"://...break;}console .log (error )}}
client.tsts
async () => {const {data ,error } = awaitAPI .user .getMe ({headers : {token : 'secretToken' }})if (data )console .log (data )if (error ) {switch (error .name ) {case "User not found"://...break;}console .log (error )}}
Please visit https://bridge.codes/studio for more information.