Created
May 14, 2012 01:53
-
-
Save sergiobuj/2691257 to your computer and use it in GitHub Desktop.
Possible API description for Symptoms Checker App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///// request 1, fetch pet symptoms in http://link.to.pets/in.json | |
{ | |
"petparts": [ | |
{ | |
"partname": "tail", | |
"symptoms": [ | |
{ | |
"id": 1, | |
"name": "long tail" | |
}, | |
{ | |
"id": 2, | |
"name": "hairy tail" | |
}, | |
{ | |
"id": 3, | |
"name": "smelly tail" | |
} | |
] | |
}, | |
{ | |
"partname": "nose", | |
"symptoms": [ | |
{ | |
"id": 1, | |
"name": "long nose" | |
}, | |
{ | |
"id": 2, | |
"name": "hairy nose" | |
}, | |
{ | |
"id": 3, | |
"name": "smelly nose" | |
} | |
] | |
} | |
], | |
"url": "http://url.to.fetch/articles/for.pet/pet.part/with/set.of.symptoms" | |
} | |
///// request 2, fetch articles from set of symptoms | |
{ | |
"articles":[ | |
{ | |
"id": 1, | |
"name": "about noses", | |
"description": "something short about the article", | |
"url": "http://link.to.article/in.plain.txt" | |
}, | |
{ | |
"id": 2, | |
"name": "more about noses", | |
"description": "how to clean noses", | |
"url": "http://link.to.article/in.plain.txt" | |
}, | |
{ | |
"id": 3, | |
"name": "long noses?", | |
"description": "general information and daily care", | |
"url": "http://link.to.article/in.plain.txt" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment