We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
const { TransportApi, Configuration } = require("@mychaelgo/api-gojek");
const configuration = new Configuration({ accessToken: "***" });
const transportAPI = new TransportApi(configuration);
module.exports = async (req, res) => { const payload = req.body; try { const defaultHeaders = { xAppid: "com.gojek.app", xAppversion: "4.60", xDeviceos: "Android,10", xPhonemake: "Samsung", xPhonemodel: "GT-S7500", xPlatform: "Android", xPushtokentype: "FCM", xUniqueid: "95f99ddd6a5d34a9", xUserType: "customer", xSessionId: "d31cc210-a067-4d0d-a52f-199880ea8907", gojekCountryCode: "ID", };
const getTransportEstimateResponse = await transportAPI.getTransportEstimate({ ...defaultHeaders, sendPrioritisedOrder: true, userSelectedServiceType: 1, waypoints: "1.339299,103.981014|1.313135,103.952190" }); return res.status(200).json({ status: "success", getTransportEstimateResponse: getTransportEstimateResponse.data, });
} catch (error) { if (error.code === "ECONNREFUSED") { return res .status(500) .json({ status: "error", message: "service unavailable" }); }
return res.status(400).json({ status: "error", message: error.message, error: error, });
} };
The text was updated successfully, but these errors were encountered:
loginnya masih bisa mas?
Sorry, something went wrong.
No branches or pull requests
const { TransportApi, Configuration } = require("@mychaelgo/api-gojek");
const configuration = new Configuration({
accessToken: "***"
});
const transportAPI = new TransportApi(configuration);
module.exports = async (req, res) => {
const payload = req.body;
try {
const defaultHeaders = {
xAppid: "com.gojek.app",
xAppversion: "4.60",
xDeviceos: "Android,10",
xPhonemake: "Samsung",
xPhonemodel: "GT-S7500",
xPlatform: "Android",
xPushtokentype: "FCM",
xUniqueid: "95f99ddd6a5d34a9",
xUserType: "customer",
xSessionId: "d31cc210-a067-4d0d-a52f-199880ea8907",
gojekCountryCode: "ID",
};
} catch (error) {
if (error.code === "ECONNREFUSED") {
return res
.status(500)
.json({ status: "error", message: "service unavailable" });
}
}
};
The text was updated successfully, but these errors were encountered: