Interface PlusOperations
-
- All Known Implementing Classes:
PlusTemplate
public interface PlusOperationsDefines 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ActivityQueryBuilderactivityQuery()Creates anActivityQueryBuilder.voiddeleteMoment(String id)Deletes a moment (app activity) created by this applicationActivitiesPagegetActivities(String userId)Retrieves a user's first page of activitiesActivitiesPagegetActivities(String userId, String pageToken)Retrieves a user's activities.ActivitygetActivity(String id)Retrieves an activity by its ID.PeoplePagegetActivityPlusOners(String activityId, String pageToken)Retrieves people who have +1'd an activity.PeoplePagegetActivityResharers(String activityId, String pageToken)Retrieves people who have reshared an activity.ActivityCommentgetComment(String id)Retrieves a comment by its ID.ActivityCommentsPagegetComments(String activityId, String pageToken)Retrieves the comments of an activity.PersongetGoogleProfile()Retrieves the authenticated user's Google profile.MomentsPagegetMoments(String pageToken)Retrieves moments (app activities) created by this applicationPeoplePagegetPeopleInCircles(String id, String pageToken)Retrieves people in a user's circlesPersongetPerson(String id)Retrieves a user's Google profile.MomentinsertMoment(Moment moment)Inserts a new moment (app activity)MomentQueryBuildermomentQuery()Creates a newMomentQueryBuilderPersonQueryBuilderpersonQuery()Creates aPersonQueryBuilder.PeoplePagesearchPeople(String query, String pageToken)Retrieves people that match the query text.ActivitiesPagesearchPublicActivities(String query, String pageToken)Searches for public activities matching a text query
-
-
-
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:
Activitypage.
-
getActivities
ActivitiesPage getActivities(String userId)
Retrieves a user's first page of activities- Parameters:
userId- user ID or "me"- Returns:
Activitypage
-
searchPublicActivities
ActivitiesPage searchPublicActivities(String query, String pageToken)
Searches for public activities matching a text query- Parameters:
query- text to search bypageToken- page token, or null for first page- Returns:
Activitypage
-
activityQuery
ActivityQueryBuilder activityQuery()
Creates anActivityQueryBuilder.- Returns:
- a new
ActivityQueryBuilder
-
getComment
ActivityComment getComment(String id)
Retrieves a comment by its ID.- Parameters:
id- comment ID- Returns:
- the retrieved
ActivityComment
-
getComments
ActivityCommentsPage getComments(String activityId, String pageToken)
Retrieves the comments of an activity.- Parameters:
activityId- activity IDpageToken- 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:
PeoplePageof 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 bypageToken- page to retrieve or null for the first page- Returns:
PeoplePagewith the matching results
-
getActivityPlusOners
PeoplePage getActivityPlusOners(String activityId, String pageToken)
Retrieves people who have +1'd an activity.- Parameters:
activityId- activity IDpageToken- page to retrieve or null for the first page- Returns:
PeoplePageof +1'ers
-
getActivityResharers
PeoplePage getActivityResharers(String activityId, String pageToken)
Retrieves people who have reshared an activity.- Parameters:
activityId- activity IDpageToken- page to retrieve or null for the first page- Returns:
PeoplePageof resharers
-
personQuery
PersonQueryBuilder personQuery()
Creates aPersonQueryBuilder.- Returns:
- a new
PersonQueryBuilder
-
insertMoment
Moment insertMoment(Moment moment)
Inserts a new moment (app activity)- Parameters:
moment- Moment to insert- Returns:
- the inserted moment
-
momentQuery
MomentQueryBuilder momentQuery()
Creates a newMomentQueryBuilder- Returns:
- a new
MomentQueryBuilder
-
getMoments
MomentsPage getMoments(String pageToken)
Retrieves moments (app activities) created by this application- Parameters:
pageToken- page to retrieve or null for first page- Returns:
MomentsPagewith moments created by this application
-
deleteMoment
void deleteMoment(String id)
Deletes a moment (app activity) created by this application- Parameters:
id- the moment ID
-
-