예제 #1
0
 public static SGEntity ToRpc(this CommunitiesIds ids)
 {
     if (ids == null || ids.Type == null)
     {
         return(null);
     }
     return(new SGEntity
     {
         EntityType = (int)ids.Type, Id = ids.Ids[0]
     });
 }
예제 #2
0
 /// <summary>
 /// Get activities in a topic.
 /// </summary>
 /// <param name="topic">The name of the topic.</param>
 /// <returns>New query.</returns>
 public static ActivitiesQuery ActivitiesInTopic(string topic)
 {
     return(new ActivitiesQuery(CommunitiesIds.Topic(topic)));
 }
예제 #3
0
 /// <summary>
 /// Post to the feed of current user.
 /// </summary>
 /// <returns>new target.</returns>
 public static PostActivityTarget Timeline()
 {
     return(new PostActivityTarget(CommunitiesIds.User(UserId.CurrentUser())));
 }
예제 #4
0
 /// <summary>
 /// Post activity in topic.
 /// </summary>
 /// <param name="topicId">Topic ID.</param>
 /// <returns>new target.</returns>
 public static PostActivityTarget Topic(string topicId)
 {
     return(new PostActivityTarget(CommunitiesIds.Topic(topicId)));
 }
 /// <summary>
 /// Get all users reacted to activity with ID.
 /// </summary>
 /// <param name="activityId">Activity ID.</param>
 /// <returns></returns>
 public static ReactionsQuery ForActivity(string activityId) {
     return new ReactionsQuery(CommunitiesIds.Activity(activityId));
 }
 /// <summary>
 /// Get followers of a user.
 /// </summary>
 /// <param name="userId">User ID.</param>
 /// <returns>new query.</returns>
 public static FollowersQuery OfUser(UserId userId)
 {
     return(new FollowersQuery(CommunitiesIds.User(userId)));
 }
 /// <summary>
 /// Get followers of topic with ID.
 /// </summary>
 /// <param name="topicId">Topic ID.</param>
 /// <returns>new query.</returns>
 public static FollowersQuery OfTopic(string topicId)
 {
     return(new FollowersQuery(CommunitiesIds.Topic(topicId)));
 }
예제 #8
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public static ActivitiesQuery InAllTopics()
 {
     return(new ActivitiesQuery(CommunitiesIds.Topics(new System.Collections.Generic.List <string>())));
 }
예제 #9
0
 /// <summary>
 /// Follow topics in the list.
 /// </summary>
 /// <param name="topicIds">List of topic IDs.</param>
 /// <returns>new query</returns>
 public static FollowQuery Topics(params string[] topicIds)
 {
     return(new FollowQuery(CommunitiesIds.Topics(topicIds.ToList())));
 }
예제 #10
0
 /// <summary>
 /// Get activities in a group.
 /// </summary>
 /// <param name="group">Name of the group.</param>
 /// <returns>New query.</returns>
 private static ActivitiesQuery ActivitiesInGroup(string group)
 {
     return(new ActivitiesQuery(CommunitiesIds.Group(group)));
 }
예제 #11
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public static ActivitiesQuery Everywhere()
 {
     return(new ActivitiesQuery(CommunitiesIds.Everywhere()));
 }
예제 #12
0
 /// <summary>
 /// Get activities in user feed.
 /// </summary>
 /// <param name="userId">User id.</param>
 /// <returns>New query.</returns>
 public static ActivitiesQuery FeedOf(UserId userId)
 {
     return(new ActivitiesQuery(CommunitiesIds.User(userId)));
 }
예제 #13
0
 /// <summary>
 /// Get activities in user's timeline.
 /// </summary>
 /// <returns>New query.</returns>
 public static ActivitiesQuery Timeline()
 {
     return(new ActivitiesQuery(CommunitiesIds.App("timeline")));
 }
예제 #14
0
 /// <summary>
 /// Get comments to a certain activity.
 /// </summary>
 /// <param name="activityId">ID of the activity.</param>
 /// <returns>New query.</returns>
 public static ActivitiesQuery CommentsToActivity(string activityId)
 {
     return(new ActivitiesQuery(CommunitiesIds.Activity(activityId)));
 }
예제 #15
0
 /// <summary>
 /// Get announcements for a group.
 /// </summary>
 /// <param name="group"></param>
 /// <returns>new query.</returns>
 private static AnnouncementsQuery InGroup(string group)
 {
     return(new AnnouncementsQuery(CommunitiesIds.Group(group)));
 }
예제 #16
0
 /// <summary>
 /// Follow topics in the list.
 /// </summary>
 /// <param name="topicIds">List of topic IDs.</param>
 /// <returns>new query</returns>
 public static FollowQuery Topics(List <string> topicIds)
 {
     return(new FollowQuery(CommunitiesIds.Topics(topicIds)));
 }
예제 #17
0
 /// <summary>
 /// Get announcements for user feed.
 /// </summary>
 /// <param name="userId"></param>
 /// <returns>new query.</returns>
 public static AnnouncementsQuery InUserFeed(UserId userId)
 {
     return(new AnnouncementsQuery(CommunitiesIds.User(userId)));
 }
예제 #18
0
 /// <summary>
 /// Follow groups in the list.
 /// </summary>
 /// <param name="groupIds">List of group IDs.</param>
 /// <returns>new query.</returns>
 public static FollowQuery Groups(List <string> groupIds)
 {
     return(new FollowQuery(CommunitiesIds.Groups(groupIds)));
 }
예제 #19
0
 FollowersQuery(CommunitiesIds ids)
 {
     this.Ids = ids;
 }
예제 #20
0
 /// <summary>
 /// Follow groups in the list.
 /// </summary>
 /// <param name="groupIds">List of group IDs.</param>
 /// <returns>new query.</returns>
 public static FollowQuery Groups(params string[] groupIds)
 {
     return(new FollowQuery(CommunitiesIds.Groups(groupIds.ToList())));
 }
예제 #21
0
 /// <summary>
 /// Get followers of a group.
 /// </summary>
 /// <param name="groupId">Group ID.</param>
 /// <returns>new query.</returns>
 public static FollowersQuery OfGroup(string groupId)
 {
     return(new FollowersQuery(CommunitiesIds.Group(groupId)));
 }
예제 #22
0
 /// <summary>
 /// Follow users in the list.
 /// </summary>
 /// <param name="userIdList">User IDs.</param>
 /// <returns>new query.</returns>
 public static FollowQuery Users(UserIdList userIdList)
 {
     return(new FollowQuery(CommunitiesIds.Users(userIdList)));
 }
예제 #23
0
 private ReactionsQuery(CommunitiesIds ids) {
     Ids = ids;
 }
예제 #24
0
 private AnnouncementsQuery(CommunitiesIds ids)
 {
     Ids = ids;
 }
예제 #25
0
 /// <summary>
 /// Post comment to the activity.
 /// </summary>
 /// <param name="activityId">Activity ID.</param>
 /// <returns>new target.</returns>
 public static PostActivityTarget Comment(string activityId)
 {
     return(new PostActivityTarget(CommunitiesIds.Activity(activityId)));
 }
예제 #26
0
 /// <summary>
 /// Get announcements for topic.
 /// </summary>
 /// <param name="topic"></param>
 /// <returns>new query.</returns>
 public static AnnouncementsQuery InTopic(string topic)
 {
     return(new AnnouncementsQuery(CommunitiesIds.Topic(topic)));
 }
예제 #27
0
 /// <summary>
 /// Post activity in group.
 /// </summary>
 /// <param name="groupId">Group ID.</param>
 /// <returns>new target.</returns>
 private static PostActivityTarget Group(string groupId)
 {
     return(new PostActivityTarget(CommunitiesIds.Group(groupId)));
 }
예제 #28
0
 /// <summary>
 /// Get announcements for all feeds and user timeline.
 /// </summary>
 /// <returns>new query.</returns>
 public static AnnouncementsQuery Timeline()
 {
     return(new AnnouncementsQuery(CommunitiesIds.App("timeline")));
 }
예제 #29
0
 private PostActivityTarget(CommunitiesIds ids)
 {
     Ids = ids;
 }
예제 #30
0
 private ActivitiesQuery(CommunitiesIds ids)
 {
     Ids = ids;
 }