From 7c66eb3fc68d5cdc71d9858e7b289fa68c583aa9 Mon Sep 17 00:00:00 2001 From: Adam Szczerbiak Date: Tue, 26 Jan 2016 13:03:25 +0100 Subject: [PATCH] [Contact] Added examples of methods' usage This change reinforces API documentation with additional examples of methods' usage, as specified in JIRA task #914. Change-Id: I6d179cab740566323bb9052025519f7f42e80cc1 Signed-off-by: Adam Szczerbiak --- .../html/device_api/mobile/tizen/contact.html | 216 ++++++++++----------- 1 file changed, 107 insertions(+), 109 deletions(-) diff --git a/org.tizen.web.apireference/html/device_api/mobile/tizen/contact.html b/org.tizen.web.apireference/html/device_api/mobile/tizen/contact.html index 45394b6..9c73eaf 100644 --- a/org.tizen.web.apireference/html/device_api/mobile/tizen/contact.html +++ b/org.tizen.web.apireference/html/device_api/mobile/tizen/contact.html @@ -3139,7 +3139,7 @@ to an unknown error.

Code example:

  var addressbook;
 
   // Gets the address book.
-  var addressbook = tizen.contact.getDefaultAddressBook();
+        var addressbook = tizen.contact.getDefaultAddressBook();
 
   try {
     groups = addressbook.getGroups();
@@ -3285,17 +3285,17 @@ to an unknown error.
 
         
 
-

Code example:

  var addressbook;
+

Code example:

 var addressbook;
 
-  // Gets the default address book.
-  var addressbook = tizen.contact.getDefaultAddressBook();
+ // Gets the default address book.
+ var addressbook = tizen.contact.getDefaultAddressBook();
 
-  try {
-    groups = addressbook.getGroups();
-    console.log('Number of groups is ' + groups.length);
-  } catch (err) {
-    console.log( 'The following error occurred while finding: ' +  err.name);
-  }
+ try {
+   groups = addressbook.getGroups();
+   console.log('Number of groups is ' + groups.length);
+ } catch (err) {
+   console.log( 'The following error occurred while finding: ' +  err.name);
+ }
  
@@ -3460,16 +3460,16 @@ The contact, this value is indicating, is used to show detailed information of t
  • readonly long usageCount
    -The number of contact usage. -
    + The number of contact usage. +
    -

    +

    usage type refers to contacts_usage_type_e of native API -

    -
    +

    +

    -Since: -3.0 + Since: + 3.0

  • @@ -4074,23 +4074,22 @@ By default, this attribute is set to an empty array.
  • ContactExtension[] -extensions
    -The extended data of the contact. -
    + extensions
    + The extended data of the contact. +
    -

    +

    By default, this attribute is set to an empty array. -

    -
    +

    +

    -Since: -3.0 -

    + Since: + 3.0 +

    -

    Code example:

    -var contactInit = {};
    -			var extension = new tizen.ContactExtension({ data1: 20, data2: 'Place of birth: Elbląg' });
    -			contactInit.extensions = [extension];
    +

    Code example:

      var contactInit = {};
    +  var extension =  new tizen.ContactExtension({ data1: 20, data2: 'Place of birth: Elbląg' });
    +  contactInit.extensions = [extension];
      
  • @@ -5824,9 +5823,9 @@ By default, this attribute is initialized to null.

    2.21. ContactExtensionInit

    -The ContactExtensionInit dictionary defines the properties of a ContactExtension to pass to the ContactExtension constructor. -
    -
     dictionary ContactExtensionInit
    + The ContactExtensionInit dictionary defines the properties of a ContactExtension to pass to the ContactExtension constructor.
    +          
    +
      dictionary ContactExtensionInit
       {
         long data1;
         DOMString data2;
    @@ -5842,21 +5841,21 @@ The ContactExtensionInit dictionary defines the properties of a ContactExtension
         DOMString data12;
       };

    -Since: -3.0 -

    + Since: + 3.0 +

    -

    +

    See ContactExtension interface for more information about the members. -

    -
    +

    +

    2.22. ContactExtension

    -The ContactExtension interface contains the extended data of the contact. -
    -
     [Constructor(optional ContactExtensionInit? extensionInitDict)]
    + The ContactExtension interface contains the extended data of the contact.
    +          
    +
      [Constructor(optional ContactExtensionInit? extensionInitDict)]
       interface ContactExtension
       {
         attribute long data1;
    @@ -5884,14 +5883,14 @@ The ContactExtension interface contains the extended data of the contact.
         attribute DOMString? data12;
       };

    -Since: -3.0 -

    + Since: + 3.0 +

    -

    +

    See code example below. -

    -
    +

    +

    Code example:

     var name = new tizen.ContactName({ firstName: 'Anna' });
     
    @@ -5914,111 +5913,111 @@ See code example below.
     
    • long data1
      -The extended data of a contact. -
      + The extended data of a contact. +

    -Since: -3.0 -

    + Since: + 3.0 +

  • DOMString data2 [nullable]
    -The extended data of a contact. -
    + The extended data of a contact. +

    -Since: -3.0 -

    + Since: + 3.0 +

  • DOMString data3 [nullable]
    -The extended data of a contact. -
    + The extended data of a contact. +

    -Since: -3.0 -

    + Since: + 3.0 +

  • DOMString data4 [nullable]
    -The extended data of a contact. -
    + The extended data of a contact. +

    -Since: -3.0 -

    + Since: + 3.0 +

  • DOMString data5 [nullable]
    -The extended data of a contact. -
    + The extended data of a contact. +

    -Since: -3.0 -

    + Since: + 3.0 +

  • DOMString data6 [nullable]
    -The extended data of a contact. -
    + The extended data of a contact. +

    -Since: -3.0 -

    + Since: + 3.0 +

  • DOMString data7 [nullable]
    -The extended data of a contact. -
    + The extended data of a contact. +

    -Since: -3.0 -

    + Since: + 3.0 +

  • DOMString data8 [nullable]
    -The extended data of a contact. -
    + The extended data of a contact. +

    -Since: -3.0 -

    + Since: + 3.0 +

  • DOMString data9 [nullable]
    -The extended data of a contact. -
    + The extended data of a contact. +

    -Since: -3.0 -

    + Since: + 3.0 +

  • DOMString data10 [nullable]
    -The extended data of a contact. -
    + The extended data of a contact. +

    -Since: -3.0 -

    + Since: + 3.0 +

  • DOMString data11 [nullable]
    -The extended data of a contact. -
    + The extended data of a contact. +

    -Since: -3.0 -

    + Since: + 3.0 +

  • DOMString data12 [nullable]
    -The extended data of a contact. -
    + The extended data of a contact. +

    -Since: -3.0 -

    + Since: + 3.0 +

  • @@ -6791,7 +6790,6 @@ list change occurs (person addition/update/deletion). Contact clone() raises(WebAPIException); }; - [Constructor(AddressBookId addressBookId, ContactId contactId)] interface ContactRef { attribute AddressBookId addressBookId; -- 2.7.4