Deprecated.This class is deprecated and should not be used in new scripts.
An object representing a Google Site.
Methods
Method | Return type | Brief description |
---|---|---|
|
Adds the given user to the list of editors for the
|
|
|
Adds the given user to the list of editors for the
|
|
|
Adds the given array of users to the list of editors for the
|
|
|
Adds the given user to the list of viewers for the
|
|
|
Adds the given user to the list of viewers for the
|
|
|
Adds the given array of users to the list of viewers for the
|
|
User[]
|
Gets the list of editors for this
|
|
User[]
|
Gets the list of viewers and commenters for this
|
|
|
Removes the given user from the list of editors for the
|
|
|
Removes the given user from the list of editors for the
|
|
|
Removes the given user from the list of viewers and commenters for the
|
|
|
Removes the given user from the list of viewers and commenters for the
|
Detailed documentation
addEditor(emailAddress)
Adds the given user to the list of editors for the
. If the user was already
on the list of viewers, this method promotes the user out of the list of viewers. Site
Parameters
Name | Type | Description |
---|---|---|
emailAddress
|
String
|
The email address of the user to add. |
Return
— This Site
, for chaining. Site
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://sites.google.com/feeds
addEditor(user)
Adds the given user to the list of editors for the
. If the user was already
on the list of viewers, this method promotes the user out of the list of viewers. Site
Parameters
Name | Type | Description |
---|---|---|
user
|
User
|
A representation of the user to add. |
Return
— This Site
, for chaining. Site
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://sites.google.com/feeds
addEditors(emailAddresses)
Adds the given array of users to the list of editors for the
. If any of the
users were already on the list of viewers, this method promotes them out of the list of
viewers. Site
Parameters
Name | Type | Description |
---|---|---|
emailAddresses
|
String[]
|
An array of email addresses of the users to add. |
Return
— This Site
, for chaining. Site
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://sites.google.com/feeds
addViewer(emailAddress)
Adds the given user to the list of viewers for the
. If the user was already
on the list of editors, this method has no effect. Site
Parameters
Name | Type | Description |
---|---|---|
emailAddress
|
String
|
The email address of the user to add. |
Return
— This Site
, for chaining. Site
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://sites.google.com/feeds
addViewer(user)
Adds the given user to the list of viewers for the
. If the user was already
on the list of editors, this method has no effect. Site
Parameters
Name | Type | Description |
---|---|---|
user
|
User
|
A representation of the user to add. |
Return
— This Site
, for chaining. Site
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://sites.google.com/feeds
addViewers(emailAddresses)
Adds the given array of users to the list of viewers for the
. If any of the
users were already on the list of editors, this method has no effect for them. Site
Parameters
Name | Type | Description |
---|---|---|
emailAddresses
|
String[]
|
An array of email addresses of the users to add. |
Return
— This Site
, for chaining. Site
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://sites.google.com/feeds
getEditors()
getViewers()
removeEditor(emailAddress)
Removes the given user from the list of editors for the
. This method doesn't
block users from accessing the Site
if they belong to a class of users who have
general access—for example, if the Site
is shared with the user's entire
domain, or if the Site
is in a shared drive that the user can access. Site
For Drive files, this also removes the user from the list of viewers.
Parameters
Name | Type | Description |
---|---|---|
emailAddress
|
String
|
The email address of the user to remove. |
Return
— This Site
, for chaining. Site
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://sites.google.com/feeds
removeEditor(user)
Removes the given user from the list of editors for the
. This method doesn't
block users from accessing the Site
if they belong to a class of users who have
general access—for example, if the Site
is shared with the user's entire
domain, or if the Site
is in a shared drive that the user can access. Site
For Drive files, this also removes the user from the list of viewers.
Parameters
Name | Type | Description |
---|---|---|
user
|
User
|
A representation of the user to remove. |
Return
— This Site
, for chaining. Site
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://sites.google.com/feeds
removeViewer(emailAddress)
Removes the given user from the list of viewers and commenters for the
. This
method has no effect if the user is an editor, not a viewer or commenter. This method also
doesn't block users from accessing the Site
if they belong to a class of users who
have general access—for example, if the Site
is shared with the user's
entire domain, or if the Site
is in a shared drive that the user can access. Site
For Drive files, this also removes the user from the list of editors.
Parameters
Name | Type | Description |
---|---|---|
emailAddress
|
String
|
The email address of the user to remove. |
Return
— This Site
for chaining. Site
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://sites.google.com/feeds
removeViewer(user)
Removes the given user from the list of viewers and commenters for the
. This
method has no effect if the user is an editor, not a viewer. This method also doesn't block
users from accessing the Site
if they belong to a class of users who have general
access—for example, if the Site
is shared with the user's entire domain, or
if the Site
is in a shared drive that the user can access. Site
For Drive files, this also removes the user from the list of editors.
Parameters
Name | Type | Description |
---|---|---|
user
|
User
|
A representation of the user to remove. |
Return
— This Site
for chaining. Site
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://sites.google.com/feeds