Receiving JSON data

JackGoa

Member
Hi. I have a client that wants me to plug an API into his site. I'm still figuring it all out, but it seems I'm going to be able to use the REST form plugin for this.
However, their API returns data in JSON format. If I understand it properly, The REST plugin can only receive XML?
Is there some other way of doing this?
 
By "plug an API into his site" you mean you need to read data from his web service, and write it into a Fabrik list?

-- hugh
 
Well, I'm still trying to figure out how this all works, but it seems I'll be able to send data using the REST plugin, but the data being returned is in JSON as opposed to XML.

Am I even on the right track here? Here's the API info: https://www.luno.com/en/api

If you think it's out of my skill set, tell me how much you would charge to help implement so I can give a price to the client.
 
I still don't know what you are actually trying to do.

Can you summarize the requirements from the client.

BTW - if you are using Fabrik as a tool for doing work for clients, you really should get a paid sub. I can't afford to spend time supporting people for free who are using Fabrik as a commercial tool.

-- hugh
 
Hi Hugh. Yes I always do. Just doing research at this stage.

He wants to start it simple and grow over time. For now clients should be able to setup an account, make a deposit, login and get a confirmation that the deposit was made.
 
So create an account in Luno? So each J! user needs their own Luno account?

And "make a deposit" though a Fabrik form?

Sorry, but it's still clear as mud.

-- hugh
 
lol! That api is supposed to do all that. Maybe I'm misunderstanding what that REST plugin does?
 
The REST plugin sends data to a REST API, and optionally updates the form's row with a returned ID. So basically for updating a remote site with data from yours. It doesn't do what you want it to do.

You'd need a custom plugin using this PHP API:

https://github.com/neilgarb/bitx

But what I'm not understanding is you requirements. As per my questions. Does each J! user have to have their own account on Luno? If so, are they all under the same API key? Are you making payments through Fabrik, or just checking an account balance?

-- hugh
 
Ah oki. I thought I could send data from a fabrik form and then receive a reply.

About the user part, I'm not 100% sure. Will need to confirm with the client. I got the impression they would sign up, create a wallet address, then deposit.

The next step in future development would be that they can login and follow up on their investment. So not sure if they would fall under the trader's Luno account or their own.
 
That PHP API wrapper I pointed at looks pretty straight forward, so it wouldn't be hard to build a PHP form plugin that grabbed the data from the form and did what you need.

But without an exact spec of what they need to do, it's hard to give you any kind of estimate.

If all you need to do is pull a balance, that'd be dead easy.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top