Modules.Cloud.Events
> Modules.Cloud.Events

Provides methods for accessing ArrowDB events.

Examples

Create Event

This example creates a new event and checks the response.

Cloud.Events.create({
    name: 'Celebration',
    start_time: starttime,
    duration: 3600,
    recurring: 'monthly',
    recurring_count: 5
}, function (e) {
    if (e.success) {
        var event = e.events[0];
        alert('Success:\n' +
            'id: ' + event.id + '\n' +
            'name: ' + event.name + '\n' +
            'updated_at: ' + event.updated_at);
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});

Show an Event

This example retrieves information about a event and checks the response.

Cloud.Events.show({
    event_id: savedEventId
}, function (e) {
    if (e.success) {
        var event = e.events[0];
        alert('Success:\n' +
            'id: ' + event.id + '\n' +
            'name: ' + event.name + '\n' +
            'updated_at: ' + event.updated_at);
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});

Show Occurrences for an Event

This example retrieves information about an event's occurrences and checks the response.

Cloud.Events.showOccurrences({
    event_id: savedEventId
}, function (e) {
    if (e.success) {
        alert('Success:\n' +
            'Count: ' + e.event_occurrences.length);
        for (var i = 0; i < e.event_occurrences.length; i++) {
            var event = e.event_occurrences[i].event;
            alert('id: ' + event.id + '\n' +
                  'name: ' + event.name + '\n' +
                  'start time: ' + event.start_time + '\n' +
                  'updated_at: ' + place.updated_at);
        }
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});

Query Events

This example requests a list of events and checks the response.

Cloud.Events.query(function (e) {
    if (e.success) {
        alert('Success:\n' +
            'Count: ' + e.events.length);
        for (var i = 0; i < e.events.length; i++) {
            var event = e.events[i];
            alert('id: ' + event.id + '\n' +
                  'name: ' + event.name + '\n' +
                  'start time: ' + event.start_time + '\n' +
                  'updated_at: ' + place.updated_at);
        }
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});

Query Event Occurrences

This example retrieves a list of event occurrences and checks the response.

Cloud.Events.queryOccurrences(function (e) {
    if (e.success) {
        alert('Success:\n' +
            'Count: ' + e.event_occurrences.length);
        for (var i = 0; i < e.event_occurrences.length; i++) {
            var event = e.event_occurrences[i].event;
            alert('id: ' + event.id + '\n' +
                  'name: ' + event.name + '\n' +
                  'start time: ' + event.start_time + '\n' +
                  'updated_at: ' + place.updated_at);
        }
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});

Search Events

This example requests a list of events and checks the response.

Cloud.Events.search({
    place_id: savedPlaceId,
    start_time: startTime,
}, function (e) {
    if (e.success) {
        alert('Success:\n' +
            'Count: ' + e.events.length);
        for (var i = 0; i < e.events.length; i++) {
            var event = e.events[i];
            alert('id: ' + event.id + '\n' +
                  'name: ' + event.name + '\n' +
                  'start time: ' + event.start_time + '\n' +
                  'updated_at: ' + place.updated_at);
        }
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});

Search Event Occurrences

This example retrieves a list of event occurrences and checks the response.

Cloud.Events.searchOccurrences({
    place_id: savedPlaceId,
    start_time: startTime
}, function (e) {
    if (e.success) {
        alert('Success:\n' +
            'Count: ' + e.event_occurrences.length);
        for (var i = 0; i < e.event_occurrences.length; i++) {
            var event = e.event_occurrences[i].event;
            alert('id: ' + event.id + '\n' +
                  'name: ' + event.name + '\n' +
                  'start time: ' + event.start_time + '\n' +
                  'updated_at: ' + place.updated_at);
        }
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});

Search for events

This example searches for events and checks the response.

Cloud.Events.search({
    latitude: lat,
    longitude: lon
}, function (e) {
    if (e.success) {
        alert('Success:\n' +
            'Count: ' + e.events.length);
        for (var i = 0; i < e.events.length; i++) {
            var event = e.events[i];
            alert('id: ' + event.id + '\n' +
                  'name: ' + event.name + '\n' +
                  'longitude: ' + event.longitude + '\n' +
                  'latitude: ' + event.latitude + '\n' +
                  'updated_at: ' + event.updated_at);
        }
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});

Update an Event

This example updates a event and checks the response.

Cloud.Events.update({
    event_id: savedEventId,
    name: 'Annual Celebration',
    start_time: starttime,
    duration: 3600,
    recurring: 'monthly',
    recurring_count: 5
}, function (e) {
    if (e.success) {
        var event = e.events[0];
        alert('Success:\n' +
            'id: ' + event.id + '\n' +
            'name: ' + event.name + '\n' +
            'updated_at: ' + event.updated_at);
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});

Remove an Event

This example deletes a event and checks the response.

Cloud.Events.remove({
    event_id: savedEventId
}, function (e) {
    if (e.success) {
        alert('Removed');
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});
  • 0.8
  • 0.8
  • 0.8
Defined By

Properties

apiName : Stringreadonly

The name of the API that this proxy corresponds to.

The name of the API that this proxy corresponds to.

The value of this property is the fully qualified name of the API. For example, Button returns Ti.UI.Button.

  • 3.2.0
  • 3.2.0
  • 3.2.0
Indicates if the proxy will bubble an event to its parent. ...

Indicates if the proxy will bubble an event to its parent.

Some proxies (most commonly views) have a relationship to other proxies, often established by the add() method. For example, for a button added to a window, a click event on the button would bubble up to the window. Other common parents are table sections to their rows, table views to their sections, and scrollable views to their views. Set this property to false to disable the bubbling to the proxy's parent.

Default: true

  • 3.0.0
  • 3.0.0
  • 3.0.0

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks will also be called on the proxy. Proxies that require the activity lifecycle will need this property set to the appropriate containing Window or TabGroup.

  • 3.6.0
Defined By

Methods

Applies the properties to the proxy. ...

Applies the properties to the proxy.

Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that myproxy[key] = value.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Parameters

  • props : Dictionary

    A dictionary of properties to apply.

Returns

  • void
Modules.Cloud.Events
( parameters, callback )
Create a new event. ...

Create a new event.

Requires user login.

See Events: Create Event for the request parameters supported by this method.

Data is returned in the events property of the parameter passed to the callback.

Parameters

  • parameters : Dictionary

    Parameters to send in the request.

  • callback : Callback<CloudEventsResponse>

    Callback function to execute when the method completes.

Returns

  • void
Gets the value of the apiName property. ...

Gets the value of the apiName property.

  • 3.2.0
  • 3.2.0
  • 3.2.0

Returns

  • String
Gets the value of the bubbleParent property. ...

Gets the value of the bubbleParent property.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Returns

  • Boolean
Gets the value of the lifecycleContainer property. ...

Gets the value of the lifecycleContainer property.

  • 3.6.0

Returns

Modules.Cloud.Events
( [parameters], callback )
Retrieve a list of events with sorting and pagination. ...

Retrieve a list of events with sorting and pagination.

See Events: Custom Query Events for the request parameters supported by this method.

Data is returned in the events property of the parameter passed to the callback.

Parameters

  • parameters : Dictionary (optional)

    Parameters to send in the request.

  • callback : Callback<CloudEventsResponse>

    Callback function to execute when the method completes.

Returns

  • void
Modules.Cloud.Events
( [parameters], callback )
Retrieve a list of event occurrences with sorting and pagination. ...

Retrieve a list of event occurrences with sorting and pagination.

See Events: Custom Query Event Occurrences for the request parameters supported by this method.

Data is returned in the event_occurrences property of the parameter passed to the callback.

Parameters

Returns

  • void
Modules.Cloud.Events
( parameters, callback )
Delete a event. ...

Delete a event.

Requires user login.

See Events: Delete an Event for the request parameters supported by this method.

Only the user who created the event can delete it.

Parameters

  • parameters : Dictionary

    Parameters to send in the request.

  • callback : Callback<CloudEventsResponse>

    Callback function to execute when the method completes.

Returns

  • void
Modules.Cloud.Events
( [parameters], callback )
Retrieve a list of event occurrences with full text search. ...

Retrieve a list of event occurrences with full text search.

See Events: Search for Event Occurrences for the request parameters supported by this method.

Data is returned in the event_occurrences property of the parameter passed to the callback.

Parameters

Returns

  • void
Sets the value of the bubbleParent property. ...

Sets the value of the bubbleParent property.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Parameters

  • bubbleParent : Boolean

    New value for the property.

Returns

  • void
Sets the value of the lifecycleContainer property. ...

Sets the value of the lifecycleContainer property.

  • 3.6.0

Parameters

Returns

  • void
Modules.Cloud.Events
( [parameters], callback )
Retrieve a list of events. ...

Retrieve a list of events.

See Events: Show Event for the request parameters supported by this method.

Data is returned in the events property of the parameter passed to the callback.

Parameters

  • parameters : Dictionary (optional)

    Parameters to send in the request.

  • callback : Callback<CloudEventsResponse>

    Callback function to execute when the method completes.

Returns

  • void
Modules.Cloud.Events
( [parameters], callback )
Retrieve a list of event occurrences for a given event. ...

Retrieve a list of event occurrences for a given event.

See Events: Show Event Occurrences for the request parameters supported by this method.

Data is returned in the event_occurrences property of the parameter passed to the callback.

Parameters

Returns

  • void
Modules.Cloud.Events
( parameters, callback )
Update information about a event. ...

Update information about a event.

Requires user login.

See Events: Update an Event for the request parameters supported by this method.

Only the user who created the place can update it.

Data is returned in the events property of the parameter passed to the callback.

Parameters

  • parameters : Dictionary

    Parameters to send in the request.

  • callback : Callback<CloudEventsResponse>

    Callback function to execute when the method completes.

Returns

  • void