with Onbee.app and MEXC?
Delete an employee with the specified ID. See the documentation
Update an employee with the specified ID. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
onbee_app: {
type: "app",
app: "onbee_app",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.onbee_app.$auth.workspace_name}.onbee.app/api/employee-list/`,
headers: {
Authorization: `Bearer ${this.onbee_app.$auth.api_token}`,
},
})
},
})
import { axios } from "@pipedream/platform";
import crypto from "crypto";
export default defineComponent({
props: {
mexc: {
type: "app",
app: "mexc",
}
},
async run({ steps, $ }) {
// Build query string
const timestamp = Date.now()
const recvWindow = 5000
const queryString = `recvWindow=${recvWindow}×tamp=${timestamp}`
// Generate signature
const signature = crypto
.createHmac('sha256', this.mexc.$auth.secret_key)
.update(queryString)
.digest('hex')
// Make authenticated request
return await axios($, {
method: 'GET',
url: 'https://api.mexc.com/api/v3/account',
headers: {
'X-MEXC-APIKEY': this.mexc.$auth.access_key
},
params: {
recvWindow,
timestamp,
signature
}
})
},
})