Interface PlusOperations

  • All Known Implementing Classes:
    PlusTemplate

    public interface PlusOperations
    Defines operations for searching and retrieving Google+ activities, comments and people. To use "me" as user ID, requires OAuth2 scope https://www.googleapis.com/auth/plus.me , and to get your e-mail address add the scope "email".
    Author:
    Gabriel Axel
    • Method Detail

      • getActivity

        Activity getActivity​(String id)
        Retrieves an activity by its ID.
        Parameters:
        id - activity ID
        Returns:
        the retrieved Activity
      • getActivities

        ActivitiesPage getActivities​(String userId,
                                     String pageToken)
        Retrieves a user's activities.
        Parameters:
        userId - user ID or "me"
        pageToken - page token, or null for first page
        Returns:
        Activity page.
      • getActivities

        ActivitiesPage getActivities​(String userId)
        Retrieves a user's first page of activities
        Parameters:
        userId - user ID or "me"
        Returns:
        Activity page
      • searchPublicActivities

        ActivitiesPage searchPublicActivities​(String query,
                                              String pageToken)
        Searches for public activities matching a text query
        Parameters:
        query - text to search by
        pageToken - page token, or null for first page
        Returns:
        Activity page
      • getComments

        ActivityCommentsPage getComments​(String activityId,
                                         String pageToken)
        Retrieves the comments of an activity.
        Parameters:
        activityId - activity ID
        pageToken - page to retrieve or null for first page
        Returns:
        page of ActivityComment
      • getPerson

        Person getPerson​(String id)
        Retrieves a user's Google profile.
        Parameters:
        id - user ID or "me"
        Returns:
        the retrieved Person
      • getGoogleProfile

        Person getGoogleProfile()
        Retrieves the authenticated user's Google profile.
        Returns:
        the retrieved Person
      • getPeopleInCircles

        PeoplePage getPeopleInCircles​(String id,
                                      String pageToken)
        Retrieves people in a user's circles
        Parameters:
        id - userId or "me"
        pageToken - page to retrieve or null for the first page
        Returns:
        PeoplePage of visible people to the authenticated user
      • searchPeople

        PeoplePage searchPeople​(String query,
                                String pageToken)
        Retrieves people that match the query text.
        Parameters:
        query - text to search by
        pageToken - page to retrieve or null for the first page
        Returns:
        PeoplePage with the matching results
      • getActivityPlusOners

        PeoplePage getActivityPlusOners​(String activityId,
                                        String pageToken)
        Retrieves people who have +1'd an activity.
        Parameters:
        activityId - activity ID
        pageToken - page to retrieve or null for the first page
        Returns:
        PeoplePage of +1'ers
      • getActivityResharers

        PeoplePage getActivityResharers​(String activityId,
                                        String pageToken)
        Retrieves people who have reshared an activity.
        Parameters:
        activityId - activity ID
        pageToken - page to retrieve or null for the first page
        Returns:
        PeoplePage of resharers
      • insertMoment

        Moment insertMoment​(Moment moment)
        Inserts a new moment (app activity)
        Parameters:
        moment - Moment to insert
        Returns:
        the inserted moment
      • getMoments

        MomentsPage getMoments​(String pageToken)
        Retrieves moments (app activities) created by this application
        Parameters:
        pageToken - page to retrieve or null for first page
        Returns:
        MomentsPage with moments created by this application
      • deleteMoment

        void deleteMoment​(String id)
        Deletes a moment (app activity) created by this application
        Parameters:
        id - the moment ID