0

manifest.json "private"

Hi

Is manifest.json "private" accessible within Zendesk App

I tried this.settings.private and this.app.private, but JSHint fails as follows:

Upload Error

         JSHint error(s): L129: Expected an identifier and instead saw 'private' (a reserved word)

Thx

  • Jeff

7 comments

  • 0

    Note: I would like to use the manifest.json "private" to determine if my Lotus App is within development mode (debug and tracing) or production mode.

    • Jeff
  • 0

    My guess is that what you have might be valid JavaScript, but not valid JSON. In JSON, all keys must be Strings. "private": false is currently required for all apps, and means that the app is only available to your account.

  • 0

    Hi James

    Sorry, but I was requesting if it is possible to get the value assigned (true or false) to manifest.json's key "private" from within a function() implementation in app.js?

    Thx

    • Jeff
  • 0

    Can you describe your use case? I'm not against making that available to the app. We simply try to keep the API as uncluttered as possible.

  • 0

    As stated above, "private" is one way of stating if true then Lotus app is in Development mode, else live Production mode. Thereby

    1. For ajax calls, switching url between an integration API and production API
    2. For services.notify calls, turning on and off code tracing details

    -- Jeff

  • 0

    "Private" wasn't meant to have the meaning you're giving it. It's supposed to mean "this app is only available to my account." It's possible that those two are the same for you: while it's in development, it's only available to your account; then, when you publish it, it becomes the "production" version.

    We've actually come up against this same use case ourselves in developing some of the apps you see in the app store. The problem is that once it's published, your development version would continue to act like a production version (e.g. high a production API on your servers).

    My suggestion is to use local variables in your app. I've posted a tip in the forum you might want to check out.

  • 0

    Thx, just curious

    • Jeff
Please sign in to leave a comment.