Beispiel #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]
     });
 }
Beispiel #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)));
 }
Beispiel #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())));
 }
Beispiel #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)));
 }
Beispiel #8
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public static ActivitiesQuery InAllTopics()
 {
     return(new ActivitiesQuery(CommunitiesIds.Topics(new System.Collections.Generic.List <string>())));
 }
Beispiel #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())));
 }
Beispiel #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)));
 }
Beispiel #11
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public static ActivitiesQuery Everywhere()
 {
     return(new ActivitiesQuery(CommunitiesIds.Everywhere()));
 }
Beispiel #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)));
 }
Beispiel #13
0
 /// <summary>
 /// Get activities in user's timeline.
 /// </summary>
 /// <returns>New query.</returns>
 public static ActivitiesQuery Timeline()
 {
     return(new ActivitiesQuery(CommunitiesIds.App("timeline")));
 }
Beispiel #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)));
 }
Beispiel #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)));
 }
Beispiel #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)));
 }
Beispiel #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)));
 }
Beispiel #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)));
 }
 FollowersQuery(CommunitiesIds ids)
 {
     this.Ids = ids;
 }
Beispiel #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())));
 }
 /// <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)));
 }
Beispiel #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)));
 }
 private ReactionsQuery(CommunitiesIds ids) {
     Ids = ids;
 }
Beispiel #24
0
 private AnnouncementsQuery(CommunitiesIds ids)
 {
     Ids = ids;
 }
Beispiel #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)));
 }
Beispiel #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)));
 }
Beispiel #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)));
 }
Beispiel #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")));
 }
Beispiel #29
0
 private PostActivityTarget(CommunitiesIds ids)
 {
     Ids = ids;
 }
Beispiel #30
0
 private ActivitiesQuery(CommunitiesIds ids)
 {
     Ids = ids;
 }