close

  
<p> var examples = [
  {
    "name" : "Standard Service",
    "serviceUrl" : serviceUrl,
    "queries" : [
      {
        title: "Service Metadata"
      },
      {
        title: "Simple single query",
        query: {
          "query" : "Ford"
        }
      },
      {
        title: "Typed single query",
        query: {
          "query" : "Ford",
          "type" : "/people/person"
        }
      },
      {
        title: "Typed single query with properties",
        query: {
          "query" : "Ford",
          "type" : "/people/person",
          "properties" : [{
            "pid" : "/people/person/place_of_birth",
            "v" : "Detroit"
          }]
        }
      },
      {
        title: "Multiple queries",
        queries: {
          "q1" : {
            "query" : "Ford",
            "type" : "/people/person",
            "properties" : [{
              "pid" : "/people/person/place_of_birth",
              "v" : "Detroit"
            }]
          },
          "q2" : {
            "query" : "Apple",
            "type" : "/business/company"
          }
        }
      }
    ]
  },
  {
    "name" : "Namespaced Service (NYTimes)",
    "serviceUrl" : namespaceServiceUrl + "?namespace=/source/nytimes",
    "queries" : [
      {
        title: "Service Metadata"
      },
      {
        title: "Simple single query",
        query: {
          "query" : "Miller"
        }
      },
      {
        title: "Typed single query",
        query: {
          "query" : "Miller",
          "type" : "/film/actor"
        }
      },
      {
        title: "Typed single query with properties",
        query: {
          "query" : "Miller",
          "type" : "/film/actor",
          "properties" : [{
            "pid" : "/people/person/place_of_birth",
            "v" : "New York"
          }]
        }
      },
      {
        title: "Multiple queries",
        queries: {
          "q1" : {
            "query" : "Miller",
            "type" : "/film/actor",
            "properties" : [{
              "pid" : "/people/person/place_of_birth",
              "v" : "New York"
            }]
          },
          "q2" : {
            "query": "Gates",
            "type": "/government/politician"
          }
        }
      }
    ]
  },  
  {
    "name" : "Namespaced Service (Rotten Tomatoes)",
    "serviceUrl" : namespaceServiceUrl + "?namespace=/source/rottentomatoes/movie&amp;type=/film/film",
    "queries" : [
      {
        title: "Service Metadata"
      },
      {
        title: "Simple single query",
        query: {
          "query" : "Black"
        }
      },
      {
        title: "Single query with properties",
        query: {
          "query" : "Black",
          "properties" : [{
            "pid" : "/film/film/genre",
            "v" : "Drama"
          }]
        }
      }
    ]
  },
  {
    "name" : "Netflix Service",
    "serviceUrl" : "http://netflix-reconcile.freebaseapps.com/reconcile",
    "queries" : [
      {
        title: "Service Metadata"
      },
      {
        title: "Simple single query",
        query: {
          "query" : "Knight"
        }
      },
      {
        title: "Typed single query",
        query: {
          "query" : "Knight",
          "type" : "Drama"
        }
      },
      {
        title: "Typed single query with properties",
        query: {
          "query" : "Knight",
          "type" : "Drama",
          "properties" : [{
            "pid" : "/film/film/directed_by",
            "v" : "Christopher Nolan"
          }]
        }
      },
      {
        title: "Multiple queries",
        queries: {
          "q1" : {
            "query" : "Knight",
            "type" : "Drama",
            "properties" : [{
              "pid" : "/film/film/directed_by",
              "v" : "Christopher Nolan"
            }]
          },
          "q2" : {
            "query" : "Zone"
          }
        }
      }
    ]
  }
]; </p>

Comments

Hide