{"id":18588057,"url":"https://github.com/peimelo/toh-api","last_synced_at":"2026-04-30T13:33:14.657Z","repository":{"id":42525041,"uuid":"277769499","full_name":"peimelo/toh-api","owner":"peimelo","description":"Tour of Heroes API made with NodeJS.","archived":false,"fork":false,"pushed_at":"2023-03-07T04:45:03.000Z","size":256,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-30T13:33:13.791Z","etag":null,"topics":["api","course","javascript","nodejs","tour-of-heroes"],"latest_commit_sha":null,"homepage":"https://toh-api.vercel.app/api","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peimelo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-07T09:08:47.000Z","updated_at":"2023-02-13T16:55:41.000Z","dependencies_parsed_at":"2024-11-07T00:54:54.395Z","dependency_job_id":null,"html_url":"https://github.com/peimelo/toh-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/peimelo/toh-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peimelo%2Ftoh-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peimelo%2Ftoh-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peimelo%2Ftoh-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peimelo%2Ftoh-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peimelo","download_url":"https://codeload.github.com/peimelo/toh-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peimelo%2Ftoh-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32466333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","course","javascript","nodejs","tour-of-heroes"],"created_at":"2024-11-07T00:44:31.236Z","updated_at":"2026-04-30T13:33:14.641Z","avatar_url":"https://github.com/peimelo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Server\n\nTo install and start the API server, run the following commands in this directory:\n\n- `npm install`\n- `node server`\n\nOpen `http://localhost:3000`\n\n## Using The Server\n\n### Include An Authorization Header\n\n`POST /api/sessions`: returns a `token` in the body and also in the header. You can use this `token` in the following endpoints.\n\nAll requests, except `POST /api/sessions`, use an **Authorization** header, of size \u003e= 10 characters, so that you can only manipulate your data, for example:\n\n```js\nfetch(url, {\n  headers: { Authorization: 'whatever-you-want' },\n});\n```\n\n### API Endpoint\n\nThe following endpoints are available:\n\n| Endpoints                   | Usage                                 | Params                                           |\n| --------------------------- | ------------------------------------- | ------------------------------------------------ |\n| `POST /api/sessions`        | Authenticates the user.               | **email** - [String] \u003cbr\u003e **password** - String] |\n| `GET /api/heroes`           | Get all of the heroes.                |                                                  |\n| `GET /api/heroes?name=term` | Get all heroes with name like a term. | **term** - [String]                              |\n| `GET /api/heroes/:id`       | Get the details of a single hero.     |                                                  |\n| `POST /api/heroes`          | Add a new hero.                       | **name** - [String]                              |\n| `PUT /api/heroes/:id`       | Edit the details of an existing hero. | **name** - [String]                              |\n| `DELETE /api/heroes/:id`    | Remove the hero.                      |                                                  |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeimelo%2Ftoh-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeimelo%2Ftoh-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeimelo%2Ftoh-api/lists"}