How Does Api Works

Discussion in 'PHP' started by Kuna, Feb 11, 2013.

  1. #1
    Could someone explain me or give me some general tutorial how API works. Is syntax for all APIs the same or there is difference between APIs of different applications.

    I tried to google it, but couldn't find useful tutorial
     
    Kuna, Feb 11, 2013 IP
  2. innozemec

    innozemec Active Member

    Messages:
    84
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    68
    #2
    which API exactly?

    API is simply "application programming interface"

    everybody writes his own API for the service/product he has to server his needs and customers..

    there's no universal
     
    innozemec, Feb 11, 2013 IP
  3. Dangy

    Dangy Well-Known Member

    Messages:
    841
    Likes Received:
    25
    Best Answers:
    2
    Trophy Points:
    155
    #3
    Most api systems work on fetching information from one server to another. API depending on what your trying to do is different for every company as all there features are different. Most API work based off your script connecting to them threw a given url they use.. example: graph.facebook.com
     
    Dangy, Feb 11, 2013 IP
  4. Cartrafficcontroller.com

    Cartrafficcontroller.com Greenhorn

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #4
    It's also worth mentioning that an API doesn't have to be language specific and most services can be connected to using whatever lang you're most comfortable with.

    Usually an API will begin by requiring some credentials and then depending on the guidelines you can send/receive/exchange data according to their specifications. API's are often well documented(or should be).

    API is a very general term.
     
  5. tkdchamp10

    tkdchamp10 Greenhorn

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #5
    An API is basicly a way of letting you do stuff 'easier'. It gives you building blocks to reach goals in a standardized effort. Usually you will have a certain number of methods/procedures/what not you can call that allow you to do your tasks in a straightforward manner.

    Think of an API as the switches on a device that you can use. If you have an oven for example, the API to the oven are the methods you can use on that oven.

    Example:

    API call 1: switch ON/OFF
    API call 2: set temperature
    API call 3: open/close door
    API call 4: activate/deactivate grill

    etc. etc.
     
    tkdchamp10, Feb 16, 2013 IP