Json for mobile app

8 years 2 months ago #277639 by bravostreet
Json for mobile app was created by bravostreet
Dear Joomlapolis,

I'd need to exchange from MySQL to JSON all users lists and their personal datas and Uddeim message (for mobile "push message") from CB portal to a dedicated mobile app to build yet.

Have You some suggestion?

Thanks

Please Log in to join the conversation.

8 years 2 months ago - 8 years 2 months ago #277658 by krileon
Replied by krileon on topic Json for mobile app
A one time thing or are you needing some sort of HTTP request API? For a one time export you can use phpmyadmin and format the query however you're needing then export it. As for an HTTP request API we have none and best I can suggest is trying to use CB Auto Actions with Triggers set to None and in a Code action write the PHP to do whatever you're needing. You can then access it using its URL under the global tab. Realistically you'll need to develop a custom solution to meet your needs as you're going to have security issues to be worried about, authentication, etc..


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

8 years 2 months ago #277695 by bravostreet
Replied by bravostreet on topic Json for mobile app
I need a sort of http request API, no one time. Have You experience with JSON Export Joocode joomla extension? Do You think is CB compatible? I ask You this because I know You can objectively support me.
Thanks!

Please Log in to join the conversation.

8 years 2 months ago #277704 by krileon
Replied by krileon on topic Json for mobile app

Have You experience with JSON Export Joocode joomla extension?

Nope.

Do You think is CB compatible?

No idea.

You can use a Code action to do this I suppose, but like I said you still will have to write code. The initial setup and usage would be as follows.

Global
Triggers: None
Type: Code
User: Automatic
Access: Everybody
Action
Method: PHP
Code:
header( 'Content-Type: application/json' );

return json_encode( $data );
Return: Echo

What $data you output is entirely up to you. There's no security to this endpoint so you may want to add a condition like the following.

[get_key] Equal To YOUR_SECRET_KEY_HERE

This ensures the URL must contain whatever key you want (e.g. f24sg56#$%sfd) or the action won't execute.

You can execute the action directly using its URL found under the Global tab as "Internal Action URL". For JSON usage you'll need to add &format=raw to the URL.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

8 years 2 months ago #277907 by bravostreet
Replied by bravostreet on topic Json for mobile app
Thanks Kyle, I think is a bit complicated, may be easy for You ;), not for me :blush: .
Do You think I could find more informations and details to accomplish Your good solution?

Please Log in to join the conversation.

8 years 2 months ago #277913 by krileon
Replied by krileon on topic Json for mobile app
As far as what you need to do in CB the above is it. The code however you'd need to write your self using PHP to output whatever information you're wanting. There's a few PHP tutorials below.

www.w3schools.com/php/default.asp

There's several other sites available for learning PHP in addition to the above around the web.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.216 seconds

Facebook Twitter LinkedIn