Gleanex.Client.Announcements (Gleanex v0.1.0)

Copy Markdown View Source

Provides API endpoints related to announcements

Summary

Functions

createannouncement(body, opts \\ [])

@spec createannouncement(
  body :: Gleanex.Client.CreateAnnouncementRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Client.Announcement.t()} | {:error, Gleanex.Error.t()}

Create Announcement

Create a textual announcement visible to some set of users based on department and location.

Options

  • locale: The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.

Request Body

Content Types: application/json

Announcement content

deleteannouncement(body, opts \\ [])

@spec deleteannouncement(
  body :: Gleanex.Client.DeleteAnnouncementRequest.t(),
  opts :: keyword()
) ::
  :ok | {:error, Gleanex.Error.t()}

Delete Announcement

Delete an existing user-generated announcement.

Options

  • locale: The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.

Request Body

Content Types: application/json

Delete announcement request

updateannouncement(body, opts \\ [])

@spec updateannouncement(
  body :: Gleanex.Client.UpdateAnnouncementRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Client.Announcement.t()} | {:error, Gleanex.Error.t()}

Update Announcement

Update a textual announcement visible to some set of users based on department and location.

Options

  • locale: The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.

Request Body

Content Types: application/json

Announcement content. Id need to be specified for the announcement.