[Developers] getting parameters from multiple types

Alexander Marks al at metaweb.com
Sun Nov 9 19:47:19 UTC 2008


There is no easy way to do this right now in a single query. It is possible, but it's not pretty. One way to do what you want in two passes, though, would be to first ask for all the properties of all the types of the topic:

{
  "id": "/quotationsbook/author/4624",
  "type": [{
    "properties": []
  }]
}

and then construct from the result a second query that asks for each property:

{
  "id": "/quotationsbook/author/4624",
  "/music/artist/origin": [],
  "/music/artist/active_start": [],
  "/music/artist/active_end": [],
  "/music/artist/genre": [],
  "/music/artist/label": [],
  ...
}

Al

----- Original Message -----
From: "Lilach Givati" <lilachg at semantinet.com>
To: "For discussions about MQL, Freebase API and apps built on Freebase" <developers at freebase.com>
Sent: Sunday, November 9, 2008 11:02:54 AM GMT -08:00 US/Canada Pacific
Subject: Re: [Developers] getting parameters from multiple types


This was a general example, I don't always know what are the parameters I can get beforehand. I just want the parameters under the item, on all its' types.
I only know what types I have and an ID.
Is there no way of just making a query that gives back all the parameters under these types?
Thanks, 
Lilach

-----Original Message-----
From: developers-bounces at freebase.com [mailto:developers-bounces at freebase.com] On Behalf Of Alexander Marks
Sent: Sunday, November 09, 2008 8:38 PM
To: For discussions about MQL,Freebase API and apps built on Freebase
Subject: Re: [Developers] getting parameters from multiple types

You can always fully qualify a property name in order to mix properties from different types, like this:

  {
    "id": "/quotationsbook/author/4624",
    "/music/artist/album": [],
    "/film/music_contributor/film": []
  }

Al

----- Original Message -----
From: "Lilach Givati" <lilachg at semantinet.com>
To: Developers at freebase.com
Sent: Sunday, November 9, 2008 6:31:47 AM GMT -08:00 US/Canada Pacific
Subject: [Developers] getting parameters from multiple types





After getting the types for maddona I found my item: 

/film/music_contributor 

/music/artist 

Etc.. 



I also have the ID of this entity: 

/quotationsbook/author/4624 

Guid : #9202a8c04000641f8000000003ac7f48 



Can I create one query to get all the information under this guid under the different types? 



I need the information under /film/music_contributor such as : 

"film" : [ "A League of Their Own", "At Close Range", "Truth or Dare" ], 



and under /music/artist such as: 

"album" : [ "Rescue Me", "The Confessions Tour", "I'm Going to T … 



Thanks 

Lilach 
_______________________________________________
Developers mailing list
Developers at freebase.com
http://lists.freebase.com/mailman/listinfo/developers
_______________________________________________
Developers mailing list
Developers at freebase.com
http://lists.freebase.com/mailman/listinfo/developers
_______________________________________________
Developers mailing list
Developers at freebase.com
http://lists.freebase.com/mailman/listinfo/developers


More information about the Developers mailing list