Havent really looked into it yet but i was told at work yesterday that we will now be getting all our data through an available API to us, basically im looking to find ways of reading, communicating and utilising API's with PHP.
can anyone provide me with some links please?
Thanks
PHP <> API
Moderator: General Moderators
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
An API can be anything.
It could be as simple (but hard to use) as "Scrape the html of the webpage, and do with it what you will".
It could be as complex (but easy to use) as "We will send all data via XML on a specific port using a specific DTD".
It could even entail SOAP, socket communications, or even email. It all depends on the application.
When people say they will give you an API, they usually mean "We are going to be consistent about how my app will communicate with your app", which is an excellent start. Of course, from there..
It could be as simple (but hard to use) as "Scrape the html of the webpage, and do with it what you will".
It could be as complex (but easy to use) as "We will send all data via XML on a specific port using a specific DTD".
It could even entail SOAP, socket communications, or even email. It all depends on the application.
When people say they will give you an API, they usually mean "We are going to be consistent about how my app will communicate with your app", which is an excellent start. Of course, from there..
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
with a lot of luck you will get some good documentation on how to use the API.
with a little luck you will get some documentation on how to use the API.
or with no luck you will get **** all and only a phone number to call on how to use the API and the person on the other end doesn't speak english as their native tongue. (makes communicating complex ideas difficult).
I working with the third at the moment.
with a little luck you will get some documentation on how to use the API.
or with no luck you will get **** all and only a phone number to call on how to use the API and the person on the other end doesn't speak english as their native tongue. (makes communicating complex ideas difficult).
I working with the third at the moment.
Can you count on a consistent API? You could have a big problem if it changes regularly with a lot of code to update each time. You can isolate this by encapsulating the API (Adapter? Or Facade? I keep getting them mixed up) so that at least you just have one class to edit rather than the entire code base.