Jump to content



Photo

API teach me!


  • Please log in to reply
16 replies to this topic

#1 Original Poster

Original Poster

    C++ n00b

  • Tech Issues Solved: 1
  • Joined: 15-July 08
  • Location: my room
  • OS: windows 7, backtrack 5, OSx 10.6

Posted 20 September 2012 - 16:31

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)


#2 CentralDogma

CentralDogma

    Neowinian Senior

  • Joined: 29-February 08

Posted 20 September 2012 - 21:14

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.

#3 Descartes

Descartes

    Neowinian

  • Joined: 29-November 08
  • Location: Poland

Posted 20 September 2012 - 21:29

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

#4 OP Original Poster

Original Poster

    C++ n00b

  • Tech Issues Solved: 1
  • Joined: 15-July 08
  • Location: my room
  • OS: windows 7, backtrack 5, OSx 10.6

Posted 21 September 2012 - 04:05

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

#5 The_Decryptor

The_Decryptor

    STEAL THE DECLARATION OF INDEPENDENCE

  • Tech Issues Solved: 4
  • Joined: 28-September 02
  • Location: Sol System
  • OS: iSymbian 9.2 SP24.8 Mars Bar

Posted 21 September 2012 - 04:15

API is a generic term for what you use to communicate with another library/module in your program, there's no one single "API" you can learn.

#6 +virtorio

virtorio

    4089 III

  • Tech Issues Solved: 11
  • Joined: 28-April 03
  • Location: New Zealand
  • OS: OSX 10.9, Windows 8.1
  • Phone: Samsung Galaxy SIII

Posted 21 September 2012 - 04:41

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".

#7 OP Original Poster

Original Poster

    C++ n00b

  • Tech Issues Solved: 1
  • Joined: 15-July 08
  • Location: my room
  • OS: windows 7, backtrack 5, OSx 10.6

Posted 21 September 2012 - 19:02

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

#8 firey

firey

    F͎̗͉͎͈͑͡ȉ͎̣̐́ṙ͖̺͕͙̓̌è̤̞͉̟̲͇̍̍̾̓ͥͅy͓̍̎̌̏̒

  • Tech Issues Solved: 6
  • Joined: 30-October 05
  • Location: Ontario, Canada
  • OS: Windows 7
  • Phone: Android (4.1.2)

Posted 21 September 2012 - 19:08

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

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?

#9 articuno1au

articuno1au

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 20-March 11
  • Location: Brisbane, Australia

Posted 21 September 2012 - 19:12

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 :)

#10 Kami-

Kami-

    ♫ d(-_-)b ♫

  • Tech Issues Solved: 2
  • Joined: 28-July 08
  • Location: SandBox

Posted 22 September 2012 - 01:16

<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.

#11 nub

nub

    Neowinian Senior

  • Joined: 19-November 06
  • Location: Amerika

Posted 22 September 2012 - 01:31

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,

#12 +Nik L

Nik L

    Where's my pants?

  • Tech Issues Solved: 2
  • Joined: 14-January 03

Posted 22 September 2012 - 01:56

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.

#13 OP Original Poster

Original Poster

    C++ n00b

  • Tech Issues Solved: 1
  • Joined: 15-July 08
  • Location: my room
  • OS: windows 7, backtrack 5, OSx 10.6

Posted 22 September 2012 - 12:12

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

#14 articuno1au

articuno1au

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 20-March 11
  • Location: Brisbane, Australia

Posted 22 September 2012 - 12:37

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.

#15 Eric

Eric

    Neowinian Senior

  • Tech Issues Solved: 12
  • Joined: 02-August 06
  • Location: Greenville, SC

Posted 22 September 2012 - 12:43

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.