[英]How to get all PowerPoint files from Skydrive?
I'm trying to build a windows 8 metro app in C# which shows all PowerPoint Presentations in your SkyDrive Folder. 我正在尝试在C#中构建一个Windows 8 metro应用程序,它显示SkyDrive文件夹中的所有PowerPoint演示文稿。 Therefore I'm using the Windows Live SDK.
因此我使用的是Windows Live SDK。
To get the information about all PowerPoint Files in the users SkyDrive folders I already tried to search for the ppt and pptx extension recursively in all folders, which is kind of a hassle. 要获取有关用户SkyDrive文件夹中所有PowerPoint文件的信息,我已经尝试在所有文件夹中递归搜索ppt和pptx扩展名,这有点麻烦。
Is there a more elegant way to find all PowerPoint Files? 是否有更优雅的方式来查找所有PowerPoint文件? In addition to that, I'm trying to show the Presentation in a WebView using the PowerPoint online app, is there an way to get the right URL without building it myself?
除此之外,我试图使用PowerPoint在线应用程序在WebView中显示演示文稿,有没有办法获得正确的URL而不自己构建它?
Help is appreciated 感谢帮助
After searching the www I found a "change log" article about the improvements made to the SkyDrive API which announced a search feature. 搜索完www后,我找到了一篇关于对宣布搜索功能的SkyDrive API所做改进的“更改日志”文章。
After playing around with this REST interface, I tried using it for specific file types such as .ppt. 在使用此REST接口后,我尝试将其用于特定文件类型,例如.ppt。 My first results seem to get me what I want, but no guarantee that this is the best solution.
我的第一个结果似乎得到了我想要的东西,但不能保证这是最好的解决方案。 It's just the easiest right now!
这是现在最容易的!
Here's the C# Code I'm using to get all ".ppt" files through the SkyDrive Search API 这是我用来通过SkyDrive Search API获取所有“.ppt”文件的C#代码
LiveConnectClient client = new LiveConnectClient(App.Session);
LiveOperationResult liveOperationResult = await client.GetAsync("me/skydrive/search?q=.ppt");
dynamic searchResult = liveOperationResult.Result;
Feel free to comment if you find a better solution! 如果您找到更好的解决方案,请随时发表评论!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.