neener / rails-github-api-v-000

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Working with APIs

Instructions

  1. 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.

  2. 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.

  3. Implement the create action in your RepositoriesController so that the form on index.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.
  1. 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.

About

License:Other


Languages

Language:Ruby 77.4%Language:HTML 16.0%Language:CSS 3.4%Language:JavaScript 2.0%Language:CoffeeScript 1.3%