google_api_script v0.3.0 GoogleApi.Script.V1.Api.Projects View Source

API calls for all endpoints tagged Projects.

Link to this section Summary

Functions

Creates a new, empty script project with no script files and a base manifest file

Gets the content of the script project, including the code source and metadata for each script file

Get metrics data for scripts, such as number of executions and active users

Updates the content of the specified script project. This content is stored as the HEAD version, and is used when the script is executed as a trigger, in the script editor, in add-on preview mode, or as a web app or Apps Script API in development mode. This clears all the existing files in the project

Creates a new immutable version using the current code, with a unique version number

Link to this section Functions

Link to this function

script_projects_create(connection, optional_params \\ [], opts \\ []) View Source

Creates a new, empty script project with no script files and a base manifest file.

Parameters

  • connection (GoogleApi.Script.V1.Connection): Connection to server
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :body (CreateProjectRequest):

Returns

{:ok, %GoogleApi.Script.V1.Model.Project{}} on success {:error, info} on failure

Link to this function

script_projects_deployments_create(connection, script_id, optional_params \\ [], opts \\ []) View Source

Creates a deployment of an Apps Script project.

Parameters

  • connection (GoogleApi.Script.V1.Connection): Connection to server
  • script_id (String.t): The script project's Drive ID.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :body (DeploymentConfig):

Returns

{:ok, %GoogleApi.Script.V1.Model.Deployment{}} on success {:error, info} on failure

Link to this function

script_projects_deployments_delete(connection, script_id, deployment_id, optional_params \\ [], opts \\ []) View Source

Deletes a deployment of an Apps Script project.

Parameters

  • connection (GoogleApi.Script.V1.Connection): Connection to server
  • script_id (String.t): The script project's Drive ID.
  • deployment_id (String.t): The deployment ID to be undeployed.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").

Returns

{:ok, %GoogleApi.Script.V1.Model.Empty{}} on success {:error, info} on failure

Link to this function

script_projects_deployments_get(connection, script_id, deployment_id, optional_params \\ [], opts \\ []) View Source

Gets a deployment of an Apps Script project.

Parameters

  • connection (GoogleApi.Script.V1.Connection): Connection to server
  • script_id (String.t): The script project's Drive ID.
  • deployment_id (String.t): The deployment ID.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").

Returns

{:ok, %GoogleApi.Script.V1.Model.Deployment{}} on success {:error, info} on failure

Link to this function

script_projects_deployments_list(connection, script_id, optional_params \\ [], opts \\ []) View Source

Lists the deployments of an Apps Script project.

Parameters

  • connection (GoogleApi.Script.V1.Connection): Connection to server
  • script_id (String.t): The script project's Drive ID.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :pageSize (integer()): The maximum number of deployments on each returned page. Defaults to 50.
    • :pageToken (String.t): The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response.

Returns

{:ok, %GoogleApi.Script.V1.Model.ListDeploymentsResponse{}} on success {:error, info} on failure

Link to this function

script_projects_deployments_update(connection, script_id, deployment_id, optional_params \\ [], opts \\ []) View Source

Updates a deployment of an Apps Script project.

Parameters

  • connection (GoogleApi.Script.V1.Connection): Connection to server
  • script_id (String.t): The script project's Drive ID.
  • deployment_id (String.t): The deployment ID for this deployment.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :body (UpdateDeploymentRequest):

Returns

{:ok, %GoogleApi.Script.V1.Model.Deployment{}} on success {:error, info} on failure

Link to this function

script_projects_get(connection, script_id, optional_params \\ [], opts \\ []) View Source

Gets a script project's metadata.

Parameters

  • connection (GoogleApi.Script.V1.Connection): Connection to server
  • script_id (String.t): The script project's Drive ID.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").

Returns

{:ok, %GoogleApi.Script.V1.Model.Project{}} on success {:error, info} on failure

Link to this function

script_projects_get_content(connection, script_id, optional_params \\ [], opts \\ []) View Source

Gets the content of the script project, including the code source and metadata for each script file.

Parameters

  • connection (GoogleApi.Script.V1.Connection): Connection to server
  • script_id (String.t): The script project's Drive ID.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :versionNumber (integer()): The version number of the project to retrieve. If not provided, the project's HEAD version is returned.

Returns

{:ok, %GoogleApi.Script.V1.Model.Content{}} on success {:error, info} on failure

Link to this function

script_projects_get_metrics(connection, script_id, optional_params \\ [], opts \\ []) View Source

Get metrics data for scripts, such as number of executions and active users.

Parameters

  • connection (GoogleApi.Script.V1.Connection): Connection to server
  • script_id (String.t): Required field indicating the script to get metrics for.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :metricsFilter.deploymentId (String.t): Optional field indicating a specific deployment to retrieve metrics from.
    • :metricsGranularity (String.t): Required field indicating what granularity of metrics are returned.

Returns

{:ok, %GoogleApi.Script.V1.Model.Metrics{}} on success {:error, info} on failure

Link to this function

script_projects_update_content(connection, script_id, optional_params \\ [], opts \\ []) View Source

Updates the content of the specified script project. This content is stored as the HEAD version, and is used when the script is executed as a trigger, in the script editor, in add-on preview mode, or as a web app or Apps Script API in development mode. This clears all the existing files in the project.

Parameters

  • connection (GoogleApi.Script.V1.Connection): Connection to server
  • script_id (String.t): The script project's Drive ID.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :body (Content):

Returns

{:ok, %GoogleApi.Script.V1.Model.Content{}} on success {:error, info} on failure

Link to this function

script_projects_versions_create(connection, script_id, optional_params \\ [], opts \\ []) View Source

Creates a new immutable version using the current code, with a unique version number.

Parameters

  • connection (GoogleApi.Script.V1.Connection): Connection to server
  • script_id (String.t): The script project's Drive ID.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :body (Version):

Returns

{:ok, %GoogleApi.Script.V1.Model.Version{}} on success {:error, info} on failure

Link to this function

script_projects_versions_get(connection, script_id, version_number, optional_params \\ [], opts \\ []) View Source

Gets a version of a script project.

Parameters

  • connection (GoogleApi.Script.V1.Connection): Connection to server
  • script_id (String.t): The script project's Drive ID.
  • version_number (integer()): The version number.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").

Returns

{:ok, %GoogleApi.Script.V1.Model.Version{}} on success {:error, info} on failure

Link to this function

script_projects_versions_list(connection, script_id, optional_params \\ [], opts \\ []) View Source

List the versions of a script project.

Parameters

  • connection (GoogleApi.Script.V1.Connection): Connection to server
  • script_id (String.t): The script project's Drive ID.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :pageSize (integer()): The maximum number of versions on each returned page. Defaults to 50.
    • :pageToken (String.t): The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response.

Returns

{:ok, %GoogleApi.Script.V1.Model.ListVersionsResponse{}} on success {:error, info} on failure