Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
We'll set up the first feature of our GitHub client: the ability to search repositories. We'll use the wrapper library to pass our search parameter to GitHub, then use the results to display a list in our application.
GitHub API Documentation for Search
HTTP Basics: Sending Data with a GET Request
Github API Easy Access Library Basic usage
The head of the library is the Milo\Github\Api class. Within this class you access the API by GET, POST, HEAD, PUT ... HTTP methods.
$api = new Milo\Github\Api;
# Get all available emoticon URLs example
$response = $api->get('/emojis');
$emojis = $api->decode($response);
# Render a Markdown document example
$data = [
'text' => 'Check out this commit e41d17e4a4a9e5368e018fcac44ff42155bc8738',
'mode' => 'gfm',
'context' => 'milo/github-api',
];
$response = $api->post('/markdown', $data);
$html = $api->decode($response);
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Harry Welchman
19,360 Points0 Answers
-
PLUS
Daniel Amazigo
Courses Plus Student 11,357 Points0 Answers
-
MOD
Jonathan Grieve
Treehouse Moderator 91,254 Points2 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up