Forum Moderators: phranque

Message Too Old, No Replies

What's API.?

         

zozzen

1:09 am on Nov 25, 2007 (gmt 0)

10+ Year Member



I've seen this word all the time. After wiki-ing and googling this, I still have no idea what it really is. It seems that it can help people develop a mashup website based on many info around the web, but how does it work actually? What programming language does it refer to?

I downloaded youtube's API. It seems to be a manual rather than a programming. It shows something like:


country Property

public var country:String

currentlyOn Property

public var currentlyOn:Boolean

favoriteVideoCount Property

public var favoriteVideoCount:uint

firstName Property

public var firstName:String

Pretty lost about this. If I want to learn it from a scratch, what programmming language should I learn first?

Thanks a lot.

phranque

6:55 am on Nov 25, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



API usually stands for application programming interface.

i'm not familiar with youtube's api - what you posted looks more like a configuration file...

zozzen

8:47 am on Nov 26, 2007 (gmt 0)

10+ Year Member



that's possibly a manual as they're located in a folder /doc. They also provide other files in .swc extension and in a folder like bin. But I'm wondering how these files could help to develop an application? Is it related to a particular kind of programming language?

jtara

10:23 pm on Nov 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



An API, in the broadest sense, is a specification for a software interface.

In most cases, it comes down to a set of specifications of "functions" or "methods", the parameters that those functions or methods take, and the expected results and error codes.

It's a specification of how to call on some software from within some other software to accomplish some specific task(s).

An API might be language-specific or might be language-agnostic. A language-specific API will typically come with a "library" that may have to be installed on your computer, or may have to be linked with software that you write.

Some APIs are only usable on a single computer. Others allow calls to be made across a network.

Some APIs are language-agnostic. These typically follow any one of several industry standards for means of linking from one program to another in a non language-specific way. Web services APIs are particularly popular today, and are typically language-agnostic. Popular web services API framesworks (a specification of how to write a specification...) are SOAP and REST. These web services APIs typically use HTTP transport. GET or POST requests represent calls, and parameters are provided either as URL parameters or as POST data. Results are returned in the HTTP reply.

You can typically access web services from software written in any language, provided that some support software for the API framework is available for that language. (Or if you are willing to go the trouble to write one.)

The API itself is technically an abstract concept, and is represented by it's documentation. The documentation might be provided in any form - printed, PDF, online web pages, etc. There may be other support files provided, depending on the nature of the API.