Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initial commit

  • Loading branch information...
commit 8c939656c456e9a7260fefc1a15fac9f0a99f96f 0 parents
@camshaft authored
28 api/alvin+criesta.json
@@ -0,0 +1,28 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/alvin+criesta.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/alvin+criesta.json",
+ "data": [
+ {"name": "name", "value": "Jared Bytheway", "prompt": "Name"},
+ {"name": "birthday", "value": "1964-07-23", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/shellie.json"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/alvin.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/criesta.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/jared+shellie.json"}
+ ]
+ }
+ ]
+ }
+}
28 api/alvin.json
@@ -0,0 +1,28 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/alvin.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/alvin.json",
+ "data": [
+ {"name": "name", "value": "Alvin Bytheway", "prompt": "Name"},
+ {"name": "birthday", "value": "", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/criesta.json"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/henry.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/mercy.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/alvin+criesta.json"}
+ ]
+ }
+ ]
+ }
+}
27 api/brenden.json
@@ -0,0 +1,27 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/brenden.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/brenden.json",
+ "data": [
+ {"name": "name", "value": "Brenden Bytheway", "prompt": "Name"},
+ {"name": "birthday", "value": "", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/jared.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/shellie.json"},
+ {"rel": "siblings", "href": "http://camshaft.github.com/hypertree/api/jared+shellie.json"}
+ ]
+ }
+ ]
+ }
+}
34 api/cameron.json
@@ -0,0 +1,34 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/cameron.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/cameron.json",
+ "data": [
+ {"name": "name", "value": "Cameron Bytheway", "prompt": "Name"},
+ {"name": "birthday", "value": "1988-09-19", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/jared.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/shellie.json"},
+ {"rel": "siblings", "href": "http://camshaft.github.com/hypertree/api/jared+shellie.json"}
+ ]
+ }
+ ],
+
+ "template": {
+ "data": [
+ {"name": "name", "value": "Cameron Bytheway", "prompt": "Name"},
+ {"name": "birthday", "value": "1988-09-19", "prompt": "Birthday"}
+ ]
+ }
+ }
+}
28 api/charles+viola.json
@@ -0,0 +1,28 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/charles+viola.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/criesta.json",
+ "data": [
+ {"name": "name", "value": "Criesta Thomas", "prompt": "Name"},
+ {"name": "birthday", "value": "", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/alvin.json"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/charles.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/viola.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/alvin+criesta.json"}
+ ]
+ }
+ ]
+ }
+}
26 api/charles.json
@@ -0,0 +1,26 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/charles.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/charles.json",
+ "data": [
+ {"name": "name", "value": "Charles Thomas", "prompt": "Name"},
+ {"name": "birthday", "value": "1881-05-05", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/viola.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/charles+viola.json"}
+ ]
+ }
+ ]
+ }
+}
28 api/connie.json
@@ -0,0 +1,28 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/connie.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/connie.json",
+ "data": [
+ {"name": "name", "value": "Darrell Anderson", "prompt": "Name"},
+ {"name": "birthday", "value": "", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/darrell.json"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/thomas.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/thelma.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/darrell+connie.json"}
+ ]
+ }
+ ]
+ }
+}
28 api/criesta.json
@@ -0,0 +1,28 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/criesta.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/criesta.json",
+ "data": [
+ {"name": "name", "value": "Criesta Thomas", "prompt": "Name"},
+ {"name": "birthday", "value": "", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/alvin.json"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/charles.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/viola.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/alvin+criesta.json"}
+ ]
+ }
+ ]
+ }
+}
27 api/dallin.json
@@ -0,0 +1,27 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/dallin.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/dallin.json",
+ "data": [
+ {"name": "name", "value": "Dallin Bytheway", "prompt": "Name"},
+ {"name": "birthday", "value": "", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/jared.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/shellie.json"},
+ {"rel": "siblings", "href": "http://camshaft.github.com/hypertree/api/jared+shellie.json"}
+ ]
+ }
+ ]
+ }
+}
28 api/darrell+connie.json
@@ -0,0 +1,28 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/darrell+connie.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/shellie.json",
+ "data": [
+ {"name": "name", "value": "Shellie Bytheway", "prompt": "Name"},
+ {"name": "birthday", "value": "1964-07-23", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/jared.json"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/darrell.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/connie.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/jared+shellie.json"}
+ ]
+ }
+ ]
+ }
+}
28 api/darrell.json
@@ -0,0 +1,28 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/darrell.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/darrell.json",
+ "data": [
+ {"name": "name", "value": "Darrell Solum", "prompt": "Name"},
+ {"name": "birthday", "value": "", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/connie.json"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/robert.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/edna.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/darrell+connie.json"}
+ ]
+ }
+ ]
+ }
+}
26 api/edna.json
@@ -0,0 +1,26 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/edna.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/edna.json",
+ "data": [
+ {"name": "name", "value": "Edna Hayes", "prompt": "Name"},
+ {"name": "birthday", "value": "1912-05-10", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/robert.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/robert+edna.json"}
+ ]
+ }
+ ]
+ }
+}
28 api/henry+mercy.json
@@ -0,0 +1,28 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/henry+mercy.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/alvin.json",
+ "data": [
+ {"name": "name", "value": "Alvin Bytheway", "prompt": "Name"},
+ {"name": "birthday", "value": "", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/criesta.json"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/henry.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/mercy.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/alvin+criesta.json"}
+ ]
+ }
+ ]
+ }
+}
28 api/henry.json
@@ -0,0 +1,28 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/henry.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/henry.json",
+ "data": [
+ {"name": "name", "value": "Henry Bytheway", "prompt": "Name"},
+ {"name": "birthday", "value": "1885-07-07", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/mercy.json"},
+ {"ref": "father", "href": "http://camshaft.github.com/hypertree/api/thomas.json"},
+ {"ref": "mother", "href": "http://camshaft.github.com/hypertree/api/charles.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/henry+mercy.json"}
+ ]
+ }
+ ]
+ }
+}
BIN  api/img/anonymous.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 api/jared+shellie.json
@@ -0,0 +1,66 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/jared+shellie.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/cameron.json",
+ "data": [
+ {"name": "name", "value": "Cameron Bytheway", "prompt": "Name"},
+ {"name": "birthday", "value": "1988-09-19", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/jared.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/shellie.json"},
+ {"rel": "siblings", "href": "http://camshaft.github.com/hypertree/api/jared+shellie.json"}
+ ]
+ },
+ {
+ "href": "http://camshaft.github.com/hypertree/api/brenden.json",
+ "data": [
+ {"name": "name", "value": "Brenden Bytheway", "prompt": "Name"},
+ {"name": "birthday", "value": "", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/jared.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/shellie.json"},
+ {"rel": "siblings", "href": "http://camshaft.github.com/hypertree/api/jared+shellie.json"}
+ ]
+ },
+ {
+ "href": "http://camshaft.github.com/hypertree/api/katelyn.json",
+ "data": [
+ {"name": "name", "value": "Katelyn Bytheway", "prompt": "Name"},
+ {"name": "birthday", "value": "", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/jared.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/shellie.json"},
+ {"rel": "siblings", "href": "http://camshaft.github.com/hypertree/api/jared+shellie.json"}
+ ]
+ },
+ {
+ "href": "http://camshaft.github.com/hypertree/api/dallin.json",
+ "data": [
+ {"name": "name", "value": "Dallin Bytheway", "prompt": "Name"},
+ {"name": "birthday", "value": "", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/jared.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/shellie.json"},
+ {"rel": "siblings", "href": "http://camshaft.github.com/hypertree/api/jared+shellie.json"}
+ ]
+ }
+ ]
+ }
+}
28 api/jared.json
@@ -0,0 +1,28 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/jared.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/jared.json",
+ "data": [
+ {"name": "name", "value": "Jared Bytheway", "prompt": "Name"},
+ {"name": "birthday", "value": "1964-07-23", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/shellie.json"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/alvin.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/criesta.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/jared+shellie.json"}
+ ]
+ }
+ ]
+ }
+}
27 api/katelyn.json
@@ -0,0 +1,27 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/katelyn.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/katelyn.json",
+ "data": [
+ {"name": "name", "value": "Katelyn Bytheway", "prompt": "Name"},
+ {"name": "birthday", "value": "", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/jared.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/shellie.json"},
+ {"rel": "siblings", "href": "http://camshaft.github.com/hypertree/api/jared+shellie.json"}
+ ]
+ }
+ ]
+ }
+}
26 api/mercy.json
@@ -0,0 +1,26 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/mercy.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/mercy.json",
+ "data": [
+ {"name": "name", "value": "Mercy Hill", "prompt": "Name"},
+ {"name": "birthday", "value": "1891-05-10", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/henry.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/henry+mercy.json"}
+ ]
+ }
+ ]
+ }
+}
28 api/robert+edna.json
@@ -0,0 +1,28 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/robert+edna.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/darrell.json",
+ "data": [
+ {"name": "name", "value": "Darrell Solum", "prompt": "Name"},
+ {"name": "birthday", "value": "", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/connie.json"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/robert.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/edna.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/darrell+connie.json"}
+ ]
+ }
+ ]
+ }
+}
26 api/robert.json
@@ -0,0 +1,26 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/robert.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/robert.json",
+ "data": [
+ {"name": "name", "value": "Robert Solum", "prompt": "Name"},
+ {"name": "birthday", "value": "1912-07-10", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/edna.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/robert+edna.json"}
+ ]
+ }
+ ]
+ }
+}
28 api/shellie.json
@@ -0,0 +1,28 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/shellie.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/shellie.json",
+ "data": [
+ {"name": "name", "value": "Shellie Solum", "prompt": "Name"},
+ {"name": "birthday", "value": "1964-07-23", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/jared.json"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/darrell.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/connie.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/jared+shellie.json"}
+ ]
+ }
+ ]
+ }
+}
26 api/thelma.json
@@ -0,0 +1,26 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/thelma.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/thelma.json",
+ "data": [
+ {"name": "name", "value": "Thelma Jones", "prompt": "Name"},
+ {"name": "birthday", "value": "", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/thomas.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/thomas+thelma.json"}
+ ]
+ }
+ ]
+ }
+}
28 api/thomas+thelma.json
@@ -0,0 +1,28 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/thomas+thelma.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/connie.json",
+ "data": [
+ {"name": "name", "value": "Darrell Anderson", "prompt": "Name"},
+ {"name": "birthday", "value": "", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/darrell.json"},
+ {"rel": "father", "href": "http://camshaft.github.com/hypertree/api/thomas.json"},
+ {"rel": "mother", "href": "http://camshaft.github.com/hypertree/api/thelma.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/darrell+connie.json"}
+ ]
+ }
+ ]
+ }
+}
26 api/thomas.json
@@ -0,0 +1,26 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/thomas.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/thomas.json",
+ "data": [
+ {"name": "name", "value": "Thomas Anderson", "prompt": "Name"},
+ {"name": "birthday", "value": "", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/thelma.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/thomas+thelma.json"}
+ ]
+ }
+ ]
+ }
+}
26 api/viola.json
@@ -0,0 +1,26 @@
+{
+ "collection":
+ {
+ "version": "1.0",
+ "href": "http://camshaft.github.com/hypertree/api/viola.json",
+
+ "links": [
+ {"rel": "index", "href": "http://camshaft.github.com/hypertree/api/"}
+ ],
+
+ "items": [
+ {
+ "href": "http://camshaft.github.com/hypertree/api/viola.json",
+ "data": [
+ {"name": "name", "value": "Viola Peterson", "prompt": "Name"},
+ {"name": "birthday", "value": "1890-02-10", "prompt": "Birthday"}
+ ],
+ "links": [
+ {"rel": "avatar", "href": "http://camshaft.github.com/hypertree/api/img/anonymous.png", "prompt": "Avatar", "render": "image"},
+ {"rel": "spouse", "href": "http://camshaft.github.com/hypertree/api/charles.json"},
+ {"ref": "children", "href": "http://camshaft.github.com/hypertree/api/charles+viola.json"}
+ ]
+ }
+ ]
+ }
+}
13 index.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+ <script src="http://d3js.org/d3.v2.js"></script>
+ <script src="http://underscorejs.org/underscore-min.js"></script>
+ <link type="text/css" rel="stylesheet" href="style.css"/>
+ </head>
+ <body>
+ <div id="chart"></div>
+ <script type="text/javascript" src="script.js"></script>
+ </body>
+</html>
202 script.js
@@ -0,0 +1,202 @@
+var w = 960,
+ h = 900,
+ i = 0,
+ duration = 300,
+ root,
+ cache={};
+
+var tree = d3.layout.tree()
+ .size([h, w - 160]);
+
+var diagonal = d3.svg.diagonal()
+ .projection(function(d) { return [d.y, d.x]; });
+
+var vis = d3.select("#chart").append("svg:svg")
+ .attr("width", w)
+ .attr("height", h)
+ .call(d3.behavior.zoom().scaleExtent([1, 8]).on("zoom", zoom))
+ .append("svg:g")
+ .attr("transform", "translate(40,0)");
+
+var rootURL = "http://camshaft.github.com/hypertree/api";
+
+d3.json(rootURL, function(me) {
+ me.x0 = 800;
+ me.y0 = 0;
+ cache[rootURL] = me;
+ update(root = me);
+});
+
+function update(source) {
+
+ tree.children(function(node) {
+ if(!node) return;
+ if(node.children) return node.children;
+ if(node._children) return [];
+
+ var person = node.collection.items[0];
+ var parents = [];
+
+ // Get the parent links
+ var father = _.find(person.links, function(link) {
+ return link.rel == 'father';
+ });
+ var mother = _.find(person.links, function(link) {
+ return link.rel == 'mother';
+ });
+
+ var parentsUpdated = function() {
+ if ( (!father||(father&&parents[0]))
+ && (!mother||(mother&&parents[1]))) {
+ setTimeout(function() {
+ update(root);
+ }, duration);
+ }
+ };
+
+ // Father
+ if (father){
+ if(cache[father.href]) {
+ parents[0] = cache[father.href];
+ }
+ else if (!cache[father.href]) {
+ d3.json(father.href, function(fatherData) {
+ cache[father.href] = fatherData;
+ parents[0] = fatherData;
+ parentsUpdated();
+ });
+ }
+ }
+ // Mother
+ if (mother){
+ if(cache[mother.href]) {
+ parents[1] = cache[mother.href];
+ }
+ else if (!cache[mother.href]) {
+ d3.json(mother.href, function(motherData) {
+ cache[mother.href] = motherData;
+ parents[1] = motherData;
+ parentsUpdated();
+ });
+ }
+ }
+ return parents;
+ });
+
+ // Compute the new tree layout.
+ var nodes = tree.nodes(root).reverse();
+ // Update the nodes…
+ var node = vis.selectAll("g.node")
+ .data(nodes, function(d) { return d.id || (d.id = ++i); });
+
+ var nodeEnter = node.enter().append("svg:g")
+ .attr("class", "node")
+ .attr("transform", function(d) {
+ if (d.parent) {
+ return "translate(" + d.parent.y0 + "," + d.parent.x0 + ")";
+ }
+ else {
+ return "translate(" + source.y0 + "," + source.x0 + ")";
+ }
+ });
+
+ nodeEnter.append("svg:text")
+ .attr("x", -24)
+ .attr("y", 35)
+ .text(function(d) {
+ var name = _.find(d.collection.items[0].data, function(property) {
+ return property.name === 'name';
+ });
+ return name.value;
+ });
+
+ nodeEnter.append("svg:image")
+ .attr("x", function(d) {return -24})
+ .attr("y", -24)
+ .attr("width", 48)
+ .attr("height", 48)
+ .attr("xlink:href", function(d) {
+ var avatar = _.find(d.collection.items[0].links, function(link) {
+ return link.rel == 'avatar';
+ });
+ return avatar.href;
+ })
+ .on("click", click);
+
+ node.transition()
+ .duration(duration)
+ .attr("transform", function(d) { return "translate(" + d.y + "," + d.x + ")"; })
+ .style("opacity", 1);
+
+
+ node.exit().transition()
+ .duration(duration)
+ .attr("transform", function(d) { return "translate(" + source.y + "," + source.x + ")"; })
+ .style("opacity", 1e-6)
+ .remove();
+
+ // Update the links…
+ var link = vis.selectAll("path.link")
+ .data(tree.links(nodes), function(d) { return d.target.id; });
+
+ // Enter any new links at the parent's previous position.
+ link.enter().insert("svg:path", "g")
+ .attr("class", "link")
+ .attr("d", function(d) {
+ var o;
+ if (d.target.parent) {
+ o = {x: d.target.parent.x, y: d.target.parent.y};
+ }
+ else {
+ o = {x: source.x0, y: source.y0};
+ }
+ return diagonal({source: o, target: o});
+ })
+ .transition()
+ .duration(duration)
+ .attr("d", diagonal);
+
+ // Transition links to their new position.
+ link.transition()
+ .duration(duration)
+ .attr("d", diagonal);
+
+ // Transition exiting nodes to the parent's new position.
+ link.exit().transition()
+ .duration(duration)
+ .attr("d", function(d) {
+ var o;
+ if (d.target.parent) {
+ o = {x: d.target.parent.x, y: d.target.parent.y};
+ }
+ else {
+ o = {x: source.x, y: source.y};
+ }
+ return diagonal({source: o, target: o});
+ })
+ .remove();
+
+ // Stash the old positions for transition.
+ nodes.forEach(function(d) {
+ d.x0 = d.x;
+ d.y0 = d.y;
+ });
+}
+
+// Toggle children on click.
+function click(d) {
+ if (d.children) {
+ d._children = d.children;
+ d.children = null;
+ } else {
+ d.children = d._children;
+ d._children = null;
+ }
+ update(d);
+}
+
+function zoom() {
+ vis.attr("transform", "translate(" + d3.event.translate + ")scale(" + d3.event.scale + ")");
+};
+
+d3.select(self.frameElement).style("height", h+"px");
16 style.css
@@ -0,0 +1,16 @@
+
+text {
+ font-size:10px;
+ text-align: center;
+ width: 200px;
+}
+
+path.link {
+ fill: none;
+ stroke: #ccc;
+ stroke-width: 1.5px;
+}
+
+#chart svg {
+ outline: solid #ccc 1px;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.