Alarm API docs have duplicate examples

Bug #1295336 reported by Kyle Nitzsche
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity-webapps-qml
Triaged
Medium
Unassigned

Bug Description

the Alarm() object example is the same as the AlarmApi() object example:

* http://developer.ubuntu.com/api/html5/sdk-14.04/AlarmApi.Alarm/
* http://developer.ubuntu.com/api/html5/sdk-14.04/AlarmApi.AlarmApi/

And in source:

  9 /**
 10 * An Alarm.
 11
 12 * @class Alarm
 13 * @constructor
 14 * @example
 15
 16 var date = new Date();
 17 <set a valid date in the future>
 18
 19 var api = external.getUnityObject('1.0');
 20 api.AlarmApi.api.createAndSaveAlarmFor(
 21 date,
 22 api.AlarmApi.AlarmType.OneTime,
 23 api.AlarmApi.AlarmDayOfWeek.AutoDetect,
 24 "alarm triggered",
 25 function(errorid) {
 26 console.log(api.AlarmApi.api.errorToMessage(errorid));
 27 });
 28 */

254 /**
255 * The AlarmApi object
256
257 * @class AlarmApi
258 * @constructor
259 * @example
260
261 var date = new Date();
262 <set a valid date in the future>
263
264 var api = external.getUnityObject('1.0');
265 api.AlarmApi.api.createAndSaveAlarmFor(
266 date,
267 api.AlarmApi.AlarmType.OneTime,
268 api.AlarmApi.AlarmDayOfWeek.AutoDetect,
269 "alarm triggered",
270 function(errorid) {
271 console.log(api.AlarmApi.api.errorToMessage(errorid));
272 });
273 */
274 return {

Tags: docs
summary: - Alarm API docs have duplicaticate examples
+ Alarm API docs have duplicate examples
description: updated
Changed in unity-webapps-qml:
importance: Undecided → Medium
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.