├── .gitignore
├── README.md
├── package.json
├── public
├── favicon.ico
├── index.html
├── logo192.png
├── logo512.png
├── manifest.json
└── robots.txt
└── src
├── App.css
├── App.js
├── components
├── CharacterCard
│ ├── index.js
│ └── styles.css
└── Loading
│ ├── index.js
│ └── styles.css
├── index.css
├── index.js
├── logo.svg
├── reportWebVitals.js
├── setupTests.js
└── tests
├── App.test.js
└── mocks.js
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | lerna-debug.log*
8 |
9 | # Diagnostic reports (https://nodejs.org/api/report.html)
10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11 |
12 | # Runtime data
13 | pids
14 | *.pid
15 | *.seed
16 | *.pid.lock
17 |
18 | # Directory for instrumented libs generated by jscoverage/JSCover
19 | lib-cov
20 |
21 | # Coverage directory used by tools like istanbul
22 | coverage
23 | *.lcov
24 |
25 | # nyc test coverage
26 | .nyc_output
27 |
28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29 | .grunt
30 |
31 | # Bower dependency directory (https://bower.io/)
32 | bower_components
33 |
34 | # node-waf configuration
35 | .lock-wscript
36 |
37 | # Compiled binary addons (https://nodejs.org/api/addons.html)
38 | build/Release
39 |
40 | # Dependency directories
41 | node_modules/
42 | jspm_packages/
43 |
44 | # TypeScript v1 declaration files
45 | typings/
46 |
47 | # TypeScript cache
48 | *.tsbuildinfo
49 |
50 | # Optional npm cache directory
51 | .npm
52 |
53 | # Optional eslint cache
54 | .eslintcache
55 |
56 | # Microbundle cache
57 | .rpt2_cache/
58 | .rts2_cache_cjs/
59 | .rts2_cache_es/
60 | .rts2_cache_umd/
61 |
62 | # Optional REPL history
63 | .node_repl_history
64 |
65 | # Output of 'npm pack'
66 | *.tgz
67 |
68 | # Yarn Integrity file
69 | .yarn-integrity
70 |
71 | # dotenv environment variables file
72 | .env
73 | .env.test
74 |
75 | # parcel-bundler cache (https://parceljs.org/)
76 | .cache
77 |
78 | # Next.js build output
79 | .next
80 |
81 | # Nuxt.js build / generate output
82 | .nuxt
83 | dist
84 |
85 | # Gatsby files
86 | .cache/
87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js
88 | # https://nextjs.org/blog/next-9-1#public-directory-support
89 | # public
90 |
91 | # vuepress build output
92 | .vuepress/dist
93 |
94 | # Serverless directories
95 | .serverless/
96 |
97 | # FuseBox cache
98 | .fusebox/
99 |
100 | # DynamoDB Local files
101 | .dynamodb/
102 |
103 | # TernJS port file
104 | .tern-port
105 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
106 |
107 | # dependencies
108 | /node_modules
109 | /.pnp
110 | .pnp.js
111 |
112 | # testing
113 | /coverage
114 |
115 | # production
116 | /build
117 |
118 | # misc
119 | .DS_Store
120 | .env.local
121 | .env.development.local
122 | .env.test.local
123 | .env.production.local
124 |
125 | npm-debug.log*
126 | yarn-debug.log*
127 | yarn-error.log*
128 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # React and Mocky
2 |
3 | Nessa aplicação nós utilizamos a [API do Rick and Morty](https://rickandmortyapi.com/) para buscar os personagens. O endpoint utilizado é o `https://rickandmortyapi.com/api/character`
4 |
5 | O objetivo é escrever os testes para a aplicação utilizando o RTL - React Testing Library. Todos os testes devem utilizar o `ByRole`
6 |
7 |
8 | ### Setup para os testes
9 |
10 | ***A primeira coisa que deve ser feita antes de escrever os testes, é realizar o mock da função fetch.***
11 |
12 | Esse mock deve ser feito dentro do `beforeEach()` antes de chamar a função `render()`. A resposta da API que vai ser mockada está dentro da pasta `/tests/mocks.js`. Basta importar o `responseAPI` e utilizar da maneira que achar necessário.
13 |
14 |
15 |
16 | ### Teste 1
17 |
18 | Verificar se ao renderizar o App aparece um card com um `h3` escrito "Rick Sanchez" dentro.
19 |
20 | ### Teste 2
21 |
22 | Verificar se ao renderizar o App está presente na tela o `input` de texto e o `button` com o texto "Buscar"
23 |
24 | ### Teste 3
25 |
26 | Verificar se ao buscar pelo nome "smith" aparecem 4 cards na tela.
27 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-and-mocky",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.11.4",
7 | "@testing-library/react": "^11.1.0",
8 | "@testing-library/user-event": "^12.1.10",
9 | "react": "^17.0.2",
10 | "react-dom": "^17.0.2",
11 | "react-scripts": "4.0.3",
12 | "web-vitals": "^1.0.1"
13 | },
14 | "scripts": {
15 | "start": "react-scripts start",
16 | "build": "react-scripts build",
17 | "test": "react-scripts test",
18 | "eject": "react-scripts eject"
19 | },
20 | "eslintConfig": {
21 | "extends": [
22 | "react-app",
23 | "react-app/jest"
24 | ]
25 | },
26 | "browserslist": {
27 | "production": [
28 | ">0.2%",
29 | "not dead",
30 | "not op_mini all"
31 | ],
32 | "development": [
33 | "last 1 chrome version",
34 | "last 1 firefox version",
35 | "last 1 safari version"
36 | ]
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tryber/react-and-mocky/57c0b56c5327819ed26a4ae14186ac675ecfc1a1/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
17 |
18 |
27 | React App
28 |
29 |
30 |
31 |
32 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tryber/react-and-mocky/57c0b56c5327819ed26a4ae14186ac675ecfc1a1/public/logo192.png
--------------------------------------------------------------------------------
/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tryber/react-and-mocky/57c0b56c5327819ed26a4ae14186ac675ecfc1a1/public/logo512.png
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/src/App.css:
--------------------------------------------------------------------------------
1 | *{
2 | margin: 0;
3 | padding: 0;
4 | box-sizing: border-box;
5 | }
6 |
7 | html, body, #root {
8 | width: 100vw;
9 | height: 100vh;
10 | display: flex;
11 | justify-content: center;
12 | align-items: center;
13 | }
14 | .App{
15 | width: 100vw;
16 | height: 100vh;
17 | }
18 |
19 | input[type=text]{
20 | padding: 1rem;
21 | width:70%;
22 | font-size: 14px !important;
23 | }
24 | button {
25 | background-color: #2d6a4f;
26 | width: 30%;
27 | padding: 1rem;
28 | color: white;
29 | cursor: pointer;
30 | }
31 |
32 | button:hover{
33 | background-color: #40916c;
34 | }
35 |
36 | .card-list{
37 | width: 100%;
38 | display: flex;
39 | align-items: center;
40 | justify-content: space-evenly;
41 | flex-wrap: wrap;
42 | }
43 |
44 | form {
45 | margin: 3rem auto 1rem auto;
46 | width: 50%;
47 | }
--------------------------------------------------------------------------------
/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import './App.css';
3 | import CharacterCard from './components/CharacterCard';
4 | import Loading from './components/Loading';
5 |
6 | class App extends React.Component {
7 | constructor(props){
8 | super(props);
9 | this.state={
10 | characters:[],
11 | filteredCharacters:[],
12 | isLoading:true,
13 | search:''
14 | }
15 | }
16 | getCharacters = async () => {
17 | const endpoint = 'https://rickandmortyapi.com/api/character';
18 | const {results} = await fetch(endpoint).then(response => response.json())
19 | this.setState({isLoading:false, characters:results, filteredCharacters:results})
20 | }
21 |
22 |
23 | componentDidMount(){
24 | this.getCharacters()
25 | }
26 |
27 | handleOnChange = ({target:{value}}) => {
28 | this.setState({search:value})
29 | }
30 |
31 | handleFilterCharacters = (e) => {
32 | e.preventDefault()
33 | const { characters, search} = this.state;
34 | const filteredArray = characters.filter(({name})=> name.toUpperCase().includes(search.toUpperCase()))
35 | this.setState({filteredCharacters:filteredArray})
36 | }
37 |
38 | render(){
39 | const {filteredCharacters, isLoading} = this.state
40 | return (
41 |
42 |
46 | {
47 | isLoading ? :
48 |
49 | {filteredCharacters.map(item=> )}
50 |
51 | }
52 |
53 | );
54 | }
55 | }
56 |
57 | export default App;
58 |
--------------------------------------------------------------------------------
/src/components/CharacterCard/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import './styles.css'
3 | class CharacterCard extends React.Component {
4 | render(){
5 | const { character : {name, image, status}} = this.props
6 | return(
7 |
8 |
9 | {name}
10 | {status}
11 |
12 | )
13 | }
14 | }
15 | export default CharacterCard;
--------------------------------------------------------------------------------
/src/components/CharacterCard/styles.css:
--------------------------------------------------------------------------------
1 | .card{
2 | max-width: 350px;
3 | width: 100%;
4 | margin: 2rem 0;
5 |
6 | }
7 |
8 | .card-name{
9 | color:#2d6a4f;
10 |
11 | }
--------------------------------------------------------------------------------
/src/components/Loading/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import './styles.css'
3 | class Loading extends React.Component{
4 | render(){
5 | return(
6 | Carregando...
7 | )
8 | }
9 | }
10 | export default Loading
--------------------------------------------------------------------------------
/src/components/Loading/styles.css:
--------------------------------------------------------------------------------
1 | .loading {
2 |
3 | }
--------------------------------------------------------------------------------
/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import reportWebVitals from './reportWebVitals';
6 |
7 | ReactDOM.render(
8 |
9 |
10 | ,
11 | document.getElementById('root')
12 | );
13 |
14 | // If you want to start measuring performance in your app, pass a function
15 | // to log results (for example: reportWebVitals(console.log))
16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17 | reportWebVitals();
18 |
--------------------------------------------------------------------------------
/src/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/reportWebVitals.js:
--------------------------------------------------------------------------------
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
7 | getLCP(onPerfEntry);
8 | getTTFB(onPerfEntry);
9 | });
10 | }
11 | };
12 |
13 | export default reportWebVitals;
14 |
--------------------------------------------------------------------------------
/src/setupTests.js:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------
/src/tests/App.test.js:
--------------------------------------------------------------------------------
1 | import { render, screen } from '@testing-library/react';
2 | import App from '../App';
3 |
4 | describe('Test Rick & Morty API', () => {
5 |
6 | beforeEach(()=>{
7 | //Fazer o mock do fetch aqui
8 |
9 | render()
10 | })
11 |
12 | test('Verifica se aparece o card com titulo de "Rick Sanchez"', () => {
13 |
14 | })
15 |
16 | test('Verifica se existem o input de texto e o botão "Buscar"', () => {
17 |
18 | })
19 |
20 | test('Verifica se ao buscar por "Smith" aparecem 4 cards', () => {
21 |
22 | })
23 |
24 | })
25 |
--------------------------------------------------------------------------------
/src/tests/mocks.js:
--------------------------------------------------------------------------------
1 | const responseAPI = {
2 | "info": {
3 | "count": 826,
4 | "pages": 42,
5 | "next": "https://rickandmortyapi.com/api/character?page=2",
6 | "prev": null
7 | },
8 | "results": [
9 | {
10 | "id": 1,
11 | "name": "Rick Sanchez",
12 | "status": "Alive",
13 | "species": "Human",
14 | "type": "",
15 | "gender": "Male",
16 | "origin": {
17 | "name": "Earth (C-137)",
18 | "url": "https://rickandmortyapi.com/api/location/1"
19 | },
20 | "location": {
21 | "name": "Citadel of Ricks",
22 | "url": "https://rickandmortyapi.com/api/location/3"
23 | },
24 | "image": "https://rickandmortyapi.com/api/character/avatar/1.jpeg",
25 | "episode": [
26 | "https://rickandmortyapi.com/api/episode/1",
27 | "https://rickandmortyapi.com/api/episode/2",
28 | "https://rickandmortyapi.com/api/episode/3",
29 | "https://rickandmortyapi.com/api/episode/4",
30 | "https://rickandmortyapi.com/api/episode/5",
31 | "https://rickandmortyapi.com/api/episode/6",
32 | "https://rickandmortyapi.com/api/episode/7",
33 | "https://rickandmortyapi.com/api/episode/8",
34 | "https://rickandmortyapi.com/api/episode/9",
35 | "https://rickandmortyapi.com/api/episode/10",
36 | "https://rickandmortyapi.com/api/episode/11",
37 | "https://rickandmortyapi.com/api/episode/12",
38 | "https://rickandmortyapi.com/api/episode/13",
39 | "https://rickandmortyapi.com/api/episode/14",
40 | "https://rickandmortyapi.com/api/episode/15",
41 | "https://rickandmortyapi.com/api/episode/16",
42 | "https://rickandmortyapi.com/api/episode/17",
43 | "https://rickandmortyapi.com/api/episode/18",
44 | "https://rickandmortyapi.com/api/episode/19",
45 | "https://rickandmortyapi.com/api/episode/20",
46 | "https://rickandmortyapi.com/api/episode/21",
47 | "https://rickandmortyapi.com/api/episode/22",
48 | "https://rickandmortyapi.com/api/episode/23",
49 | "https://rickandmortyapi.com/api/episode/24",
50 | "https://rickandmortyapi.com/api/episode/25",
51 | "https://rickandmortyapi.com/api/episode/26",
52 | "https://rickandmortyapi.com/api/episode/27",
53 | "https://rickandmortyapi.com/api/episode/28",
54 | "https://rickandmortyapi.com/api/episode/29",
55 | "https://rickandmortyapi.com/api/episode/30",
56 | "https://rickandmortyapi.com/api/episode/31",
57 | "https://rickandmortyapi.com/api/episode/32",
58 | "https://rickandmortyapi.com/api/episode/33",
59 | "https://rickandmortyapi.com/api/episode/34",
60 | "https://rickandmortyapi.com/api/episode/35",
61 | "https://rickandmortyapi.com/api/episode/36",
62 | "https://rickandmortyapi.com/api/episode/37",
63 | "https://rickandmortyapi.com/api/episode/38",
64 | "https://rickandmortyapi.com/api/episode/39",
65 | "https://rickandmortyapi.com/api/episode/40",
66 | "https://rickandmortyapi.com/api/episode/41",
67 | "https://rickandmortyapi.com/api/episode/42",
68 | "https://rickandmortyapi.com/api/episode/43",
69 | "https://rickandmortyapi.com/api/episode/44",
70 | "https://rickandmortyapi.com/api/episode/45",
71 | "https://rickandmortyapi.com/api/episode/46",
72 | "https://rickandmortyapi.com/api/episode/47",
73 | "https://rickandmortyapi.com/api/episode/48",
74 | "https://rickandmortyapi.com/api/episode/49",
75 | "https://rickandmortyapi.com/api/episode/50",
76 | "https://rickandmortyapi.com/api/episode/51"
77 | ],
78 | "url": "https://rickandmortyapi.com/api/character/1",
79 | "created": "2017-11-04T18:48:46.250Z"
80 | },
81 | {
82 | "id": 2,
83 | "name": "Morty Smith",
84 | "status": "Alive",
85 | "species": "Human",
86 | "type": "",
87 | "gender": "Male",
88 | "origin": {
89 | "name": "unknown",
90 | "url": ""
91 | },
92 | "location": {
93 | "name": "Citadel of Ricks",
94 | "url": "https://rickandmortyapi.com/api/location/3"
95 | },
96 | "image": "https://rickandmortyapi.com/api/character/avatar/2.jpeg",
97 | "episode": [
98 | "https://rickandmortyapi.com/api/episode/1",
99 | "https://rickandmortyapi.com/api/episode/2",
100 | "https://rickandmortyapi.com/api/episode/3",
101 | "https://rickandmortyapi.com/api/episode/4",
102 | "https://rickandmortyapi.com/api/episode/5",
103 | "https://rickandmortyapi.com/api/episode/6",
104 | "https://rickandmortyapi.com/api/episode/7",
105 | "https://rickandmortyapi.com/api/episode/8",
106 | "https://rickandmortyapi.com/api/episode/9",
107 | "https://rickandmortyapi.com/api/episode/10",
108 | "https://rickandmortyapi.com/api/episode/11",
109 | "https://rickandmortyapi.com/api/episode/12",
110 | "https://rickandmortyapi.com/api/episode/13",
111 | "https://rickandmortyapi.com/api/episode/14",
112 | "https://rickandmortyapi.com/api/episode/15",
113 | "https://rickandmortyapi.com/api/episode/16",
114 | "https://rickandmortyapi.com/api/episode/17",
115 | "https://rickandmortyapi.com/api/episode/18",
116 | "https://rickandmortyapi.com/api/episode/19",
117 | "https://rickandmortyapi.com/api/episode/20",
118 | "https://rickandmortyapi.com/api/episode/21",
119 | "https://rickandmortyapi.com/api/episode/22",
120 | "https://rickandmortyapi.com/api/episode/23",
121 | "https://rickandmortyapi.com/api/episode/24",
122 | "https://rickandmortyapi.com/api/episode/25",
123 | "https://rickandmortyapi.com/api/episode/26",
124 | "https://rickandmortyapi.com/api/episode/27",
125 | "https://rickandmortyapi.com/api/episode/28",
126 | "https://rickandmortyapi.com/api/episode/29",
127 | "https://rickandmortyapi.com/api/episode/30",
128 | "https://rickandmortyapi.com/api/episode/31",
129 | "https://rickandmortyapi.com/api/episode/32",
130 | "https://rickandmortyapi.com/api/episode/33",
131 | "https://rickandmortyapi.com/api/episode/34",
132 | "https://rickandmortyapi.com/api/episode/35",
133 | "https://rickandmortyapi.com/api/episode/36",
134 | "https://rickandmortyapi.com/api/episode/37",
135 | "https://rickandmortyapi.com/api/episode/38",
136 | "https://rickandmortyapi.com/api/episode/39",
137 | "https://rickandmortyapi.com/api/episode/40",
138 | "https://rickandmortyapi.com/api/episode/41",
139 | "https://rickandmortyapi.com/api/episode/42",
140 | "https://rickandmortyapi.com/api/episode/43",
141 | "https://rickandmortyapi.com/api/episode/44",
142 | "https://rickandmortyapi.com/api/episode/45",
143 | "https://rickandmortyapi.com/api/episode/46",
144 | "https://rickandmortyapi.com/api/episode/47",
145 | "https://rickandmortyapi.com/api/episode/48",
146 | "https://rickandmortyapi.com/api/episode/49",
147 | "https://rickandmortyapi.com/api/episode/50",
148 | "https://rickandmortyapi.com/api/episode/51"
149 | ],
150 | "url": "https://rickandmortyapi.com/api/character/2",
151 | "created": "2017-11-04T18:50:21.651Z"
152 | },
153 | {
154 | "id": 3,
155 | "name": "Summer Smith",
156 | "status": "Alive",
157 | "species": "Human",
158 | "type": "",
159 | "gender": "Female",
160 | "origin": {
161 | "name": "Earth (Replacement Dimension)",
162 | "url": "https://rickandmortyapi.com/api/location/20"
163 | },
164 | "location": {
165 | "name": "Earth (Replacement Dimension)",
166 | "url": "https://rickandmortyapi.com/api/location/20"
167 | },
168 | "image": "https://rickandmortyapi.com/api/character/avatar/3.jpeg",
169 | "episode": [
170 | "https://rickandmortyapi.com/api/episode/6",
171 | "https://rickandmortyapi.com/api/episode/7",
172 | "https://rickandmortyapi.com/api/episode/8",
173 | "https://rickandmortyapi.com/api/episode/9",
174 | "https://rickandmortyapi.com/api/episode/10",
175 | "https://rickandmortyapi.com/api/episode/11",
176 | "https://rickandmortyapi.com/api/episode/12",
177 | "https://rickandmortyapi.com/api/episode/14",
178 | "https://rickandmortyapi.com/api/episode/15",
179 | "https://rickandmortyapi.com/api/episode/16",
180 | "https://rickandmortyapi.com/api/episode/17",
181 | "https://rickandmortyapi.com/api/episode/18",
182 | "https://rickandmortyapi.com/api/episode/19",
183 | "https://rickandmortyapi.com/api/episode/20",
184 | "https://rickandmortyapi.com/api/episode/21",
185 | "https://rickandmortyapi.com/api/episode/22",
186 | "https://rickandmortyapi.com/api/episode/23",
187 | "https://rickandmortyapi.com/api/episode/24",
188 | "https://rickandmortyapi.com/api/episode/25",
189 | "https://rickandmortyapi.com/api/episode/26",
190 | "https://rickandmortyapi.com/api/episode/27",
191 | "https://rickandmortyapi.com/api/episode/29",
192 | "https://rickandmortyapi.com/api/episode/30",
193 | "https://rickandmortyapi.com/api/episode/31",
194 | "https://rickandmortyapi.com/api/episode/32",
195 | "https://rickandmortyapi.com/api/episode/33",
196 | "https://rickandmortyapi.com/api/episode/34",
197 | "https://rickandmortyapi.com/api/episode/35",
198 | "https://rickandmortyapi.com/api/episode/36",
199 | "https://rickandmortyapi.com/api/episode/38",
200 | "https://rickandmortyapi.com/api/episode/39",
201 | "https://rickandmortyapi.com/api/episode/40",
202 | "https://rickandmortyapi.com/api/episode/41",
203 | "https://rickandmortyapi.com/api/episode/42",
204 | "https://rickandmortyapi.com/api/episode/43",
205 | "https://rickandmortyapi.com/api/episode/44",
206 | "https://rickandmortyapi.com/api/episode/45",
207 | "https://rickandmortyapi.com/api/episode/46",
208 | "https://rickandmortyapi.com/api/episode/47",
209 | "https://rickandmortyapi.com/api/episode/48",
210 | "https://rickandmortyapi.com/api/episode/49",
211 | "https://rickandmortyapi.com/api/episode/51"
212 | ],
213 | "url": "https://rickandmortyapi.com/api/character/3",
214 | "created": "2017-11-04T19:09:56.428Z"
215 | },
216 | {
217 | "id": 4,
218 | "name": "Beth Smith",
219 | "status": "Alive",
220 | "species": "Human",
221 | "type": "",
222 | "gender": "Female",
223 | "origin": {
224 | "name": "Earth (Replacement Dimension)",
225 | "url": "https://rickandmortyapi.com/api/location/20"
226 | },
227 | "location": {
228 | "name": "Earth (Replacement Dimension)",
229 | "url": "https://rickandmortyapi.com/api/location/20"
230 | },
231 | "image": "https://rickandmortyapi.com/api/character/avatar/4.jpeg",
232 | "episode": [
233 | "https://rickandmortyapi.com/api/episode/6",
234 | "https://rickandmortyapi.com/api/episode/7",
235 | "https://rickandmortyapi.com/api/episode/8",
236 | "https://rickandmortyapi.com/api/episode/9",
237 | "https://rickandmortyapi.com/api/episode/10",
238 | "https://rickandmortyapi.com/api/episode/11",
239 | "https://rickandmortyapi.com/api/episode/12",
240 | "https://rickandmortyapi.com/api/episode/14",
241 | "https://rickandmortyapi.com/api/episode/15",
242 | "https://rickandmortyapi.com/api/episode/16",
243 | "https://rickandmortyapi.com/api/episode/18",
244 | "https://rickandmortyapi.com/api/episode/19",
245 | "https://rickandmortyapi.com/api/episode/20",
246 | "https://rickandmortyapi.com/api/episode/21",
247 | "https://rickandmortyapi.com/api/episode/22",
248 | "https://rickandmortyapi.com/api/episode/23",
249 | "https://rickandmortyapi.com/api/episode/24",
250 | "https://rickandmortyapi.com/api/episode/25",
251 | "https://rickandmortyapi.com/api/episode/26",
252 | "https://rickandmortyapi.com/api/episode/27",
253 | "https://rickandmortyapi.com/api/episode/28",
254 | "https://rickandmortyapi.com/api/episode/29",
255 | "https://rickandmortyapi.com/api/episode/30",
256 | "https://rickandmortyapi.com/api/episode/31",
257 | "https://rickandmortyapi.com/api/episode/32",
258 | "https://rickandmortyapi.com/api/episode/33",
259 | "https://rickandmortyapi.com/api/episode/34",
260 | "https://rickandmortyapi.com/api/episode/35",
261 | "https://rickandmortyapi.com/api/episode/36",
262 | "https://rickandmortyapi.com/api/episode/38",
263 | "https://rickandmortyapi.com/api/episode/39",
264 | "https://rickandmortyapi.com/api/episode/40",
265 | "https://rickandmortyapi.com/api/episode/41",
266 | "https://rickandmortyapi.com/api/episode/42",
267 | "https://rickandmortyapi.com/api/episode/43",
268 | "https://rickandmortyapi.com/api/episode/44",
269 | "https://rickandmortyapi.com/api/episode/45",
270 | "https://rickandmortyapi.com/api/episode/46",
271 | "https://rickandmortyapi.com/api/episode/47",
272 | "https://rickandmortyapi.com/api/episode/48",
273 | "https://rickandmortyapi.com/api/episode/49",
274 | "https://rickandmortyapi.com/api/episode/51"
275 | ],
276 | "url": "https://rickandmortyapi.com/api/character/4",
277 | "created": "2017-11-04T19:22:43.665Z"
278 | },
279 | {
280 | "id": 5,
281 | "name": "Jerry Smith",
282 | "status": "Alive",
283 | "species": "Human",
284 | "type": "",
285 | "gender": "Male",
286 | "origin": {
287 | "name": "Earth (Replacement Dimension)",
288 | "url": "https://rickandmortyapi.com/api/location/20"
289 | },
290 | "location": {
291 | "name": "Earth (Replacement Dimension)",
292 | "url": "https://rickandmortyapi.com/api/location/20"
293 | },
294 | "image": "https://rickandmortyapi.com/api/character/avatar/5.jpeg",
295 | "episode": [
296 | "https://rickandmortyapi.com/api/episode/6",
297 | "https://rickandmortyapi.com/api/episode/7",
298 | "https://rickandmortyapi.com/api/episode/8",
299 | "https://rickandmortyapi.com/api/episode/9",
300 | "https://rickandmortyapi.com/api/episode/10",
301 | "https://rickandmortyapi.com/api/episode/11",
302 | "https://rickandmortyapi.com/api/episode/12",
303 | "https://rickandmortyapi.com/api/episode/13",
304 | "https://rickandmortyapi.com/api/episode/14",
305 | "https://rickandmortyapi.com/api/episode/15",
306 | "https://rickandmortyapi.com/api/episode/16",
307 | "https://rickandmortyapi.com/api/episode/18",
308 | "https://rickandmortyapi.com/api/episode/19",
309 | "https://rickandmortyapi.com/api/episode/20",
310 | "https://rickandmortyapi.com/api/episode/21",
311 | "https://rickandmortyapi.com/api/episode/22",
312 | "https://rickandmortyapi.com/api/episode/23",
313 | "https://rickandmortyapi.com/api/episode/26",
314 | "https://rickandmortyapi.com/api/episode/29",
315 | "https://rickandmortyapi.com/api/episode/30",
316 | "https://rickandmortyapi.com/api/episode/31",
317 | "https://rickandmortyapi.com/api/episode/32",
318 | "https://rickandmortyapi.com/api/episode/33",
319 | "https://rickandmortyapi.com/api/episode/35",
320 | "https://rickandmortyapi.com/api/episode/36",
321 | "https://rickandmortyapi.com/api/episode/38",
322 | "https://rickandmortyapi.com/api/episode/39",
323 | "https://rickandmortyapi.com/api/episode/40",
324 | "https://rickandmortyapi.com/api/episode/41",
325 | "https://rickandmortyapi.com/api/episode/42",
326 | "https://rickandmortyapi.com/api/episode/43",
327 | "https://rickandmortyapi.com/api/episode/44",
328 | "https://rickandmortyapi.com/api/episode/45",
329 | "https://rickandmortyapi.com/api/episode/46",
330 | "https://rickandmortyapi.com/api/episode/47",
331 | "https://rickandmortyapi.com/api/episode/48",
332 | "https://rickandmortyapi.com/api/episode/49",
333 | "https://rickandmortyapi.com/api/episode/50",
334 | "https://rickandmortyapi.com/api/episode/51"
335 | ],
336 | "url": "https://rickandmortyapi.com/api/character/5",
337 | "created": "2017-11-04T19:26:56.301Z"
338 | },
339 | {
340 | "id": 6,
341 | "name": "Abadango Cluster Princess",
342 | "status": "Alive",
343 | "species": "Alien",
344 | "type": "",
345 | "gender": "Female",
346 | "origin": {
347 | "name": "Abadango",
348 | "url": "https://rickandmortyapi.com/api/location/2"
349 | },
350 | "location": {
351 | "name": "Abadango",
352 | "url": "https://rickandmortyapi.com/api/location/2"
353 | },
354 | "image": "https://rickandmortyapi.com/api/character/avatar/6.jpeg",
355 | "episode": [
356 | "https://rickandmortyapi.com/api/episode/27"
357 | ],
358 | "url": "https://rickandmortyapi.com/api/character/6",
359 | "created": "2017-11-04T19:50:28.250Z"
360 | },
361 | {
362 | "id": 7,
363 | "name": "Abradolf Lincler",
364 | "status": "unknown",
365 | "species": "Human",
366 | "type": "Genetic experiment",
367 | "gender": "Male",
368 | "origin": {
369 | "name": "Earth (Replacement Dimension)",
370 | "url": "https://rickandmortyapi.com/api/location/20"
371 | },
372 | "location": {
373 | "name": "Testicle Monster Dimension",
374 | "url": "https://rickandmortyapi.com/api/location/21"
375 | },
376 | "image": "https://rickandmortyapi.com/api/character/avatar/7.jpeg",
377 | "episode": [
378 | "https://rickandmortyapi.com/api/episode/10",
379 | "https://rickandmortyapi.com/api/episode/11"
380 | ],
381 | "url": "https://rickandmortyapi.com/api/character/7",
382 | "created": "2017-11-04T19:59:20.523Z"
383 | },
384 | {
385 | "id": 8,
386 | "name": "Adjudicator Rick",
387 | "status": "Dead",
388 | "species": "Human",
389 | "type": "",
390 | "gender": "Male",
391 | "origin": {
392 | "name": "unknown",
393 | "url": ""
394 | },
395 | "location": {
396 | "name": "Citadel of Ricks",
397 | "url": "https://rickandmortyapi.com/api/location/3"
398 | },
399 | "image": "https://rickandmortyapi.com/api/character/avatar/8.jpeg",
400 | "episode": [
401 | "https://rickandmortyapi.com/api/episode/28"
402 | ],
403 | "url": "https://rickandmortyapi.com/api/character/8",
404 | "created": "2017-11-04T20:03:34.737Z"
405 | },
406 | {
407 | "id": 9,
408 | "name": "Agency Director",
409 | "status": "Dead",
410 | "species": "Human",
411 | "type": "",
412 | "gender": "Male",
413 | "origin": {
414 | "name": "Earth (Replacement Dimension)",
415 | "url": "https://rickandmortyapi.com/api/location/20"
416 | },
417 | "location": {
418 | "name": "Earth (Replacement Dimension)",
419 | "url": "https://rickandmortyapi.com/api/location/20"
420 | },
421 | "image": "https://rickandmortyapi.com/api/character/avatar/9.jpeg",
422 | "episode": [
423 | "https://rickandmortyapi.com/api/episode/24"
424 | ],
425 | "url": "https://rickandmortyapi.com/api/character/9",
426 | "created": "2017-11-04T20:06:54.976Z"
427 | },
428 | {
429 | "id": 10,
430 | "name": "Alan Rails",
431 | "status": "Dead",
432 | "species": "Human",
433 | "type": "Superhuman (Ghost trains summoner)",
434 | "gender": "Male",
435 | "origin": {
436 | "name": "unknown",
437 | "url": ""
438 | },
439 | "location": {
440 | "name": "Worldender's lair",
441 | "url": "https://rickandmortyapi.com/api/location/4"
442 | },
443 | "image": "https://rickandmortyapi.com/api/character/avatar/10.jpeg",
444 | "episode": [
445 | "https://rickandmortyapi.com/api/episode/25"
446 | ],
447 | "url": "https://rickandmortyapi.com/api/character/10",
448 | "created": "2017-11-04T20:19:09.017Z"
449 | },
450 | {
451 | "id": 11,
452 | "name": "Albert Einstein",
453 | "status": "Dead",
454 | "species": "Human",
455 | "type": "",
456 | "gender": "Male",
457 | "origin": {
458 | "name": "Earth (C-137)",
459 | "url": "https://rickandmortyapi.com/api/location/1"
460 | },
461 | "location": {
462 | "name": "Earth (Replacement Dimension)",
463 | "url": "https://rickandmortyapi.com/api/location/20"
464 | },
465 | "image": "https://rickandmortyapi.com/api/character/avatar/11.jpeg",
466 | "episode": [
467 | "https://rickandmortyapi.com/api/episode/12"
468 | ],
469 | "url": "https://rickandmortyapi.com/api/character/11",
470 | "created": "2017-11-04T20:20:20.965Z"
471 | },
472 | {
473 | "id": 12,
474 | "name": "Alexander",
475 | "status": "Dead",
476 | "species": "Human",
477 | "type": "",
478 | "gender": "Male",
479 | "origin": {
480 | "name": "Earth (C-137)",
481 | "url": "https://rickandmortyapi.com/api/location/1"
482 | },
483 | "location": {
484 | "name": "Anatomy Park",
485 | "url": "https://rickandmortyapi.com/api/location/5"
486 | },
487 | "image": "https://rickandmortyapi.com/api/character/avatar/12.jpeg",
488 | "episode": [
489 | "https://rickandmortyapi.com/api/episode/3"
490 | ],
491 | "url": "https://rickandmortyapi.com/api/character/12",
492 | "created": "2017-11-04T20:32:33.144Z"
493 | },
494 | {
495 | "id": 13,
496 | "name": "Alien Googah",
497 | "status": "unknown",
498 | "species": "Alien",
499 | "type": "",
500 | "gender": "unknown",
501 | "origin": {
502 | "name": "unknown",
503 | "url": ""
504 | },
505 | "location": {
506 | "name": "Earth (Replacement Dimension)",
507 | "url": "https://rickandmortyapi.com/api/location/20"
508 | },
509 | "image": "https://rickandmortyapi.com/api/character/avatar/13.jpeg",
510 | "episode": [
511 | "https://rickandmortyapi.com/api/episode/31"
512 | ],
513 | "url": "https://rickandmortyapi.com/api/character/13",
514 | "created": "2017-11-04T20:33:30.779Z"
515 | },
516 | {
517 | "id": 14,
518 | "name": "Alien Morty",
519 | "status": "unknown",
520 | "species": "Alien",
521 | "type": "",
522 | "gender": "Male",
523 | "origin": {
524 | "name": "unknown",
525 | "url": ""
526 | },
527 | "location": {
528 | "name": "Citadel of Ricks",
529 | "url": "https://rickandmortyapi.com/api/location/3"
530 | },
531 | "image": "https://rickandmortyapi.com/api/character/avatar/14.jpeg",
532 | "episode": [
533 | "https://rickandmortyapi.com/api/episode/10"
534 | ],
535 | "url": "https://rickandmortyapi.com/api/character/14",
536 | "created": "2017-11-04T20:51:31.373Z"
537 | },
538 | {
539 | "id": 15,
540 | "name": "Alien Rick",
541 | "status": "unknown",
542 | "species": "Alien",
543 | "type": "",
544 | "gender": "Male",
545 | "origin": {
546 | "name": "unknown",
547 | "url": ""
548 | },
549 | "location": {
550 | "name": "Citadel of Ricks",
551 | "url": "https://rickandmortyapi.com/api/location/3"
552 | },
553 | "image": "https://rickandmortyapi.com/api/character/avatar/15.jpeg",
554 | "episode": [
555 | "https://rickandmortyapi.com/api/episode/10"
556 | ],
557 | "url": "https://rickandmortyapi.com/api/character/15",
558 | "created": "2017-11-04T20:56:13.215Z"
559 | },
560 | {
561 | "id": 16,
562 | "name": "Amish Cyborg",
563 | "status": "Dead",
564 | "species": "Alien",
565 | "type": "Parasite",
566 | "gender": "Male",
567 | "origin": {
568 | "name": "unknown",
569 | "url": ""
570 | },
571 | "location": {
572 | "name": "Earth (Replacement Dimension)",
573 | "url": "https://rickandmortyapi.com/api/location/20"
574 | },
575 | "image": "https://rickandmortyapi.com/api/character/avatar/16.jpeg",
576 | "episode": [
577 | "https://rickandmortyapi.com/api/episode/15"
578 | ],
579 | "url": "https://rickandmortyapi.com/api/character/16",
580 | "created": "2017-11-04T21:12:45.235Z"
581 | },
582 | {
583 | "id": 17,
584 | "name": "Annie",
585 | "status": "Alive",
586 | "species": "Human",
587 | "type": "",
588 | "gender": "Female",
589 | "origin": {
590 | "name": "Earth (C-137)",
591 | "url": "https://rickandmortyapi.com/api/location/1"
592 | },
593 | "location": {
594 | "name": "Anatomy Park",
595 | "url": "https://rickandmortyapi.com/api/location/5"
596 | },
597 | "image": "https://rickandmortyapi.com/api/character/avatar/17.jpeg",
598 | "episode": [
599 | "https://rickandmortyapi.com/api/episode/3"
600 | ],
601 | "url": "https://rickandmortyapi.com/api/character/17",
602 | "created": "2017-11-04T22:21:24.481Z"
603 | },
604 | {
605 | "id": 18,
606 | "name": "Antenna Morty",
607 | "status": "Alive",
608 | "species": "Human",
609 | "type": "Human with antennae",
610 | "gender": "Male",
611 | "origin": {
612 | "name": "unknown",
613 | "url": ""
614 | },
615 | "location": {
616 | "name": "Citadel of Ricks",
617 | "url": "https://rickandmortyapi.com/api/location/3"
618 | },
619 | "image": "https://rickandmortyapi.com/api/character/avatar/18.jpeg",
620 | "episode": [
621 | "https://rickandmortyapi.com/api/episode/10",
622 | "https://rickandmortyapi.com/api/episode/28"
623 | ],
624 | "url": "https://rickandmortyapi.com/api/character/18",
625 | "created": "2017-11-04T22:25:29.008Z"
626 | },
627 | {
628 | "id": 19,
629 | "name": "Antenna Rick",
630 | "status": "unknown",
631 | "species": "Human",
632 | "type": "Human with antennae",
633 | "gender": "Male",
634 | "origin": {
635 | "name": "unknown",
636 | "url": ""
637 | },
638 | "location": {
639 | "name": "unknown",
640 | "url": ""
641 | },
642 | "image": "https://rickandmortyapi.com/api/character/avatar/19.jpeg",
643 | "episode": [
644 | "https://rickandmortyapi.com/api/episode/10"
645 | ],
646 | "url": "https://rickandmortyapi.com/api/character/19",
647 | "created": "2017-11-04T22:28:13.756Z"
648 | },
649 | {
650 | "id": 20,
651 | "name": "Ants in my Eyes Johnson",
652 | "status": "unknown",
653 | "species": "Human",
654 | "type": "Human with ants in his eyes",
655 | "gender": "Male",
656 | "origin": {
657 | "name": "unknown",
658 | "url": ""
659 | },
660 | "location": {
661 | "name": "Interdimensional Cable",
662 | "url": "https://rickandmortyapi.com/api/location/6"
663 | },
664 | "image": "https://rickandmortyapi.com/api/character/avatar/20.jpeg",
665 | "episode": [
666 | "https://rickandmortyapi.com/api/episode/8"
667 | ],
668 | "url": "https://rickandmortyapi.com/api/character/20",
669 | "created": "2017-11-04T22:34:53.659Z"
670 | }
671 | ]
672 | }
673 | export default responseAPI;
--------------------------------------------------------------------------------