I was wondering if other members have used PureBasic to develop software for interacting with APIs, such as writing a client. The term API seems to have become so common recently that it feels like everything must have an API.
The requirement I'm thinking about is that part of our work is based in UK. The UK government has introduced "Making Tax Digital for VAT", which requires accounting systems to be able to submit VAT information. Many of the accounting systems in UK now support this but some of us run legacy systems which don't. There are also what's called "bridging software" tools, which in many cases are nothing more than an add-in for MS Excel. These are for users who don't run an accounting system, or run a legacy system that can't submit the data. With those, it's a case of entering the 7 figures into Excel and then telling the bridging software which Excel cells contain the relevant figures. The submission is then made to the government service, which I presume is the API.
An example of one of the better applications is here, but to be honest they all seem quite bad quality, especially the Excel add-ins...
https://easymtdvat.com/mtd-software-for-excel
Web-based APIs
Re: Web-based APIs
Much data is transferred via 'https' and with 'xml' or 'json'. However, implementing these protocols is usually very time-consuming and must be constantly adapted.
If the data is transmitted with 'REST Web-API', then this is done with HTTPRequest (see PB help).
If the data is transmitted with 'REST Web-API', then this is done with HTTPRequest (see PB help).
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Web-based APIs
You will find all informations (API, Documentation, Sandbox) for HMRC in
https://developer.service.hmrc.gov.uk/api-documentation
https://developer.service.hmrc.gov.uk/api-documentation
Re: Web-based APIs
Thanks @mk-soft @Marc56us for the replies and the links. In that case I guess we can do it through HTTPRequest as you say.
For the REST JSON data or XML, I presume we need to handle that in our code. I don't think it's difficult. When I developed a Xamarin Android application for a different project, there was a JSON plug-in for Visual Studio as I recall, but it isn't a big deal to write it.
For the REST JSON data or XML, I presume we need to handle that in our code. I don't think it's difficult. When I developed a Xamarin Android application for a different project, there was a JSON plug-in for Visual Studio as I recall, but it isn't a big deal to write it.
Re: Web-based APIs
As usual in PB, all you need is in the box:
JSON lib, XML lib, and even regular expressions (sometime more easy for extract return datas)
JSON lib, XML lib, and even regular expressions (sometime more easy for extract return datas)