Re: Service oriented module or plugin

50 views
Skip to first unread message

piotr_cz

unread,
Sep 11, 2012, 4:32:29 AM9/11/12
to Joomla! General Development
1) Check out Joomla docs
http://docs.joomla.org/index.php?title=Special%3ASearch&profile=default&search=ajax&fulltext=Search
(beware of outdated docs)
2) Some Joomla packages use ajax (installer, administrator/
com_languages, com_finder)
3) Search forums for similar quesions, this has been discussed here
before
4) For API calls, check out JHttp package
https://github.com/joomla/joomla-platform/tree/staging/libraries/joomla/http
and JGoogle package

Once you get on track, it's a lot of fun.


On Sep 11, 9:24 am, rostom <rostom.aghan...@gmail.com> wrote:
> Hi All,
> I want to develop a custom module or plugin that I can call asynchronously (i.e. via Ajax). How would I go about doing this in Joomla (v2.5)?
>
> The idea is that I will call this method asynchronously from my Javascript code. The module/plugin will then make a call to a 3rd party API (i.e. Youtube) and return back some data in XML or JSON format.  The 3rd party API is REST based and requires a login/pass to be passed in as part of its query, which is why I don't want to call it directly from my JS code.
>
> In the Java (Spring) world, I would do this by writing a class and/or method and associating it with a URL. Then it just becomes a matter of calling this URL from my JS and passing it the proper parameters.  Is there a way to do this in Joomla?
>
> Thanks in advance.

elin

unread,
Sep 11, 2012, 7:27:52 PM9/11/12
to joomla-de...@googlegroups.com

Also take a look at the Github package in the platform and the JGoogle package in the platform tracker (unless it was merged) that Aaron wrote and Diana's packages for Facebook, Twitter and Linked in which should be coming in as PRs soon. 

If it really is YouTube you might want to contribute code to the Google package.  It's going to  take a long time and a lot of people to cover all of the APIs they offer.

Elin

Elin
Reply all
Reply to author
Forward
0 new messages