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 |
---|---|---|
addEditor(emailAddress) |
| Adds the given user to the list of editors for the . |
addEditor(user) |
| Adds the given user to the list of editors for the . |
addEditors(emailAddresses) |
| Adds the given array of users to the list of editors for the . |
addViewer(emailAddress) |
| Adds the given user to the list of viewers for the . |
addViewer(user) |
| Adds the given user to the list of viewers for the . |
addViewers(emailAddresses) |
| Adds the given array of users to the list of viewers for the . |
getEditors() | User[] | Gets the list of editors for this . |
getViewers() | User[] | Gets the list of viewers and commenters for this . |
removeEditor(emailAddress) |
| Removes the given user from the list of editors for the . |
removeEditor(user) |
| Removes the given user from the list of editors for the . |
removeViewer(emailAddress) |
| Removes the given user from the list of viewers and commenters for the . |
removeViewer(user) |
| 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