Skip to content

Commit 9881c53

Browse files
committed
changed json homework
1 parent 4913723 commit 9881c53

4 files changed

Lines changed: 20 additions & 17 deletions

File tree

Week4/MAKEME.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,21 @@
66
Give yourself (or your neighbor) a little tap on the shoulder, you've made it to JS2! :muscle:
77

88
## Step 1: Some Challenges
9-
Let's practise working with Objects and Arrays. Go to FreeCodeCamp and complete all challenges under "Object Oriented and Functional Programming" and the _first four challenges_ under "Basic Algorithm Scripting", up until 'Find the longest word in a string.'
9+
Let's practice working with Objects and Arrays. Go to FreeCodeCamp and complete all challenges under "Object Oriented and Functional Programming" and the _first four challenges_ under "Basic Algorithm Scripting", up until 'Find the longest word in a string.'
1010

1111
## Step 2: Custom challenge
12-
1. Go to http://www.omdbapi.com/?s=dog and change the word dog in the url to a different common word. You will get as a result, a list of movies with this word in the title. Make sure you get at least 5 results.
13-
2. You can copy the JSON and put it in a string at the top of your js file. Print the title of the 3rd movie in the array to the console.
14-
3. Make a ul with a li for each title (just like you did with the books in the previous assignment
15-
4. Use CSS to divide the page in two columns. The left column will have a list of the titles for each movie. The right column will have all the information listed for each movie.
16-
5. Replace the "Poster" property with the actual image of the poster. If you do this correctly, in the right column there will be a picture for each movie.
17-
6. Use the imdbID to create an URL to the IMDB page for that movie (hint: IMDB urls always look like this http://www.imdb.com/title/[imdbId] where [imdbId] would be replaced by the actual Id. If you do this correctly, each movie will have a link to its own IMDB page. Make sure the link opens in a new tab
12+
1. Go to https://api.github.com/orgs/HackYourFuture/repos, you will see a list of the repositories our HYF organization has (yes it's a lot of JSON).
13+
2. You can copy the JSON and put it in a string at the top of your `.js` file. Print the name of the 3rd repository in the array to the console.
14+
3. Make a `<ul>` with a `<li>` for each repository name (just like you did with the books in the previous assignment).
15+
4. It should only display the modules that are actually being used in the curriculum at the moment, you of course know which those are, but if you need a reminder you can find them in our [curriculum overview](https://github.com/HackYourFuture/curriculum).
16+
5. Use CSS to divide the page in two columns. The left column will have a list of the names for repository. The right column should have the following information about each repository: the number of `stargazers`, the number of `watchers`, the number of `forks`, the `language` of the repository.
17+
6. place the `avatar_url` (logo) of our organization somewhere on a nice place in your page.
1818

19-
## Step 3:
19+
## Step 3: Feedback
2020

2121
Give one of you fellow students in Github feedback about their code of step two, create an issue in their repo, telling them what they did great and what they can improve.
2222

23-
## Step 4: Almost there...
24-
25-
Created a function `sortByImdbRating(movies)` to sort the list of movies by IMDB rating.
26-
27-
### :boom: Bonus homework :boom:
23+
<!-- ### :boom: Bonus homework :boom:
2824
2925
Replace this function by a generalised version that takes the name of the property (`propName`) to sort on and a number `order` (allowed values 1 or -1, default value = 1) to indicate respectively ascending or descending sort order:
3026
@@ -46,7 +42,7 @@ movies = sortMovies(movies, 'imdbRating', -1);
4642
Notes:
4743
4844
1. Do not bother to make this work for the `Ratings` property which refers to an object rather than a simple value.
49-
2. It is not necessary to convert property values containing dates or numbers formatted with embedded commas to facilitate sorting for this challenge (but you're welcome to try). You can leave the value 'as is'.
45+
2. It is not necessary to convert property values containing dates or numbers formatted with embedded commas to facilitate sorting for this challenge (but you're welcome to try). You can leave the value 'as is'. -->
5046

5147
:octocat:
5248
```

Week4/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
```
77
In week five we will discuss the following topics:
8-
Second Git Session :see_no_evil:<br>
8+
First Git Session
99
• Events
1010
• Callbacks
1111
• XHTTP Requests

Week5/MAKEME.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@
1313
4. Merge `MyBranch` with the `master` branch
1414

1515
### JS
16+
We are going to continue our github-repo page from last week.
1617

17-
1. Extend the `hyf-movies` app with an input element. This is so the user will be able to type in text which will be later used to search the movie database for corresponding movies.
18+
1. For each repository, show (in the right column) who the contributers are. You will need to use the `contributors_url` for this.
19+
2. Make all the repositories link their own page in Github. Use the value of the key: `name` to make this work (hint: Github urls always look like this https://api.github.com/repos/HackYourFuture/[repositoryName] where [repositoryName] would be replaced by the actual `name` of the repository, for example `CommandLine`). Make sure the link opens in a new tab.
20+
21+
>TODO
22+
23+
<!-- 1. Extend the `hyf-movies` app with an input element. This is so the user will be able to type in text which will be later used to search the movie database for corresponding movies.
1824
1925
2. Also place a button near the input element. Capture the click even for this button and couple it to a function which grabs the user input from the text field and which initially logs the user input.
2026
@@ -30,7 +36,7 @@
3036
3137
3238
__Bonus__: Write a function takes this array `['a', 'b', 'c', 'd', 'a', 'e', 'f', 'c']` and returns an array which only has unique values in it (so it removes the duplicate ones). Make it a 'smart' algorithm that could do it for every array (only strings/number). Try to make it as fast as possible!
33-
39+
-->
3440

3541
### More homework
3642

Week5/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
```
44
In week six we will discuss the following topics:
5+
• Second Git Session
56
• Async VS Sync
67
• Polling
78
• Structure for a basic SPA

0 commit comments

Comments
 (0)