Bundle Notifications

A BundleNotification is an E-Mail sent out to users when certain actions are performed on or within a shared set of files and folders.

SDK Method

BundleNotification.List();

Return Object

FilesList<BundleNotification>

Authorization Requirement

Available to all authenticated keys or sessions.

Method Arguments

ArgumentDescription
user_id
int64
User ID. Provide a value of 0 to operate the current session's user.
bundle_id
int64
Bundle ID

Additional Arguments

Example Request

using FilesCom.Models;

var parameters = new Dictionary<string, object>();
parameters.Add("user_id", (Int64?) 1);

try
{
    var bundleNotificationIterator = BundleNotification.List(parameters);
    foreach (BundleNotification bundleNotification in bundleNotificationIterator.ListAutoPaging()) {
        // Operate on bundleNotification
    }
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

SDK Method

BundleNotification.Find();

Return Object

BundleNotification

Authorization Requirement

Available to all authenticated keys or sessions.

Method Arguments

ArgumentDescription
id
int64
Required
Bundle Notification ID.

Example Request

using FilesCom.Models;

try
{
    var bundleNotification = await BundleNotification.Find(id);
    // Operate on bundleNotification
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

SDK Method

BundleNotification.Create();

Return Object

BundleNotification

Authorization Requirement

Available to all authenticated keys or sessions.

Method Arguments

ArgumentDefaultDescription
user_id
int64
User ID. Provide a value of 0 to operate the current session's user.
bundle_id
int64
Required
Bundle ID to notify on
notify_user_id
int64
The id of the user to notify.
notify_on_registration
boolean
falseTriggers bundle notification when a registration action occurs for it.
notify_on_upload
boolean
falseTriggers bundle notification when a upload action occurs for it.

Example Request

using FilesCom.Models;

var parameters = new Dictionary<string, object>();
parameters.Add("bundle_id", (Int64?) 1);

try
{
    var bundleNotification = await BundleNotification.Create(parameters);
    // Operate on bundleNotification
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

SDK Method

bundleNotification.Update();

Return Object

BundleNotification

Authorization Requirement

Available to all authenticated keys or sessions.

Method Arguments

ArgumentDescription
notify_on_registration
boolean
Triggers bundle notification when a registration action occurs for it.
notify_on_upload
boolean
Triggers bundle notification when a upload action occurs for it.

Example Request

using FilesCom.Models;

var parameters = new Dictionary<string, object>();
parameters.Add("notify_on_registration", true);

try
{
    // Find the bundleNotification object by its id.
    var bundleNotification = await BundleNotification.Find(id);
    await bundleNotification.Update(parameters);
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

SDK Method

bundleNotification.Delete();

Return Object

No return value.

Authorization Requirement

Available to all authenticated keys or sessions.

Example Request

using FilesCom.Models;

try
{
    // Find the bundleNotification object by its id.
    var bundleNotification = await BundleNotification.Find(id);
    await bundleNotification.Delete();
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

The BundleNotification Object

Some of the methods above return a BundleNotification object. The attributes of this object are listed below.

AttributeDescription
bundle_id
int64
Bundle ID to notify on
id
int64
Bundle Notification ID
notify_on_registration
boolean
Triggers bundle notification when a registration action occurs for it.
notify_on_upload
boolean
Triggers bundle notification when a upload action occurs for it.
notify_current_user
boolean
Is the current user the user to notify?
notify_user_id
int64
The id of the user to notify.
workspace_id
int64
Workspace ID. 0 means the default workspace.