在WebPart中获取Office 365中的未读邮件数
// Create the web request
HttpWebRequest request
= WebRequest.Create("https://outlook.office365.com/api/v1.0/me/messages/$count?$filter=IsRead%20eq%20false") as HttpWebRequest; // Add authentication to request
request.Credentials = new NetworkCredential("username", "password"); // Get response
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
{
// Get the response stream
StreamReader reader = new StreamReader(response.GetResponseStream()); // 显示在前台控件中
unreadCount.Text = reader.ReadToEnd();
}
在WebPart中获取Office 365中的未读邮件数的更多相关文章
- Windows 商店应用中使用 Office 365 API Tools
本篇我们介绍一个API 工具,用于在 Windows Store App 中使用 Office 365 API. 首先来说一下本文的背景: 使用 SharePoint 做过开发的同学们应该都知道,Sh ...
- 在swt中获取jar包中的文件 uri is not hierarchical
uri is not hierarchical 学习了:http://blog.csdn.net/zdsdiablo/article/details/1519719 在swt中获取jar包中的文件: ...
- 【记录】mybatis中获取常量类中数据
部分转载,已注明来源: 1.mybatis中获取常量类中数据 <update id="refuseDebt"> UPDATE dt_debt a SET ...
- 如何通过PowerShell获取Office 365 TenantID
作者:陈希章 发表于2017年5月31日 安装Azure Powershell 模块 Installing the Azure PowerShell Service Management module ...
- 【poi】用POI新建一个xlsx文件【或者说将数据存入到xlsx中】/【将数据从xlsx中获取到项目中】
第一部分:写入xlsx中 使用POI创建一个xlsx文件: 项目结构如下: 具体使用的POI中的 XSSFWorkbook xlsx对象 Sheet 工作簿对象 Row 行对象 Cell 单元格 ...
- 子PID namespace中获取父namespace中pid的方法
在那篇< 使用独立PID namespace防止误杀进程>中的最后,我碰到了一个难题,那就是父PID namespace中的进程无法使用进入子PID namespace中通过echo $$ ...
- struts2 在 Action 或 Interceptor 中获取 web.xml 中配置的 <context-param> 参数 (这是我的第一篇博文,哈哈。)
最近为了改一个问题,想加一个控制开关,就在web.xml 中配置了一个 <context-param> 参数,并在 Action 或 Interceptor 中获取参数值. 1.在 web ...
- Android中为图标加上数字--用于未读短信数提醒,待更新应用数提醒等
本文属于原创,转载请著名出处:http://flysnow.iteye.com/blog/906770 写道 在我们开发一些如短消息.应用商店等应用时,会考虑在短消息的图标上加上未读短信的数量,在应用 ...
- Activity中获取当前Fragment 中的子控件
XXXAdapter中 增加 public Fragment currentFragment; @Override public void setPrimaryItem(ViewGroup conta ...
随机推荐
- table表框去掉相邻的间隔
HTML <table> <tr> <th>名称</th> <th>描述</th> </tr> <tr> ...
- format not a string literal and no format arguments
今天cocos2d-x打包 android的时候报错:format not a string literal and no format arguments 报错点是:__String::create ...
- phylogeny analysis
Multiple Alignment: MUSCLE ProbCons T-Coffee ClustalW Alignment curation: Gblocks Remove positions w ...
- JAVA之IO流(字符流)
字符流InputStreamReader和OutputStreamWriter是Writer和Read的子类:是字节流通向字符流的桥梁,也就是可以把字节流转化为字符流. InputStreamRead ...
- [UWP] 对应用进行A/B测试
[对A/B测试的看法] 开发者在Dev Center中设置几种应用变体,这几种变体有几个变量的值不一样,比如有变体A和变体B(当然还可以加上变体C,Dev Center最多支持5个变体),A和B的不同 ...
- 计算机视觉之《OpenCV开发环境搭建》
codeblock安装:http://blog.csdn.net/hitwengqi/article/details/7985343 ubuntu+codeblock+opencv:http://bl ...
- Table 表单样式
<style> table th { white-space: nowrap; background-color: #f5f5f5; height:30px; font-size:14px ...
- JQuery------分页插件下载地址
转载GitHub: https://github.com/pgkk/kkpager
- js数组方法
数组方法清空数组1: arr.length=02: arr=[]arr.push()//往数组最后一个添加元素,会待会一个返回值,就是新的数组长度arr.unshift()//往数组的第一个添加元素, ...
- 第八章 交互技术,8.1 VR电商购物(作者:宋五)
8.1 VR电商购物 前言 GM LAB在2016年3月成立,是一个旨在探索最新电商购物体验的实验室.在探索VR购物的过程中,有两个需要核心解决的问题:一个是VR购物的产品形态是什么,另一个是VR环境 ...