Skip to content

AlainODea/mod_term_feed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zotonic External Term feeds

This module provides resource data in external term format using a RESTful interface identical to mod_atom_feeds.

Example Usage

This can be run from an EShell assuming play is available in /etc/hosts or your DNS:

f(Body), f(Resources),
{ok, {{_,_,_}, _, Body}} = httpc:request(get, {"http://play:8000/term/article", []}, [], [{body_format, binary}]),
{ok, Resources} = binary_to_term(Body).

Resources should be a proplist of form [{Id, RscProps}, {Id1, RscProps1}, ...].

Similarly, you can search for articles with Zotonic in their fulltext through the search interface:

f(Body), f(Resources),
{ok, {{_,_,_}, _, Body}} = httpc:request(get, {"http://play:8000/term/search?cat=article&text=Zotonic", []}, [], [{body_format, binary}]),
{ok, Resources} = binary_to_term(Body).

About

External Term Feed for Zotonic

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages