The Contents API is optimized for getting the contents of a path. As the note at the top of that section points out, the [Trees API][trees] can be used to get a list of files recursively. Does that help?

[trees]: http://developer.github.com/v3/git/trees/#get-a-tree-recursively