您的位置:首页 > 移动开发 > IOS开发

微软的Live SDK各个API简介

2015-12-29 09:58 357 查看
最近做的项目要用到微软的Live SDK,国内资料真是少的可怜。自己总结了下他给出的API,如果有用到的多多少少会有点用处吧。想来用这个的人应该很少,不排版了,直接粘贴复制了。

*************复制

 

 LiveConnectClient copyFromPath:toDestination:delegate method

 异步复制文件到给定路径和目标。可以选择指定LiveOperationDelegate。

 LiveConnectClient copyFromPath:toDestination:delegate:userState method

 

 *************删除

 

 LiveConnectClient deleteWithPath:delegate method

 异步删除文件到给定的路径。可以选择指定LiveOperationDelegate。

 LiveConnectClient deleteWithPath:delegate:userState method

 

 *************下载

 

 LiveConnectClient downloadFromPath:delegate method

 异步下载的文件从给定路径从用户的OneDrive帐户。该方法也可以选择指定LiveDownloadOperationDelegate。

 用来跟踪异步操作异步下载请求 一旦操作完成获得响应数据。

 LiveConnectClient downloadFromPath:delegate:userState method

 *************似乎也是下载?

 

 LiveConnectClient getWithPath:delegate method

 执行异步获取的文件从给定路径从用户的OneDrive帐户。该方法也可以选择指定LiveOperationDelegate。

 LiveConnectClient getWithPath:delegate:userState method

 *************初始化LiveConnectClient

 

 LiveConnectClient initWithClientId:delegate method

 执行异步LiveConnectClient类的新实例的初始化客户ID,和可选LiveAuthDelegate。

 

 LiveConnectClient initWithClientId:delegate:userState method

 执行异步LiveConnectClient类的新实例的初始化客户ID,可选LiveAuthDelegate和用户状态。

 

 LiveConnectClient initWithClientId:scopes:delegate method

 执行异步LiveConnectClient类的新实例的初始化客户ID、范围、可选LiveAuthDelegate。

 LiveConnectClient initWithClientId:scopes:delegate:userState method

 *************登陆

 

 LiveConnectClient login:delegate method

 执行异步登录介绍模态窗口并显示登录和授权形式,这样用户可以用微软账户登录和授权应用程序。可选的LiveAuthDelegate。

 LiveConnectClient login:delegate:userState method          用户状态

 LiveConnectClient login:scopes:delegate method             作用范围

 LiveConnectClient login:scopes:delegate:userState method

 *************登出

 LiveConnectClient logout method

 执行异步注销用户的应用程序。

 LiveConnectClient logoutWithDelegate:userState method

 *************移动

 

 LiveConnectClient moveFromPath:toDestination:delegate method

 异步 资源移动到用户的OneDrive给定路径

 LiveConnectClient moveFromPath:toDestination:delegate:userState method

 

 *************POST

 

 LiveConnectClient postWithPath:dictBody:delegate method

 应该是异步请求一个路径 参数包含一个主体

 LiveConnectClient postWithPath:dictBody:delegate:userState method

 

 *************POST JSON

 

 LiveConnectClient postWithPath:jsonBody:delegate method

 执行异步职位对于一个给定的路径,一个JSON消息请求的身体,和可选地,LiveOperationDelegate。

 LiveConnectClient postWithPath:jsonBody:delegate:userState method

 加了用户状态

 

 *************更新路径文件

 

 LiveConnectClient putWithPath:dictBody:delegate method

 执行异步更新资源与给定路径,消息请求主体和LiveOperationDelegate可选。如果资源不存在,它会创建一个新的。

 LiveConnectClient putWithPath:dictBody:delegate:userState method

 

 LiveConnectClient putWithPath:jsonBody:delegate method

 ----Performs an asynchronous PUT that updates a resource with a given path, JSON message request body, and optionally, a LiveOperationDelegate. If the resource does not exist, it creates a new one.

 执行异步更新资源在给定路径,JSON消息请求的主体,可选LiveOperationDelegate。如果资源不存在,它会创建一个新的。

 LiveConnectClient putWithPath:jsonBody:delegate:userState method

 

 

 **************上传

 

 LiveConnectClient uploadToPath:fileName:data:delegate method

 执行异步上传资源到某OneDrive帐户。这个方法使用一个给定的路径,文件名,文件数据,和一个可选的LiveUploadOperationDelegate。

 LiveConnectClient uploadToPath:fileName:data:overwrite:delegate:userState method   用户状态

 LiveConnectClient uploadToPath:fileName:inputStream:delegate method                输入流

 LiveConnectClient uploadToPath:fileName:inputStream:overwrite:delegate:userState method

 文件名 输入流 用户状态 和覆盖现有文件的选项

 ****************************************************************************************************

 

 LiveConnectSession class

 属性

 accessToken

 获得访问令牌和连接的用户签署。

 

 authenticationToken

 获得特定于用户的令牌,这样应用程序就可以验证用户。

 

 expires

 获取服务使用微软账户会话到期日期。

 

 refreshToken

 获得特定于用户刷新令牌,这个应用程序可以使用它来刷新访问令牌。

 

 scopes

 让用户为这个服务使用微软账户会话作用域。

 *****************************************************************************

 LiveDownloadOperation class

 属性

 data

 NSData实例保存下载数据。

 *****************************************************************************

 LiveOperation class

 cancel method

 取消当前操作。

 

 属性

 delegate property

 用来回调

 

 method property

 ----Gets the type of HTTP method used to make the call.

 

 path property

 请求路径

 

 rawResult property

 ----The text received from the Live SDKREST reference response.

 

 result property

 ----The parsed result received from the Live SDKREST reference response.

 

 userState property

 userState对象上调用原方法时通过LiveConnectClient实例。

 ********************************************************************************

 LiveOperationProgress class

 进度信息

 

 属性

 bytesTransferred property

 字节数

 

 progressPercentage property

 百分比

 

 totalBytes property

 总字节数

 

 ***************-----------------------Protocols-----------------------*****************

 LiveAuthDelegate

 处理回调方法LiveConnectClient init、注销和登录方法。

 

 authCompleted:session:userState method

 操作成功时被调用

 

 authFailed:userState method

 操作失败

 ********************************************************************************

 LiveDownloadOperationDelegate

 OneDrive下载回调处理方法。

 

 liveOperationSucceeded method

 操作成功时调用

 

 liveOperationFailed:operation method

 操作失败时 调用

 

 liveOperationProgress:data:operation method

 有下载进度事件时调用。

 ********************************************************************************

 LiveOperationDelegate

 SDK访问操作回调处理方法。

 

 liveOperationFailed method

 失败时调用

 liveOperationSucceeded method

 成功时调用

 

 ********************************************************************************

 LiveUploadOperationDelegate

 上传操作回调

 

 liveOperationSucceeded method

 成功时调用

 

 liveOperationFailed method

 失败时调用

 

 liveUploadOperationProgressed method

 有上传进度事件的时候调用

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  api 微软 ios Live SDK