Giter Site home page Giter Site logo

social_feed's Introduction

Social Feed Plugin for Skygear

Configuration

The plugin is configured by environment variables.

  • SKYGEAR_SOCIAL_FEED_RECORD_TYPES - String of array of your record types which you want them to be indexed
  • SKYGEAR_SOCIAL_FEED_FANOUT_POLICY - Json string of record fanout policy

Initialization

curl http://<your-skygear-endpoint>/social-feed-init

JS API

addFriend(user)

add a friend and then indexing your friend's records

Param Type Description
user Skygear User Object

addFriends(users)

add friends and then indexing your friends' record

Param Type Description
users array of Skygear User Object

addFollowing(user)

add a followee and then indexing your followee's records

Param Type Description
user Skygear User Object

addFollowings(users)

add followees and then indexing your followees' record

Param Type Description
users array of Skygear User Object

removeFriend(user)

remove a friend and then remove the records indexing of that friend

Param Type Description
user Skygear User Object

removeFriends(users)

remove friends and then remove the records indexing of those friends

Param Type Description
users array of Skygear User Object

removeFollowing(user)

unfollow a user and then emove the records indexing of that user

Param Type Description
user Skygear User Object

removeFollowings(users)

unfollow users and then emove the records indexing of those users

Param Type Description
users array of Skygear User Object

createSocialFeedIndexForFriends(users)

Index users' records if you are friends

Param Type Description
users array of Skygear User Object

createSocialFeedIndexForFollowees(users)

Index followees' records

Param Type Description
users array of Skygear User Object

removeSocialFeedIndexForFriends(users)

Remove the indexing of users' records if you are friends

Param Type Description
users array of Skygear User Object

removeSocialFeedIndexForFollowees(users)

Remove the indexing of users' records if you are followers of them

Param Type Description
users array of Skygear User Object

queryMyFriendsRecords(query)

filter out the records which are not created by your friends

Param Type Description
query Skygear Query

queryMyFolloweesRecords(query)

filter out the records which are not created by your followees

Param Type Description
query Skygear Query

reindexSocialFeedIndexForFriends()

Reindex your index to your friends' records

Param Type Description

reindexSocialFeedIndexForFollowings()

Reindex your index to your followees' records

Param Type Description

enableFanoutToFriends()

Enable your records fanout to your friends' feed

Param Type Description

disableFanoutToFriends()

Disable your records fanout to your friends' feed

Param Type Description

enableFanoutToFollowers()

Enable your records fanout to your followers' feed

Param Type Description

disableFanoutToFollowers()

Disable your records fanout to your followers' feed

Param Type Description

social_feed's People

Contributors

cychiuae avatar rickmak avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.