Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
33bfc8a
get-persons first steps action & requiredOption
sebastianeliasb Jul 29, 2021
0f7098d
JSON data request
alvaromergar Jul 30, 2021
81bfde3
getPersonsRequest implemented
jonathancede Jul 30, 2021
c0599fc
Merge pull request #1 from sebastianeliasb/get-persons
jonathancede Jul 30, 2021
141f196
implemented the call to the get person function
jonathancede Aug 2, 2021
27f8537
spinner updated
jonathancede Aug 2, 2021
79c4fcf
implemented the request of getPerson function
jonathancede Aug 2, 2021
7771736
added constans file
jonathancede Aug 2, 2021
daa724d
updated getPersons function
jonathancede Aug 2, 2021
0588a8b
Merge pull request #2 from sebastianeliasb/get-person
jonathancede Aug 2, 2021
7d9aba1
getMoviesRequest function implemented
sebastianeliasb Aug 2, 2021
61acb5e
added app icon
jonathancede Aug 2, 2021
8c5d0ca
commands updated
jonathancede Aug 2, 2021
0614ec6
save and local commands implemented in get-persons command
jonathancede Aug 2, 2021
63b40c1
Merge pull request #3 from sebastianeliasb/get-persons-save-local
jonathancede Aug 2, 2021
b379c55
Merge branch 'main' into get-movies
sebastianeliasb Aug 2, 2021
5f81002
Othert staged changes
sebastianeliasb Aug 2, 2021
96c6694
Merge pull request #4 from sebastianeliasb/get-movies
sebastianeliasb Aug 2, 2021
8e66c04
finish single movie details
alvaromergar Aug 2, 2021
83c18e2
Save and local in getMovies implemented
sebastianeliasb Aug 2, 2021
a92b749
Merge pull request #5 from sebastianeliasb/get-movies-save-local
sebastianeliasb Aug 2, 2021
a157836
Merge branch 'main' into singleMovieDetails
jonathancede Aug 2, 2021
52af063
Merge pull request #6 from sebastianeliasb/singleMovieDetails
jonathancede Aug 2, 2021
bddf58f
added postman collection
jonathancede Aug 2, 2021
bb93547
ReadMe created
sebastianeliasb Aug 2, 2021
afa06c4
Merge branch 'main' of https://github.com/sebastianeliasb/node-movied…
jonathancede Aug 2, 2021
4cd7fc9
save and local implemented for person and movie
jonathancede Aug 3, 2021
ed06598
Merge pull request #7 from sebastianeliasb/get-person-movie-save-local
jonathancede Aug 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 37 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


`#node.js` `#master-in-software-engineering`

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
Expand All @@ -17,6 +19,7 @@ In this project you will learn how to create a cli app with Node.js.
- [Project requirements](#project-requirements)
- [Project delivery](#project-delivery)
- [Resources](#resources)
- [Command Line](#command-line)

## Getting Started

Expand Down Expand Up @@ -44,7 +47,7 @@ section.
The branches follow a naming strategy like the following:

- `main`: includes the main contents and the instructions
- `assembler-solution`: includes the solution


### Fetching All the Branches

Expand Down Expand Up @@ -78,14 +81,6 @@ Run the following command in your terminal after cloning the main repo:
$ npm install
```

### Running the Tests

The tests that validate your solution can be executed by runing the following
command:

```
$ npm run test
```

### Git `precommit` and `prepush` Hooks

Expand All @@ -103,41 +98,52 @@ In this pill we won't deploy the app.
- `prettier`
- `lint-staged`
- `husky`
- `Commander`
- `Ora`
- `Chalk`


## The Project

In this project you will build a cli app similar to the following screenshot.
In this project we have build an CLI command line using MovieDb's API.


## Command Line

You are required to use the following command line to execute the projects functions

<img src="src/img/app-view.png">
#### To fetch data

## Project requirements
- `./moviedb.js command... ---options... --flags...`
- `OUR OPTIONS`
- Get Persons
-p, --popular", "Fetch the popular persons"
--page ''<number>"
- Get Person
-i, --id <number>", "The id of the person
- Get Movies
-p, --popular", "Fetch the popular movies
-n, --now-playing", "Fetch the movies that are playing now
- Get Movie
-i, --id <number>", "The id of the movie
-r, --reviews", "Fetch the reviews of the movie

--save", "Save the data in a local file
--local", "Read the data from the local file

This is an overview of the main requirements of this project. The exact ones are
found in the doc that the academic team will provide you.

- You must follow all the instructions of the project step-by-step
- You should always try to solve them by yourself before asking for help
- You should always help your team members and fellow students of the master so
that you can all learn together and become better software developers and team
members
- You must finish all the steps that are marked as `Required`
- Once you are done, you can move on to the optional ones that are marked as
`Extra 💯`

## Project delivery

To deliver this project you must follow the steps indicated in the document:

- [Submitting a solution](https://www.notion.so/Submitting-a-solution-524dab1a71dd4b96903f26385e24cdb6)

## Resources

- See the document we provide

## License <!-- omit in toc -->

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
for details

## Contributors ✨ <!-- omit in toc -->

Expand All @@ -147,11 +153,11 @@ Thanks goes to these wonderful people
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="http://www.danilucaci.com"><img src="https://avatars.githubusercontent.com/u/19062818?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dani Lucaci</b></sub></a><br /><a href="https://github.com/assembler-school/vanilla-js-project-template/commits?author=danilucaci" title="Code">💻</a> <a href="https://github.com/assembler-school/vanilla-js-project-template/commits?author=danilucaci" title="Documentation">📖</a> <a href="#example-danilucaci" title="Examples">💡</a> <a href="#tool-danilucaci" title="Tools">🔧</a></td>
</tr>
</table>
<ul>
<li>Jonathan Cedeño
<li>Alvaro Merino
<li>Sebastian Brupbacher
</ul>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
Expand All @@ -160,4 +166,4 @@ Thanks goes to these wonderful people

This project follows the
[all-contributors](https://github.com/all-contributors/all-contributors)
specification. Contributions of any kind welcome!
specification. Contributions of any kind welcome!
190 changes: 190 additions & 0 deletions docs/MovieDB CLI.postman_collection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
{
"info": {
"_postman_id": "97fe2bcc-f30d-49c5-9a72-8ad1f34e71aa",
"name": "MovieDB CLI",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Get Persons",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.themoviedb.org/3/person/popular?page=3&api_key=68f9f55926a0797cb1d0996f1987c150",
"protocol": "https",
"host": [
"api",
"themoviedb",
"org"
],
"path": [
"3",
"person",
"popular"
],
"query": [
{
"key": "page",
"value": "3"
},
{
"key": "api_key",
"value": "68f9f55926a0797cb1d0996f1987c150"
}
]
}
},
"response": []
},
{
"name": "Get Individual Person",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.themoviedb.org/3/person/3?api_key=68f9f55926a0797cb1d0996f1987c150",
"protocol": "https",
"host": [
"api",
"themoviedb",
"org"
],
"path": [
"3",
"person",
"3"
],
"query": [
{
"key": "api_key",
"value": "68f9f55926a0797cb1d0996f1987c150"
}
]
}
},
"response": []
},
{
"name": "Get Movies",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.themoviedb.org/3/movie/popular?page=3&api_key=68f9f55926a0797cb1d0996f1987c150",
"protocol": "https",
"host": [
"api",
"themoviedb",
"org"
],
"path": [
"3",
"movie",
"popular"
],
"query": [
{
"key": "page",
"value": "3"
},
{
"key": "api_key",
"value": "68f9f55926a0797cb1d0996f1987c150"
}
]
}
},
"response": []
},
{
"name": "Get Movies Now Playing",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.themoviedb.org/3/movie/now_playing?page=3&api_key=68f9f55926a0797cb1d0996f1987c150",
"protocol": "https",
"host": [
"api",
"themoviedb",
"org"
],
"path": [
"3",
"movie",
"now_playing"
],
"query": [
{
"key": "page",
"value": "3"
},
{
"key": "api_key",
"value": "68f9f55926a0797cb1d0996f1987c150"
}
]
}
},
"response": []
},
{
"name": "Get Individual Movie",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.themoviedb.org/3/movie/3?api_key=68f9f55926a0797cb1d0996f1987c150",
"protocol": "https",
"host": [
"api",
"themoviedb",
"org"
],
"path": [
"3",
"movie",
"3"
],
"query": [
{
"key": "api_key",
"value": "68f9f55926a0797cb1d0996f1987c150"
}
]
}
},
"response": []
},
{
"name": "Get Individual Movie with Reviews",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.themoviedb.org/3/movie/3/reviews?api_key=68f9f55926a0797cb1d0996f1987c150",
"protocol": "https",
"host": [
"api",
"themoviedb",
"org"
],
"path": [
"3",
"movie",
"3",
"reviews"
],
"query": [
{
"key": "api_key",
"value": "68f9f55926a0797cb1d0996f1987c150"
}
]
}
},
"response": []
}
]
}
Binary file added files/app-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions files/movies folder/movie-reviews.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":9,"page":1,"results":[],"total_pages":0,"total_results":0}
1 change: 1 addition & 0 deletions files/movies folder/movie.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"adult":false,"backdrop_path":"/hQ4pYsIbP22TMXOUdSfC2mjWrO0.jpg","belongs_to_collection":null,"budget":0,"genres":[{"id":18,"name":"Drama"},{"id":80,"name":"Crime"},{"id":35,"name":"Comedy"}],"homepage":"","id":2,"imdb_id":"tt0094675","original_language":"fi","original_title":"Ariel","overview":"Taisto Kasurinen is a Finnish coal miner whose father has just committed suicide and who is framed for a crime he did not commit. In jail, he starts to dream about leaving the country and starting a new life. He escapes from prison but things don't go as planned...","popularity":7.237,"poster_path":"/ojDg0PGvs6R9xYFodRct2kdI6wC.jpg","production_companies":[{"id":2303,"logo_path":null,"name":"Villealfa Filmproductions","origin_country":"FI"}],"production_countries":[{"iso_3166_1":"FI","name":"Finland"}],"release_date":"1988-10-21","revenue":0,"runtime":73,"spoken_languages":[{"english_name":"German","iso_639_1":"de","name":"Deutsch"},{"english_name":"Finnish","iso_639_1":"fi","name":"suomi"}],"status":"Released","tagline":"","title":"Ariel","video":false,"vote_average":6.8,"vote_count":142}
Loading