google_api_classroom v0.4.0 GoogleApi.Classroom.V1.Api.Registrations View Source

API calls for all endpoints tagged Registrations.

Link to this section Summary

Functions

Creates a `Registration`, causing Classroom to start sending notifications from the provided `feed` to the destination provided in `cloudPubSubTopic`. Returns the created `Registration`. Currently, this will be the same as the argument, but with server-assigned fields such as `expiry_time` and `id` filled in. Note that any value specified for the `expiry_time` or `id` fields will be ignored. While Classroom may validate the `cloudPubSubTopic` and return errors on a best effort basis, it is the caller's responsibility to ensure that it exists and that Classroom has permission to publish to it. This method may return the following error codes: `PERMISSION_DENIED` if: the authenticated user does not have permission to receive notifications from the requested field; or the credential provided does not include the appropriate scope for the requested feed. another access error is encountered. `INVALID_ARGUMENT` if: no `cloudPubsubTopic` is specified, or the specified `cloudPubsubTopic` is not valid; or no `feed` is specified, or the specified `feed` is not valid. `NOT_FOUND` if: the specified `feed` cannot be located, or the requesting user does not have permission to determine whether or not it exists; or the specified `cloudPubsubTopic` cannot be located, or Classroom has not been granted permission to publish to it.

Deletes a `Registration`, causing Classroom to stop sending notifications for that `Registration`.

Link to this section Functions

Link to this function

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

Creates a `Registration`, causing Classroom to start sending notifications from the provided `feed` to the destination provided in `cloudPubSubTopic`. Returns the created `Registration`. Currently, this will be the same as the argument, but with server-assigned fields such as `expiry_time` and `id` filled in. Note that any value specified for the `expiry_time` or `id` fields will be ignored. While Classroom may validate the `cloudPubSubTopic` and return errors on a best effort basis, it is the caller's responsibility to ensure that it exists and that Classroom has permission to publish to it. This method may return the following error codes: `PERMISSION_DENIED` if: the authenticated user does not have permission to receive notifications from the requested field; or the credential provided does not include the appropriate scope for the requested feed. another access error is encountered. `INVALID_ARGUMENT` if: no `cloudPubsubTopic` is specified, or the specified `cloudPubsubTopic` is not valid; or no `feed` is specified, or the specified `feed` is not valid. `NOT_FOUND` if: the specified `feed` cannot be located, or the requesting user does not have permission to determine whether or not it exists; or the specified `cloudPubsubTopic` cannot be located, or Classroom has not been granted permission to publish to it.

Parameters

  • connection (GoogleApi.Classroom.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 (Registration):

Returns

{:ok, %GoogleApi.Classroom.V1.Model.Registration{}} on success {:error, info} on failure

Link to this function

classroom_registrations_delete(connection, registration_id, optional_params \\ [], opts \\ []) View Source

Deletes a `Registration`, causing Classroom to stop sending notifications for that `Registration`.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • registration_id (String.t): The `registration_id` of the `Registration` to be deleted.
  • 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.Classroom.V1.Model.Empty{}} on success {:error, info} on failure