Forums/Community/Zendesk Apps

manifest.json "private"

Jeff Tanner
posted this on September 14, 2012 10:37

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

 

Comments

User photo
Jeff Tanner
tangocard

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

September 14, 2012 10:39
User photo
James Rosen
Zendesk

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.

September 14, 2012 23:52
User photo
Jeff Tanner
tangocard

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

September 15, 2012 12:20
User photo
James Rosen
Zendesk

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.

September 15, 2012 21:00
User photo
Jeff Tanner
tangocard

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

September 16, 2012 07:45
User photo
James Rosen
Zendesk

"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.

September 16, 2012 08:42
User photo
Jeff Tanner
tangocard

Thx, just curious

- Jeff

September 16, 2012 09:09