Class: BrickFTP::RESTfulAPI::CreateNotification
- Inherits:
-
Object
- Object
- BrickFTP::RESTfulAPI::CreateNotification
- Includes:
- Command
- Defined in:
- lib/brick_ftp/restful_api/create_notification.rb
Overview
Create a notification
Params
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
path | string | Folder path for notifications. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. |
user_id | integer | Unique identifier for the user being notified. Each user is given an ID automatically upon creation. You can look up user IDs by using the User resource of this REST API. |
username | string | Username for the user given by user_id. If this value is set during creation and user_id is not set, the user_id is looked up from the username and set. Maximum of 50 characters. |
send_interval | string | The send interval for notifications. Can be one of the following: five_minutes (default), fifteen_minutes, hourly, daily. |
Defined Under Namespace
Classes: Params
Instance Method Summary collapse
-
#call(params) ⇒ BrickFTP::Types::Notification
Creates a new notification on the current site.
Methods included from Command
Instance Method Details
#call(params) ⇒ BrickFTP::Types::Notification
Creates a new notification on the current site.
37 38 39 40 41 |
# File 'lib/brick_ftp/restful_api/create_notification.rb', line 37 def call(params) res = client.post('/api/rest/v1/notifications.json', params.to_h.compact) BrickFTP::Types::Notification.new(**res.symbolize_keys) end |