Show:

Streams.Interests Class

Methods related to "Streams/interest" streams.

Constructor

Streams.Interests

(
  • fields
  • [callback]
  • [options]
)

Parameters:

  • fields Object
  • [callback] Function optional
  • [options] Object optional

    Can be used to override any options for the call to Q.req as well as provide the following options:

    • [subscribe=false] Object optional

      Set this to true to also subscribe to the interest

    • [publisherId=Q.Users.communityId] Object optional

      Can be used to override the community id

Item Index

Methods

Methods

add

(
  • title
  • callback
  • [options]
)
static

Add an interest to the logged-in user

Parameters:

  • title String

    The title of the interest

  • callback Function
  • [options] Object optional
    • [subscribe] Boolean optional

      Whether to subscribe

    • [publisherId] String optional

      Defaults to the current community id

categoryIconUrl

(
  • communityId
  • category
  • [style='white']
)
String static

Get the url of a category icon

Parameters:

  • communityId String
  • category String
  • [style='white'] String optional

    Can be "white" or "colorful"

Returns:

forMe

(
  • communityId
  • callback
)
static

Load my own interests

Parameters:

forUsr

(
  • userId
  • communityId
  • callback
)
static

Load interests for a user

Parameters:

load

(
  • communityId
  • callback
)
static

Load official interests from a community

Parameters:

remove

(
  • title
  • callback
  • [options]
)
static

Remove an interest from the logged-in user in the main community

Parameters:

  • title String

    The title of the interest

  • callback Function
  • [options] Object optional
    • [publisherId] String optional

      Defaults to the current community id