An API endpoint represents a directory structure of “cool images:” http://mrn-creed.cloudant.com/cool-images/3f6adfcb7cb3d0117e14062810715ece
Files look like:
{
"name": "dance", // {string} file’s name
"ext": "gif", // {string} file’s extension
"size": 615 // {number} file’s approximate size in kB
}
Directories look like:
{
"name": "favorite-images" // {string} directory’s name
"files": [ // {Object[]} collection of file/directory objects
// ...
]
}
Create a program that downloads and parses the data. It should output the following:
- List of names of all GIFs and JPEGs, including extensions
- List of the names of the largest and smallest file, including their size and extension
- List the names of all GIFs greater than
500
in size, including their path and extension
Bonus: create a tool that outputs the visual structure of the directories (like tree
).