I basically want to delete all versions except for the currently designated version of the file.
For that I am using
BoxClient.getFilesManager().getFileVersions(_fileId, reqObj);
The first entry in the returned List<BoxFileVersion> object is the current version.
There doesn't seem to be any API in the Box SDK (for Java) to delete a version - is this being planned soon ?
Is there a better way ?
The SDK is open-sourced on github. If you feel like it, you can submit a pull request with your change to add in version delete. How to do it is documented in the API documentation.
Related
I build Chromium with Google keys (Google API, Oauth Client ID, Oauth Client Secret).
I could embed above Google keys well in Chromium source before building.
But I wanna check the keys in Chromium binary after building.
If I type chrome://version in Chromium, can check flags which r adopted in Chromium browser. But I don't know how to check the keys.
Or I just wanna check whether the keys are enabled or not.
Is there a way to check whether Google API is embeded/enabled in Chromium/Chrome or not?
Chromium will first try to read the value of these env. variables from the system before using embedded API keys, if they are present:
GOOGLE_API_KEY
GOOGLE_DEFAULT_CLIENT_ID
GOOGLE_DEFAULT_CLIENT_SECRET
if they are not present then it will use embedded values instead.
There are a couple of ways to find out if a Chromium fork was compiled with Google API keys:
If the API keys are absent, Chromium will show a bubble control on startup stating that API keys are missing. But as mentioned above, you can't find out if the API keys are embedded or read from env. variables using this method.
Use Chrome sync feature to check if Google API keys are present or not. Just try to sync Google accounts with Chromium. If they keys are not present then it won't work. FYI, this feature won't be available to Chromium browsers past March 15 because of policy changes led by Google.
Again, you can't use this method to find out if the API keys are embedded or not.
Use this method to find out if the API keys are embedded you can find out by enabling logging when starting Chromium. You should go through the log file to find out if the API keys are being read from env. variable or are embedded. More info on how to enable logging: Here
I am getting sick of thinking about how to make application force update by controlling the json api. I want to call json api from my server and want to make your if the app is need to update and show the message box and navigate to this update application. Please share me a sample if you know how to do it in flutter. I really appreciate.
In one of my previous jobs, I was asked to add a force update function to the app. I personally don't like it when apps force update you (except when you are in a really old-old version).
This is how I did it (i am not going to paste the code, I am going to simply explain it) when the app started up we had a function that checked an API for the latest version of the app (that app worked only with internet access). If the API returned a newer version we simply displayed a msg informing the user that there is a newer version. If the API had the forceupdate value, I was displaying a msg and disabling everything. The user couldn't perform anything in the app until he updated it to the latest version.
I've an question about libraries usage within Google Sheets.
I developed a standalone Apps Script published as Library. This library is used by 150 Google Sheets files (I did that to centralize and hide some code from users).
Today, I need to update the library code to add some functionalities.
I'd like to know if you know a solution to remotely update the 150 Sheets Clients to match the new Library version on client side (I don't use the "dev" mode).
It seems that the Apps Script API can change do changes on the library itself but not on the client side (sheets).
Has someone else had this issue and how did you deal with it ?
Nope. You'll have to do it yourself. Libraries not in dev mode never auto-update, and can't be updated to the latest version by the library developer, because they are libraries -- it is expected that there is code in the destination that uses it, and thus it is not guaranteed that changing the version does not break the interface code.
If you want your deployed code to be auto-updated to the latest version, you should be using the add-on model, or (when you know that you will have backwards compatibility for your library interface) accessing your libraries from your scripts in dev mode.
You can collect the requisite Script IDs (File -> Project Properties) that need to have the library updated, and you can update the Script Project contents (including the appsscript.json manifest file that specifies the library version) via the Apps Script API. You may find clasp helpful for this.
I am looking to get user events in BOX Windows SDK v2. However, it seems that /events endpoint is not implemented in BOX Windows SDK v2.
Here is the box api page: https://developers.box.com/docs/#events-get-events-for-a-user
I am using this SDK: https://github.com/box/box-windows-sdk-v2
But, it seems this SDK does not have implementation for the above /events endpoint.
Pls guide me in right direction, Do I need to write custom implementation to get user events ?
I am a beginner in DotNet. Pls help.
You are correct that the events endpoint has not been implemented in the Box Windows SDK. Perhaps the easiest (though not easy) thing to do is to fork the existing SDK repo and add that support yourself. You'll want to create a new EventsManager class that contains this functionality. Consider using an existing manager class (such as the FoldersManager) as a basis for your work.
I compile the extension using the --pack-extension switch:
C:\Users\APOL0\AppData\Local\Google\Chrome\Application>chrome.exe --pack-extension="D:\MyExt"
Everything works fine: chrome generates Myext.crx and Myext.pem but I don't know how I can get extension ID for automatic installation using Windows' registry.
How can I get this ID without using "manual verification", ie. programatically?
Edit May 14, 2018: Added clarification and link to 3rd party tool.
There is no official supported method (at time of writing) to programmatically get the extension ID from a CRX without manually interacting with Chrome. (See official method below)
Unofficial Method
The only programmatic method I've found any reference to online is on this SO answer. The author of the answer later posted a link to a ChromeIdGenerator tool they wrote to accomplish this. The tool is based on how Chrome calculated its extension IDs at that point. Full disclosure: I have not tested the tool to ensure its accuracy, it is simply the only tool I've found to accomplish what you're asking.
Official Method (manual)
If you open up your Chrome Extensions manager page, you can drag and drop your Myext.crx onto the page (you must be in "Developer Mode") and it will load your extension, showing you the new extension id.