Lehter.com API v1 documentation

Getting started

Include the jQuery plugin after jQuery:

<script src="https://lehter.com/lehter.js"></script>

Initialize the plugin and inject results to DOM:

$('#your-container').lehter('project-slug');

You can execute a callback function, get posts by tags and change the template using options:


                $('#your-container').lehter('project-slug', {
                afterLoad: function(){
                //do stuff here
                },
                template: '<div><a href="##LEHTER-LINK##"><img src="##LEHTER-PHOTO##"></a></div>',
                tags: ['my-tag', 'another-tag']
                });
            

Using template tags

You can use following tags in your template:

Getting the raw response (no plugin)

        
            var url = 'http://www.lehter.com:3000/v1/project-name?callback=?';

            $.ajax({
            url : url,
            jsonp : "callback",
            dataType: "jsonp",
            success: function(data){
            //do stuff here
            }
            });
        
        

Support: karl.erss@gmail.com