-
Refer to this tutorial and the Github OAuth documentation to implement authentication with the GitHub API. Display the current user's username on the
index
page in a heading. -
On the repositories
index
page, display a list of the current user's repositories. Displaying only the first page of results is fine; feel free to tackle pagination as a bonus. -
Implement the
create
action in yourRepositoriesController
so that the form onindex.html.erb
successfully creates a new repository for the current user. The form input should be the name of the new repository. Redirect back to'/'
.
- Note: The Github API requires the body of the POST be valid JSON.
- Your solution will "make it work", but we want to move the API calls out of the controllers. Once the tests pass, learn how to refactor your code in the next lab. This is important – don't skip it!
View Working with APIs on Learn.co and start learning to code for free.