Skip to content

Instantly share code, notes, and snippets.

@sergiobuj
Created May 14, 2012 01:53
Show Gist options
  • Save sergiobuj/2691257 to your computer and use it in GitHub Desktop.
Save sergiobuj/2691257 to your computer and use it in GitHub Desktop.
Possible API description for Symptoms Checker App
///// 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