Add getCollection method and a gitignore.