• 0

API teach me!


Question

hi! basically I have 1 week to understand API and use it in a basic way .... I need to write server side scripts (eaaassssyyy) and then most likly JSON them to work with JAVA and iOS apps .... so please tell me oh wise neowins O.o how do i do this ... teach me!!! (using examples of php or .net please)

Link to comment
Share on other sites

16 answers to this question

Recommended Posts

  • 0

An API is just the way one piece of software interfaces with another. Every API is going to be different. Do you have a specific API you want to learn? If this is assignment and you have the option to choose, Twitter's API is pretty straight forward.

Link to comment
Share on other sites

  • 0

Every API has (or at least should have) a documentation with examples that you can rely on.

me and offical documentation never get on I like a basic explination and I learn as I go!!

An API is just the way one piece of software interfaces with another. Every API is going to be different. Do you have a specific API you want to learn? If this is assignment and you have the option to choose, Twitter's API is pretty straight forward.

well im writing server side script and it needs to be able to send information to a java/iOS App :) it all seems pretty straight forward I just need some examples some hints and tips, do's and donts

Link to comment
Share on other sites

  • 0

You might get a better response if you ask questions about particular classes/functions/concepts you're having a problem with.

What you're asking is coming off as is "hey do my assignment for me".

Link to comment
Share on other sites

  • 0

www.google.com

At least attempt to show you did some research before asking everyone to do all the work for you.

obviously you misunderstand the point of a forum but that is ok don't worry here...have some crayons....

You might get a better response if you ask questions about particular classes/functions/concepts you're having a problem with.

What you're asking is coming off as is "hey do my assignment for me".

if I was saying "hey, do my assignment for me" I would post more details about the actual task...I have yet to even start the job because contracts are not signed for a few weeks.... API looks like an easy thing to learn I just dislike reading huge documentation so I come here where you guys are normally good at picking out the key points :p

most of what I need is simply writing php/sql results to xml files to be readable in a java format (JAVA not JS) so mostly strings of data... at this point its difficult to say what I need to do because the programmers have yet to get back to me on how they are operating the app :/ but this app will be run like a website just (like a FB app) and will upload, download, search ect with the front end being the app and the server side being the server :p I am probably just rambling but yea

Link to comment
Share on other sites

  • 0

An API is just an interface..

it can be as easy as:

include <namespace/dll>

but it can also be much harder. Really they are just an interface into working with another piece of code externally. So.. that could be referencing the Ajax API from Google and making function calls (I don't know them but could be like..) google_ajax.RefreshDiv(document.divByID("myDiv"));

ie) VB Code to make a reference to the GetWindowsDirectory (lib/class/api) in kernel32


Public Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" ( _
ByVal lpBuffer As String, ByVal nSize As Long) As Long
[/CODE]

lets you then do GetWindowsDirectory(buffer,size)

not sure what API it is you want to use.. but I guess you could write a java app which has a reference to the web API (aka web class).. that allows you to pull back information from the server and display it on the screen in a custom format?

Link to comment
Share on other sites

  • 0

Help me learn potato.

It's kind of the question you are asking atm man >.<

Unfortunately I think you are going to have to learn to love the documentation. There in lie all the answers :)

  • Like 3
Link to comment
Share on other sites

  • 0
<snip> if I was saying "hey, do my assignment for me" I would post more details about the actual task...I have yet to even start the job because contracts are not signed for a few weeks.... API looks like an easy thing to learn I just dislike reading huge documentation so I come here where you guys are normally good at picking out the key points :p <snip>

Firstly, if you're after a development job you best start learning to love documentation - either reading or writing it as unless the employer has a dedicated documentation team - I'll give you 3 guesses as to whom will be doing it. Also documentation is a key part of integrating systems.

Secondly, yes - it's very easy to learn how to interface with various things via the differing API's - read the documentation.

Link to comment
Share on other sites

  • 0

This is a nonsense question. API stands for Application Programming Interface. The interface is different for each application.

Also try not being so rude.

Edit: Looks like you want to implement your own API, but your post doesn't contains any kind of useful information,

Link to comment
Share on other sites

  • 0

You fail to understand what an API actually is. It is (by some definitions) simply an exposed entry point to a service or application. As such, you cannot learn "API" as it is not a technology itself.

You tend to "consume" an interface class to gain access to more tools and services. The API is simply the tunnel through which you do this.

For example, there's a lovely Google Maps API that allows you to generate and plot points on a map. There's also a nice FourSquare API that will get your checked-in places. They use different technologies entirely but can be combined in a "mash-up".

Moreover, there's often many different ways to consume an API. For example, the PayPal integration can be done using Name/Value pairs or via a SOAP request. You can talk to some services APIs but many different languages.

As such, your request is nonsensical.

Link to comment
Share on other sites

  • 0

You fail to understand what an API actually is. It is (by some definitions) simply an exposed entry point to a service or application. As such, you cannot learn "API" as it is not a technology itself.

You tend to "consume" an interface class to gain access to more tools and services. The API is simply the tunnel through which you do this.

For example, there's a lovely Google Maps API that allows you to generate and plot points on a map. There's also a nice FourSquare API that will get your checked-in places. They use different technologies entirely but can be combined in a "mash-up".

Moreover, there's often many different ways to consume an API. For example, the PayPal integration can be done using Name/Value pairs or via a SOAP request. You can talk to some services APIs but many different languages.

As such, your request is nonsensical.

no i understand what API is and I will be building my own API im not after predeveloped APIs Im asking the best way to program my own

Link to comment
Share on other sites

  • 0

Pretty sure that's not what you are asking.

To answer what you didn't ask:

1. Understand all of the functionality your API must expose.

2. Understand the way you intend the API to be used (imagine what you would want if you were developing with your own API).

3. Understand the security issues your API will have to deal with (make sure you don't feed user passwords via your API)

4. Plan the structure and usage of the API.

5. Repeat steps 2-4 until satisfied.

6. Document API.

7. Write API.

8. Amend for any change you might have been required to make.

Link to comment
Share on other sites

  • 0

no i understand what API is and I will be building my own API im not after predeveloped APIs Im asking the best way to program my own

Just make the members that you want to be part of your API public and the ones that aren't supposed to be accessible private. Documentation is preferable if you're writing something for others to use.

Link to comment
Share on other sites

  • 0

Just make the members that you want to be part of your API public and the ones that aren't supposed to be accessible private. Documentation is preferable if you're writing something for others to use.

well this API is private but I guess documentation will need to be written for the person contracting me though hopefully the api should be a mere footnote at the bottom of my server development report

Link to comment
Share on other sites

  • 0

Help me learn potato.

It's kind of the question you are asking atm man >.<

Unfortunately I think you are going to have to learn to love the documentation. There in lie all the answers :)

QFT, Which API are you looking at ??? There are lots. For example I am looking at the Betfair API at the moment to plug into make bets. The IOS API wouldn't do this for example.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.