xcode - Microsoft Outlook API and Swift -


how access microsoft outlook api using swift. want use microsoft outlook api allow user search people in outlook server. search framework set up. confused how access server. code consulting people have done before. code have far:

class exchangeapi {  func httpsendrequest(request: nsmutableurlrequest, callback: (string, string?) -> void) {     //implementing core data      var appdel: appdelegate = (uiapplication.sharedapplication().delegate as! appdelegate)     var context: nsmanagedobjectcontext = appdel.managedobjectcontext!     let ent = nsentitydescription.entityforname("emails", inmanagedobjectcontext: context)      var email = emails(entity: ent! , insertintomanagedobjectcontext: context)          let task = nsurlsession.sharedsession().datataskwithrequest(             request,             completionhandler: {                 data, response, error in                 if error != nil {                     callback("", error!.localizeddescription)                 } else {                     callback(                         nsstring(data: data!, encoding: nsutf8stringencoding)! string,                         nil                     )                 }         })          task.resume()     }     func httpget(url: string, callback: (string, string?) -> void) { //implementing core data var appdel: appdelegate = (uiapplication.sharedapplication().delegate as! appdelegate) var context: nsmanagedobjectcontext = appdel.managedobjectcontext! let ent = nsentitydescription.entityforname("emails",inmanagedobjectcontext: context)  var email = emails(entity: ent! , insertintomanagedobjectcontext: context)      var request = nsmutableurlrequest(url: nsurl(string: url)!)     httpsendrequest(request, callback: callback)         request.url = nsurl(string: "https://mail.sap.com/ews/exchange.asmx")         request.httpmethod = "get"  }      } 

take @ ews managed api, ews, , web services in exchange article explains possible options.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -