# Apps Script API . projects . versions

## Instance Methods

Close httplib2 connections.

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

Gets a version of a script project.

List the versions of a script project.

Retrieves the next page of results.

### Method Details

`close()`

    Close httplib2 connections.

`create(scriptId, body=None, x__xgafv=None)`

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

    Args:
      scriptId: string, The script project's Drive ID. (required)
      body: object, The request body.
        The object takes the form of:

    { # A resource representing a script project version. A version is a "snapshot" of a script project and is similar to a read-only branched release. When creating deployments, the version to use must be specified.
      "createTime": "A String", # When the version was created.
      "description": "A String", # The description for this version.
      "scriptId": "A String", # The script project's Drive ID.
      "versionNumber": 42, # The incremental ID that is created by Apps Script when a version is created. This is system assigned number and is immutable once created.
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A resource representing a script project version. A version is a "snapshot" of a script project and is similar to a read-only branched release. When creating deployments, the version to use must be specified.
      "createTime": "A String", # When the version was created.
      "description": "A String", # The description for this version.
      "scriptId": "A String", # The script project's Drive ID.
      "versionNumber": 42, # The incremental ID that is created by Apps Script when a version is created. This is system assigned number and is immutable once created.
    }

`get(scriptId, versionNumber, x__xgafv=None)`

    Gets a version of a script project.

    Args:
      scriptId: string, The script project's Drive ID. (required)
      versionNumber: integer, The version number. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A resource representing a script project version. A version is a "snapshot" of a script project and is similar to a read-only branched release. When creating deployments, the version to use must be specified.
      "createTime": "A String", # When the version was created.
      "description": "A String", # The description for this version.
      "scriptId": "A String", # The script project's Drive ID.
      "versionNumber": 42, # The incremental ID that is created by Apps Script when a version is created. This is system assigned number and is immutable once created.
    }

`list(scriptId, pageSize=None, pageToken=None, x__xgafv=None)`

    List the versions of a script project.

    Args:
      scriptId: string, The script project's Drive ID. (required)
      pageSize: integer, The maximum number of versions on each returned page. Defaults to 50.
      pageToken: string, 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.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Response with the list of the versions for the specified script project.
      "nextPageToken": "A String", # The token use to fetch the next page of records. if not exist in the response, that means no more versions to list.
      "versions": [ # The list of versions.
        { # A resource representing a script project version. A version is a "snapshot" of a script project and is similar to a read-only branched release. When creating deployments, the version to use must be specified.
          "createTime": "A String", # When the version was created.
          "description": "A String", # The description for this version.
          "scriptId": "A String", # The script project's Drive ID.
          "versionNumber": 42, # The incremental ID that is created by Apps Script when a version is created. This is system assigned number and is immutable once created.
        },
      ],
    }

`list_next(previous_request, previous_response)`

    Retrieves the next page of results.

    Args:
      previous_request: The request for the previous page. (required)
      previous_response: The response from the request for the previous page. (required)

    Returns:
      A request object that you can call 'execute()' on to request the next
      page. Returns None if there are no more items in the collection.