General Question

frankielaguna's avatar

What is a good resource for learning how to write an API?

Asked by frankielaguna (256points) April 19th, 2008

I am a PHP programmer looking for learn how to write an API.

Observing members: 0 Composing members: 0

5 Answers

paulc's avatar

What are you writing an API for? An API is just a formalized set of public methods for accessing something so its no more complicated than writing anything else. Are you talking about doing something like the flickr API? The biggest hurdle I think you’ll have is the token based authentication which, honestly, isn’t that complicated either.

Breefield's avatar

The idea behind an API is that you either serve information in a, usually XML based manner, so that someone else can access it with an API token.

It can also be used to allow others to do things with your system, like send photos to a flickr page for uploading. It all just depends on your needs.

So the manner in which you make your API depends solely on what you expect people to do with it.

If you’re looking to send out information, look into serving a PHP page as XML. If not, and you need people to mess with your system things are going to be a lot more complicated.

phoenyx's avatar

I’d recommend looking into REST.

frankielaguna's avatar

So this is what I am trying to do.

I need to make a central “portal” for a small LAN website. It needs to be easy to add additional websites(IE: Employee Punch Ins, Call Records, etc). I was thinking writing an API for the interaction with the portal, but am not 100% sure this is the way to go.

Any ideas?

Response moderated (Spam)

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther