I want to use a bluemix 3rd party remote api (alchemy api)
At the moment I am unclear how this is done in a web application.
Does this happen client side or server side?
A lot of examples I'm seeing at the moment are about server nodejs/ express js but they seem to focus on creating your own apis. I'm not interested in creating my own api but to simply use a 3rd party api and to display the results in a client side UI
Taking a client side approach seems easier to understand. I could say create a form and a submit button to create a url request that calls a remote api with custom parameters. The json results could then be parsed and put in some client side UI
But I am unclear about what happens to the api key i.e. presumably it becomes visible in the url and someone else could see it, and what about authentication etc
I suspect the right approach is to use the server side approach for security, authentication etc
Surprisingly I tend to only find examples on the internet on how to create your own api not about calling a 3rd party rest api from server side such as nodejs & express.
If the server approach is the recommended approach how does my client side ui call (with custom parameters) the server side nodejs/expressjs, which in turn calls a remote api, which then returns the results for me to use in client ui? Or if it returns the results to the server, how do I then get that info from the server to my client ui.
Any good tutorial links much appreciated
I've noticed a new product called bluemix strongloop. Is this the right place to start?
If so, I'll focus on their documentation
The api explorer example in strongloop focuses on creating your own novel custom api i.e their coffeeshop example, where you are setting up a fictional coffeeshop where you can order coffees using get, put etc
It occurred to me that if I wanted strongloop to use 3rd party apis, all I need to do is to map the 3rd party api library to api explorer. i.e. manually recreate each 3rd party api in strongloop api explorer
I assume this is the right approach? though slightly counter intuitive as I would probably need to completely replicate an entire 3rd party api library manually into strongloop but surely a much better approach then doing a client side version of calling 3rd party rest apis. Taking a server side approach I will then have access to better security, authentication, analytics and other cool stuff that strongloop offers etc
Let me know anybody if this is a completely wrong approach to using strongloop for 3rd party apis
Answer by @chughts (12979) | Oct 06, 2015 at 06:09 AM
Based on the tags, I am guessing that you are trying to use the AlchemyAPIs. Fortunately there is a getting started guide on
http://www.alchemyapi.com/developers/getting-started-guide
with coding examples in Node.js, Python, Ruby and PHP.