Namespace: BlogPost

BlogPost

Model for blog posts. Blog posts can currently only be authored by teams: one team can have many blog posts.

Source:

Methods

(async, static) getMostRecentBlogPosts(teamID, optionsopt) → {Array.<BlogPosts>}

Get the most recent blog posts for a given team

Parameters:
Name Type Attributes Description
teamID String

team ID to look up

options Object <optional>

query criteria

Properties
Name Type Default Description
limit Number 10

number of posts to retrieve

offsetDate Date

only get posts older than this date

Source:
Returns:
Type
Array.<BlogPosts>

(async, static) getMostRecentBlogPostsBySlug(teamSlugName, optionsopt) → {Array.<BlogPost>}

Get blog posts for a given team slug.

Parameters:
Name Type Attributes Description
teamSlugName String

slug (short human-readable identifier) for a team

options Object <optional>

options supported by BlogPost.getMostRecentBlogPosts

Source:
Returns:
Type
Array.<BlogPost>

(async, static) getWithCreator(id) → {BlogPost}

Get a blog post and the user object representing its original author

Parameters:
Name Type Description
id String

blog post ID

Source:
Returns:

post with populated .creator property

Type
BlogPost

populateUserInfo(user)

Populate virtual permission fields for this post based on a given user

Parameters:
Name Type Description
user User

the user whose permissions to check

Source: