Skip to content

youiest/socialize-feed

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Feed

A package for creating a social network style news feed

Post - Extends CommentableModel##

Post.prototype.user() - The user who's feed the post was added to.

Post.prototype.poster() - The use who added the post to the feed.

Post.prototype.checkOwnership() - Check if the user is the poster or the user as both can delete the post.

Post.prototype.canUpdate() - Check if the user is allowed to update the post. Only poster can change a post.

User Extensions

User.prototype.feed() - Get a feed object for the user.

var feed = Meteor.user().feed();

Feed Object

addPost(body) - add a post the the users feed.

var feed = Meteor.users.findOne().feed();

feed.addPost("Hello World!");

Publications

posts {limit, skip, sort:{field:direction}} - publish the posts for the current user and of their friends.

Meteor.subscribe("posts", {limit:10, skip:10, sort:{date:-1});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%