michaelhugi Posted May 30, 2021 Posted May 30, 2021 Since I'm writing an open-source GDTF-Parser I was wondering how the files are distributed. As far as I know you can download some GDTF-Files manually from gdtf-share. I think GDTF is something the industry really needs. So to push the format all manufacturers of software would immensly benefit if they could just access gdtf-share from inside their application so the user does not need to download files manually. Is there an API for such a workflow and if not, is there one planned? If nothing is planned, would you be interested if I help developing such an API?
Petr Vanek - Robe Posted May 31, 2021 Posted May 31, 2021 Hi @michaelhugi, yes, this is currently being developed. There is an existing API that the builder already uses and it is being extended to allow data consumers to pull the data and also data creators to upload the data. Kind regards Petr 1
anebo Posted June 3, 2022 Posted June 3, 2022 Ahoj Petre 🙂 Hi Peter I am just wondering if there is any progress in API developement. I am developing simple opensource raspi console for hobby purpouses and it woud be really nice to integrate such API in it. Dikydik
Petr Vanek - Robe Posted June 4, 2022 Posted June 4, 2022 @anebo yes, the API exists. Please email info@gdtf-share.com for access. Hope this helps P. 1
Petr Vanek - Robe Posted September 27, 2023 Posted September 27, 2023 The GDTF Share API has been made available and is documented here: https://github.com/mvrdevelopment/spec/blob/GDTF_Share_API/GDTF_Share_API/GDTF%20Share%20API.md . It is pretty straight forward to implement.
rwanoux Posted January 24 Posted January 24 Hello, Has the public API documentation been removed from mvrdevelopments repository ? Or is it now restricted ?
Petr Vanek - Robe Posted January 24 Posted January 24 3 hours ago, rwanoux said: Hello, Has the public API documentation been removed from mvrdevelopments repository ? Or is it now restricted ? Hello, the API is described here: https://github.com/mvrdevelopment/tools
AlexChapman Posted January 24 Posted January 24 Hi, I am currently trying to use the GDTF-Share API myself, but I am running into a "Cross-Origin Request Blocked" issue. It states: Reason: CORS header ‘Access-Control-Allow-Origin’ missing I am running this on github pages, which I don't think is the issue. Below I have provided the code used for the request: const response = await fetch("https://gdtf-share.com/apis/public/login.php", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ user: "Real User 42", password: "123SafePassw0rd456" }), }); If anyone has any insight into this issue, that would be much appreciated. thanks, Alex 🙂
rwanoux Posted January 25 Posted January 25 maybe add mode :cors ?? const response = await fetch("https://gdtf-share.com/apis/public/login.php", { method: "POST", mode:"cors", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ user: "_your_real_user_not_the_exemple", password: "_your_real_password_not_the_exemple" }), });
AlexChapman Posted January 25 Posted January 25 After doing some research, because I am sending an API request from front-end javascript it is a "Cross-Origin Resource Sharing"(CORS) request, which is disallowed by default. From my understanding, there are 2 main solutions to this: 1. Setup a Server-Side Proxy, to send a request on behalf of the client. 2. Use a CORS Proxy Service to make the request.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now