Getting Started with Windows Live Contacts API
2010-02-02 03:42
393 查看
http://msdn.microsoft.com/en-us/library/bb463982.aspx
The Windows Live Contacts API defines a set of Web services that enables customers to programmatically access the Windows Live Contacts Address Book database. The Windows Live Contacts Web service is exposed to clients in a HTTP/GET request interface with XML response. This API is intended for customers and partners who want to take advantage of the Address Book service known as Windows Live Contacts. An example of an application that may be built on this API is described in About the Windows Live Contacts API. Using REST with the Windows Live Contacts API To use the Windows Live Contacts API, an application must use the Representational State Transfer (REST) protocol to send requests to Windows Live Contacts and receive responses in reply. REST is an HTTP-based protocol for remote data operations, for example from a client application to a Web service. With REST, the object and the verb are separated because a fixed set of verbs exist. You supply the path of the object within the schema on which you want the action to take place. The HTTP methods that the Windows Live Contacts REST implementation supports are based on the definitions in RFC 2616.
The request URI identifies the object or the class to be manipulated by the method. Additionally, the request URI effectively describes the path through the data hierarchy to the object or objects. An example request URI might be:
This request URI identifies a specific Contact container by ID (ContactID) and, within that contact, a specific location class by ID (LocationID), which could refer to any Location container. Then, the request URI identifies the actual property. In this example the actual property is the CompanyName element.
With this URI format and a chosen method, you can identify and act on any piece of data in Windows Live Contacts by using a single HTTP call.
The Windows Live Contacts API defines a set of Web services that enables customers to programmatically access the Windows Live Contacts Address Book database. The Windows Live Contacts Web service is exposed to clients in a HTTP/GET request interface with XML response. This API is intended for customers and partners who want to take advantage of the Address Book service known as Windows Live Contacts. An example of an application that may be built on this API is described in About the Windows Live Contacts API. Using REST with the Windows Live Contacts API To use the Windows Live Contacts API, an application must use the Representational State Transfer (REST) protocol to send requests to Windows Live Contacts and receive responses in reply. REST is an HTTP-based protocol for remote data operations, for example from a client application to a Web service. With REST, the object and the verb are separated because a fixed set of verbs exist. You supply the path of the object within the schema on which you want the action to take place. The HTTP methods that the Windows Live Contacts REST implementation supports are based on the definitions in RFC 2616.
Method | Usage |
---|---|
GET | Retrieves whatever information is identified by the request Universal Resource Identifier (URI). When a GET request succeeds, the response contains the data that is requested. For more information, see Windows Live Contacts API Methods: GET. |
POST | Inserts the data that is enclosed in the request body as a child of the element or elements identified by the request URI. When a POST request succeeds, the response code is the "201 Created" status code, and the response contains a Location header that points to the newly-created object or objects. For more information, seeWindows Live Contacts API Methods: POST. When a caller uses the POST method, the caller inserts data under the parent that the request URI identifies. Multiple child objects can be created by using a single POST request. |
PUT | Updates the object that is identified by the request URI with the data that is supplied in the request body. When a PUT request succeeds, the response code is the "204 No Content" status code, and no content is returned. For more information, see Windows Live Contacts API Methods: PUT. |
DELETE | Removes the data object that is identified by the request URI. When a DELETE request succeeds, the response code is the "204 No Content" status code, and no content is returned. For more information, see Windows Live Contacts API Methods: DELETE. |
/LiveContacts/Contacts/Contact(ContactID)/Locations/Location(LocationID)/CompanyName
This request URI identifies a specific Contact container by ID (ContactID) and, within that contact, a specific location class by ID (LocationID), which could refer to any Location container. Then, the request URI identifies the actual property. In this example the actual property is the CompanyName element.
With this URI format and a chosen method, you can identify and act on any piece of data in Windows Live Contacts by using a single HTTP call.
相关文章推荐
- Getting Started with Windows Live Contacts API
- Getting Started with Windows Touch Messages
- Getting Started with Windows Touch Gestures
- Windows Live Contacts API: Code Samples
- [转]Getting started with ASP.NET Web API OData in 3 simple steps
- [Windows Azure] Getting Started with Windows Azure SQL Data Sync
- Getting Started with Windows Phone Development
- Tutorial : Getting Started with Kubernetes on your Windows Laptop with Minikube
- Getting Started with Microsoft Windows Workflow Foundation: A Developer Walkthrough
- Windows Phone Dev Center - Getting started with developing for Windows Phone
- Windows Live Contacts API: Code Samples
- Getting Started with Microsoft Windows Workflow Foundation: A Developer Walkthrough
- 《ZooKeeper》 Chapter 3 Getting Started with the ZooKeeper API
- Getting Started With the Java Rule Engine API (JSR 94): Toward Rule-Based Applications
- Getting Started with the IMSL® Numerical Libraries for C for Windows
- Getting Started with Winsock - Windows Socket 2 API 教程文档 - WinSock API 参考 - HackerJLY
- Getting Started with TensorFlow
- Getting Started with ReactiveCocoa
- Getting Started with the Table Component
- Getting started with JVM Memory model and GC