Uploaded image for project: 'Documentation'
  1. Documentation
  2. TIDOC-554

API Doc: Ti.cloud code examples containing invalid code

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: APIDoc
    • Labels:

      Description

      Most or all of the code examples for Ti.Cloud are missing a closing parenthesis and semicolon at the same location.

      For example, the sample code for create user at http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.Cloud.Users

      reads:

      Cloud.Users.create({
          email: 'test@mycompany.com',
          first_name: 'test_firstname',
          last_name: 'test_lastname',
          password: 'test_password',
          password_confirmation: 'test_password'
      }, function (e) {
          if (e.success) {
              var user = e.users[0];
              alert('Success:\\n' +
                  'id: ' + user.id + '\\n' +
                  'first name: ' + user.first_name + '\\n' +
                  'last name: ' + user.last_name);
          } else {
              alert('Error:\\n' +
                  ((e.error && e.message) || JSON.stringify(e))
          }
      });
      

      The third line from bottom should read:

       ((e.error && e.message) || JSON.stringify(e)));
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                aevans Arthur Evans
                Reporter:
                adampax Adam Paxton
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration