I have an addon which stores Properties in google documents.
I developed this addon and I used PropertiesService.getDocumentProperties().
Now I wrote a standalone google apps script which needs to iterate on every doc in a specific folder and, for each doc, to get the stored properties.
I'm trying to use the same PropertiesService.getDocumentProperties().getProperties() function but it seems that PropertiesService.getDocumentProperties() is returning NULL.
var documentProperties = PropertiesService.getDocumentProperties().getProperties();
Is it possible to call it from a standalone google apps script? how can I set the active document?
Otherwise, how can I get all properties I stored in each of the different docs?
Related
Is there a way to use the Dropbox API to list docs in a Paper folder?
There isn't a way to list all Paper documents in a specific folder directly, but I'll pass this along as a feature request.
The closest thing is to use /2/paper/docs/list[/continue], which let you list all of the Paper documents the user has either accessed (filter_by=docs_accessed) or created (filter_by=docs_created).
I'm looking to create a central repository for all of our published API documentation using DocFx. I have documentation auto-generated via my build (using TFS) and published through my release (using Octopus) just fine for multiple individual sites. However, I'm wanting to pull it altogether in one location. The thinking is that through a parent site you could filter content in any of the individual sites without having to drill down into them. Do you have a recommendation on how to do this?
Also, within this same documentation repository I want to provide the capability to search by all of the meta data (project-level documentation) across the hundreds of projects in our portfolio. This will give our BA, DEV and QA teams easier access to what all our systems do. I like the "filtering" capability built into DocFx, but I'm wanting full-text search across all of the meta data. Do you have a recommendation for this functionality as well?
To change the location of the docfx output, edit the docfx.json file and specify the dest value. By default it is "dest": "_site". For more formatting guidance, reference: https://dotnet.github.io/docfx/tutorial/docfx.exe_user_manual.html.
Regarding full-text search, that is possible by simply ensuring the ExtractSearchIndex post-processor is invoked (in order to generate an index.json file of keywords) and that the global _enableSearch value is set to true in the docfx.json file. A snippet from that file would look like:
"postProcessors": [ "ExtractSearchIndex" ],
"globalMetadata": {
"_enableSearch": "true"
}
For your first question:
I think what you expect is like the .NET API Browser. The source code behind this page is not open to public, so you need create this page by yourself, through collecting xrefmap.yml from multiple sites, and extract the needed data into this page.
For your second question:
DocFX uses Luna to scan all the output files and generate an index file called index.json for later search use. In your case, you should want to limit the search scope only in the metadata you defined. This is also not supported by DocFX by default. You can also use Luna in your central place to search these meta. You can create your specific index.json for each project first, and the cental place to collect them for the search page.
I'm trying to work with the new summer release of the Office 365 API tool for Visual Studio 2013 (update 3). It works fine except one problem I've encountered which can be called also a missing functionality.
I found no reasonable way to retrieve the direct children of the root folder from my One Drive for business Document Library using the newly added SharePointClient library.
The API call of SharePointClient.Files will retrieve all the files and folders from the whole document library including sub-folders. So in order to get only the direct children I have to page through all the documents and folders and analyze their URL. This is not acceptable for my application scenario. For a sub-folder I can get the direct children like this: SharePointClient.Files["<folder_id>"].ToFolder().Children This is what I need but it can't be applied to the root folder.
I've tried to use the REST API directly and similarly the request GET ../_api/files will retrieve all files and folders in the default document library and I found no simple way to list only the direct children of the root. Also there is no convenient way to get the path or GUID of the default document library which the SharePointClient.Files automatically uses.
Parsing the result XMLs of the REST API calls I may get the GUID of the default document library, that will let me use a different REST API to list files and folders separately for the root folder, but these calls results in a different XML schema from that used by SharePointClient. This means that to get only the direct children of the root I would have to re-implement the whole SharePointClient library.
If anybody has some good advice I'll be very thankful.
I just ran into the same issue - hopefully this will be remedied before the release version of the api tools. Here is what I've done to get only the root folder content:
[Create your spClient = SharePointClient]
var allFiles = await spClient.Files.ExecuteAsync();
var rootFiles = allFiles.CurrentPage.Where(i => !i.Id.Contains("/"));
You lose the IPagedCollection wrapper and you may need to get more than the 'CurrentPage' to see all files but this is the best workaround I've found. I'm then able to you the 'ToFolder()' method you mentioned above to list content of sub-folders.
We have a system that generates documents using the Google API, we would like the page set-up to default to A4 for all documents we generate. We have set the default as A$ in the Google Doc settings but this doesn't carry through for files created using the API.
Is there something we need to set in the API call to generate the doc?
Thanks in advance,
David
Is there something we need to set in the API call to generate the doc?
Unfortunately it looks like this option isn't supported via the API, either on file creation or on file update. Google Docs/Drive treats page setup as an application setting as opposed to a per-file setting.
Here's the full list of metadata that you can specify about a file: https://developers.google.com/drive/v2/reference/files
I have a large SharePoint document library with many levels of subfolders in it, my goal is to make one service call to list the file information (Name, size, AbsoluteUrl, etc.) of the files contained in that specific folder without enumerating through all of them.
The client application I'm writing will always have the path of the folder (ex: DocLibraryName\Folder\SubFolder1). I cannot use the SharePoint API access the data, I'm forced to use the Lists.asmx, dws.asmx, etc.. services built into MOSS 2007. My client app is in C# .Net 4.
It seems like I should be using the Lists.GetListItems method, if that is the case, what is the CAML query for just hitting a specific folder?
You can use the code like this:
XmlDocument document = new XmlDocument();
XmlElement queryOptions = document.CreateElement("QueryOptions");
queryOptions.InnerXml = #"<Folder>DocLibraryName\Folder\SubFolder1</Folder>";
and pass it as queryOptions element of Lists.GetListItems call.