Places (Search) API China - BETA Developer's Guide

Source Attribution

The Places (Search) API China - BETA gives access to content that is provided by a number of sources. Client applications must display the source attribution next to the content. This requirement forms part of the terms and conditions of the API.

Types of content that require attribution include images, reviews, editorials or a place itself. Below is an example of an image object with attribution information:

{
  "src": "http://...",
  "via": {
    "href": "http://originalArticle..",
    "type": "text/html"
  },
  "supplier": {
    "title": "Qype",
    "href": "http://...",
    "type": "urn:nlp-types:supplier",
    "icon": "http://..."
  },
  "user": {
    "name": "Max Mustermann",
    "href": "http://userProfile...",
    "type": "text/html",
    "icon": "http://userIcon..."
  },
  "attribution": "Provided by <a href=\"http://originalArticle...\">Qype</a> user <a href=\"http://userProfile...\">Max Mustermann</a>"
}

Attribution information is present in the form of link objects and as a ready-to-display HTML string in the attribution field. The amount of attribution information will vary for different pieces of content. Developers should refer to the reference documentation for the relevant media type definition. For example, urn:nlp-types:supplier

For Clients Using HTML Representation (Default)

The only step is to display the rich text in the attribution field next to the content.

For Clients Using Plain Text Representation

If the platform does not allow display of embedded HTML, client applications will need to display the following fields along with the content in the UI:

  • the text given in the attribution field
  • a link to the user's profile in user.href if available
  • the user's icon in user.icon if available
  • a link to the original source in via.href if available
Note: Not all of this attribution information is available for all content. However, what is available must be displayed.