1. INCLUDE JS FILES
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="//rawgithub.com/christianv/jquery-lifestream/master/jquery.lifestream.min.js"></script>
2. HTML
<div id="lifestream"> </div>
3. JAVASCRIPT
$("#lifestream").lifestream({
list:[
{
service: "github",
user: "christianv"
},
{
service: "twitter",
user: "denbuzze"
}
]
});
4. CONFIGURATION
The plug-in accepts one configuration JSON object:
$("#lifestream").lifestream({
classname: "lifestream",
feedloaded: feedcallback,
limit: 30,
list:[
{
service: "github",
user: "christianv"
},
{
service: "twitter",
user: "denbuzze"
}
]
});
classname: The name of the main lifestream class. We use this for the main ul class e.g. lifestream and for the specific feeds e.g. lifestream-twitter
feedloaded: (function) A callback function which is triggered each time a feed was loaded.
limit: (integer) Specify how many elements you want in your lifestream (default = 10).
list: (array) Array containing other JSON objects with information about each item. Each item should have a service and a user. For more information about each service
5. JQUERY TEMPLATES
You have the ability to use jQuery templates for your feed. Checkout the template page to see an overview of the current available templates.
Usage:
{
service: 'deviantart',
user: 'gabbyd70',
template: {
deviationpost: 'heeft hetvolgende gepost: <a href="${url}">${title}</a>'
}
}