Provides methods for accessing ArrowDB events.
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)));
}
});
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)));
}
});
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)));
}
});
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)));
}
});
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)));
}
});
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)));
}
});
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)));
}
});
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)));
}
});
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)));
}
});
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)));
}
});
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
.
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
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.
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.
A dictionary of properties to apply.
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 to send in the request.
Callback function to execute when the method completes.
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 to send in the request.
Callback function to execute when the method completes.
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 to send in the request.
Callback function to execute when the method completes.
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 to send in the request.
Callback function to execute when the method completes.
Retrieve a list of events with full text search.
See Events: Search for Events for the request parameters supported by this method.
Data is returned in the events
property of the parameter passed to the callback.
Parameters to send in the request.
Callback function to execute when the method completes.
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 to send in the request.
Callback function to execute when the method completes.
Sets the value of the bubbleParent property.
New value for the property.
Sets the value of the lifecycleContainer property.
New value for the property.
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 to send in the request.
Callback function to execute when the method completes.
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 to send in the request.
Callback function to execute when the method completes.
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 to send in the request.
Callback function to execute when the method completes.