• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Is "share with Facebook/Twitter" button at bottom of any page on a website, an api?  RSS feed

 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As "login with google/facebook" buttons are given on many websites, they are api provided by google/facebook as I know.
Similarly, the buttons we see on any website to "share with facebook, twitter" are also form of "api"?

Thanks in advance.
 
Saloon Keeper
Posts: 5391
143
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, those are web APIs.
 
Arun Singh Raaj
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the response.

As per my understanding, webservices(REST) are the raw form of APIs, RESTful WS are just URLs but APIs are structured piece of code that is provided by an application, API internally makes REST calls. (please let me know if i'm miserably wrong here)

I want to know can an API's interface be customized as per your requirement?
For example "Login with Google" api whose interface is certain, it looks same on every website you use.
I have this doubt because when I see an flight-ticket-booking application, it has implemented APIs of various airlines. If those airlines have provided their APIs then how did this booking-application compressed those APIs into the "Book" buttons?
 
Tim Moores
Saloon Keeper
Posts: 5391
143
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I want to know can an API's interface be customized as per your requirement?


That depends on the API. You'd need to consult the documentation of whatever API you're wondering about specifically.

I have this doubt because when I see an flight-ticket-booking application, it has implemented APIs of various airlines. If those airlines have provided their APIs then how did this booking-application compressed those APIs into the "Book" buttons?


I doubt that those airline APIs are behind the "Book" buttons. That button likely submits to the backend of the booking application, which will in turn use various APIs to connect to airline systems (or to a GDS, global systems for hotel and airline booking applications).
 
Arun Singh Raaj
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.

Tim Moores wrote:That button likely submits to the backend of the booking application, which will in turn use various APIs to connect to airline systems (or to a GDS, global systems for hotel and airline booking applications).


The APIs given by airline companies can be implemented at backend?, you mean within Java class? How would JavaScript code be implemented within Java?
 
Tim Moores
Saloon Keeper
Posts: 5391
143
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The API doesn't use JavaScript, it uses HTTP(S). That can be called from just about all languages.

So the backend would likely use Java (unless it's implemented in Node.js).
 
Arun Singh Raaj
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm talking about a flight booking website like "ebookers.com". When they were developing this app, I believe they had taken api from various airline companies like "American Airlines, Delta, United" and integrated into their website.
API is what airline companies provide you unique code which you have to copy paste into your website’s code. Isn't it?

So my question is, if "Delta" has given its api code then how did "ebookers" integrated that code into their website? How did they convert that api into "Book" button?

Tim Moores wrote:The API doesn't use JavaScript, it uses HTTP(S). That can be called from just about all languages.

So the backend would likely use Java (unless it's implemented in Node.js).


I know api uses HTTP protocol but i'm talking about the language that API is built on. HTTP is not the language to develop an api I guess. "ebookers.com" has to implement that code into their view-page rather than at the backend, right?

Thanks in advance.
 
Tim Moores
Saloon Keeper
Posts: 5391
143
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

API is what airline companies provide you unique code which you have to copy paste into your website’s code. Isn't it?


Well, it's hardly going to be copy-and-paste - integrating an API will generally involve a fair amount of development. And it's not so much the web site (meaning the frontend), but rather its backend.

if "Delta" has given its api code then how did "ebookers" integrated that code into their website? How did they convert that api into "Book" button?


A public API will generally come with instructions on how to use it. Delta probably has a developer web site that explains what one would need to do.

I know api uses HTTP protocol but i'm talking about the language that API is built on. HTTP is not the language to develop an api I guess. "ebookers.com" has to implement that code into their view-page rather than at the backend, right?


HTTP-based APIs are frequently defined via the URLs which one can use and their parameters. While the company may provide an SDK that comes with code (in Java or other languages) built around those URLs, not all do - in which case creating the backend involves writing code that accesses those URLs in appropriate ways.
 
Arun Singh Raaj
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it.
Thanks for the help
 
A berm makes a great wind break. And Iwe all like to break wind once in a while. Like this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!