Difference between revisions of "Api"

From Wiki

Jump to: navigation, search
m (added comment)
m (Preliminary work on media)
Line 64: Line 64:
 
<table>
 
<table>
 
<tr>
 
<tr>
   <th align='left'>geni.com/api/v1/trees/''&lt;walk&lt;''/''&lt;id&gt;''.''&lt;format&gt;''</th>
+
   <th align='left'>geni.com/api/v1/trees/''&lt;walk&gt;''/''&lt;id&gt;''.''&lt;format&gt;''</th>
 
   <td>walk starting with other profile</td>
 
   <td>walk starting with other profile</td>
 
</tr>
 
</tr>
Line 81: Line 81:
 
<h1>Media Access</h1>
 
<h1>Media Access</h1>
 
Photos, Videos, Documents, Links, ...
 
Photos, Videos, Documents, Links, ...
TBD
+
 
 +
<table>
 +
<tr>
 +
  <th align='left'>geni.com/api/v1/media/''&lt;id&gt;''.''&lt;format&gt;''</th>
 +
  <td>meta-data for media</td>
 +
</tr>
 +
<tr>
 +
  <th align='left'>geni.com/api/v1/media/tagged.''&lt;format&gt;''?profile_id=''&lt;id&gt;''</th>
 +
  <td>meta-data for media tagged with id</td>
 +
</tr>
 +
<tr>
 +
  <th align='left'>geni.com/api/v1/media/photo/''&lt;id&gt;''.''&lt;size&gt;''</th>
 +
<td>jpeg photo by id</td>
 +
</tr>
 +
<tr>
 +
  <th align='left'>geni.com/api/v1/media/video/''&lt;id&gt;.flv</th>
 +
<td>flv video by id</td>
 +
</tr>
 +
</table>
 +
 
 +
Sizes:
 +
<ul>
 +
  <li>original</li>
 +
  <li>large</li>
 +
  <li>medium</li>
 +
  <li>small</li>
 +
  <li>t (thumbnail)</li>
 +
  <li>t2 (cropped thumbnail)</li>
 +
</ul>

Revision as of 23:25, 22 February 2010


API Notes

  • OAuth authentication.
  • Can also make calls using web browser once you're logged in
  • First pass will be read-only

Parameters

Formats:

  • json
  • ged (GEDCOM 5.5)
  • xml (not-GEDCOM 6)

Walks:

  • ancestors
  • blood_tree
  • descendants
  • forest
  • immediate_family

Profile Access

geni.com/api/v1/profiles/<id>.<format> other
geni.com/api/v1/profiles.<format> your immediate family
geni.com/api/v1/profiles.<format>?ids=<id,id,...> up to 50 other profiles

Fields:

Permission required for some.

  • First Name
  • Middle Name
  • Last Name
  • Display Name
  • Birth Event Id
  • Birth Date
  • Birth Location1
  • Death Event Id
  • Death Date
  • Death Location1
  • Residence Event Ids
  • Current Location/Place of Burial1
  • TBD (feel free to add desired fields here)

Notes

1Not sure if I should add location to profile. I don't want to return too much data with every profile. It's a choice between that and forcing another request to get the event data. I'm leaning toward adding flags to indicate what extra fields you want returned.

  • --Shmuelakam 23:35, 9 February 2010 (UTC) How about creating different query types instead? Such as a GetLocation(s) that returns only the name fields and the Location specified by some number (1=birth, 2=marriage, 3=death, 4=burial, 5=BMD)

Tree Access

geni.com/api/v1/trees/<walk>/<id>.<format> walk starting with other profile

Fields:

  • Marriage id
  • Partner ids
  • Children ids

Event Access

TBD

Media Access

Photos, Videos, Documents, Links, ...

geni.com/api/v1/media/<id>.<format> meta-data for media
geni.com/api/v1/media/tagged.<format>?profile_id=<id> meta-data for media tagged with id
geni.com/api/v1/media/photo/<id>.<size> jpeg photo by id
geni.com/api/v1/media/video/<id>.flv flv video by id

Sizes:

  • original
  • large
  • medium
  • small
  • t (thumbnail)
  • t2 (cropped thumbnail)
Personal tools