{"id":20521891,"url":"https://github.com/g-vans/book-api-rails","last_synced_at":"2026-04-15T20:31:53.463Z","repository":{"id":184143708,"uuid":"671040569","full_name":"G-vans/book-api-rails","owner":"G-vans","description":"This is a REST API that calls an external API service to get information about books and also perform simple CRUD operations on it.","archived":false,"fork":false,"pushed_at":"2023-07-27T08:07:39.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T00:30:01.880Z","etag":null,"topics":["rails","rspec-testing","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/G-vans.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}},"created_at":"2023-07-26T12:05:35.000Z","updated_at":"2023-07-31T08:35:06.000Z","dependencies_parsed_at":"2023-07-27T08:53:50.672Z","dependency_job_id":null,"html_url":"https://github.com/G-vans/book-api-rails","commit_stats":null,"previous_names":["g-vans/book-api-rails"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/G-vans/book-api-rails","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G-vans%2Fbook-api-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G-vans%2Fbook-api-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G-vans%2Fbook-api-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G-vans%2Fbook-api-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/G-vans","download_url":"https://codeload.github.com/G-vans/book-api-rails/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G-vans%2Fbook-api-rails/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31859246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"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":["rails","rspec-testing","ruby"],"created_at":"2024-11-15T22:33:03.826Z","updated_at":"2026-04-15T20:31:53.443Z","avatar_url":"https://github.com/G-vans.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My Book API\n\nThis is a REST API that calls an external API service to get information about books and also perform simple CRUD(Create, Read, Update, Delete) operations on it.\n\n## Getting Started\n\nTo get started with the API, follow these instructions:\n\n### Prerequisites\n\nYou need to have the following installed on your system:\n\n- Ruby (version 3.0 or higher)\n- Rails (version 7.0.6 )\n\n### Installation\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/G-vans/book-api-rails.git\ncd book-api-rails\n```\n\n2. Install the required gems:\n```bash\nbundle install\n```\n3. Create and migrate the database then start the server:\n```bash\nrails db:create\nrails db:migrate\nrails s\n```\nNow the API should be up and running at 'http://localhost:3000'.\n\n## API Endpoints\n\nThe following are the available API endpoints:\n\n### Fetch External Books\n- Endpoint: GET /external_books\n- Params: name (string, required)\n- Response: Returns a list of external books matching the given name.\n\n### Create a Book\n- Endpoint: POST /books\n- Params:\n    - name (string, required)\n    - isbn (string, required)\n    - authors (array of strings, required)\n    - number_of_pages (integer, required)\n    - publisher (string)\n    - country (string)\n    - release_date (string in the format \"YYYY-MM-DD\")\n    - Response: Returns the details of the newly created book.\n\n### Get All Books\n- Endpoint: GET /books\n- Response: Returns a list of all books in the bookstore.\n\n### Get a Specific Book\n- Endpoint: GET /books/:id\n- Params: id (integer, required)\n- Response: Returns the details of the specified book.\n\n### Update a Book\n- Endpoint: PATCH /books/:id\n- Params: Same as create endpoint\n- Response: Returns the updated details of the book.\n\n### Delete a Book\n- Endpoint: DELETE /books/:id\n- Params: id (integer, required)\n- Response: Returns a success message if the book was deleted successfully.\n\n## Error Handling\nThe API returns appropriate error responses with status codes and error messages in case of any issues with the requests.\n\n### Running Tests\nTo run the test suite and verify that the API endpoints are functioning as expected, use the following command:\n\n```bash\nbundle exec rspec\n```\n\n## Contributing\nContributions are welcome! If you find any issues or want to add new features, feel free to create a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg-vans%2Fbook-api-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg-vans%2Fbook-api-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg-vans%2Fbook-api-rails/lists"}