Git Product home page Git Product logo

books-api-harde's Introduction

Build Status Total Downloads Latest Stable Version License

Book API(Laravel)

Laravel was used to develop the application because it is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

Laravel is accessible, powerful, and provides tools required for large, robust applications.

Project Setup

In order to setup the application locally on you system.

  1. clone the repository

  2. git clone https://github.com/emmadedayo/books-api-harde.git

  3. install the dependencies for the application

  4. composer install

  5. create a .env file from the .env.example

  6. cp .env.example .env

  7. Generate an application key

  8. php artisan key:generate

  9. create a database called booksapi in your database

  10. update the env files with your mysql connection details that you have on your system

    DB_CONNECTION=mysql
    DB_HOST=YOUR_HOST
    DB_PORT=MYSQL_PORT
    DB_DATABASE=books
    DB_USERNAME=MYSQL_USER_NAME
    DB_PASSWORD=MYSQL_PASSWORD

  11. ensure the iceandfire base api is being setup in the .env files

  12. ICE_AND_FIRE_URL='https://www.anapioficeandfire.com/api/' **** IT HAS BEEN TAKEN CAREOF: JUST FOR EASY TESTING

  13. Running migration data into the database

  14. php artisan migrate

  15. serving the project

  16. php artisan serve

Testing the Application

Application Testing is defined as a software testing type, conducted through scripts with the motive of finding errors in software. It deals with tests for the entire application. It helps to enhance the quality of your applications while reducing costs, maximizing ROI, and saving development time.

In order to run the feature test that was written php ./vendor/bin/phpunit when you want to generate a coverage php ./vendor/bin/phpunit --coverage-html ./coverage

This generates html report files in the application in the coverage folder, which can be located in the root directory

Important

Ensure you setup xdebug on your system. Xdebug Setup for local machine (xampp)

Testing the Application (user testing)

  1. Note:: ** when creating an author in the application you have to arrange the name of the authors separated with commas

  2. when testing the external application you can use any of the strings to search for the name of the book

"name" or "name or name" or name

  1. To filter the books you need to search with you desired parameters as shown below

http://127.0.0.1:8000/api/v1/books?search=A Game of Thrones

Test Coverage(Report) Overview

  1. To view the test coverage
  2. navigate to the coverage folder
  3. click on the index.html open with any browser
  4. To see risk report
  5. In the coverage folder
  6. click in the dashboard.html open with any browser (100% free from risk)

Updates

  1. There are still advance optimization and refactoring that can still be done in this project
  2. More validation checks. The validation checks can be increased to take care of users mistake and other case senarios

Developer(Adenagbe Emmanuel)

  1. Name: Adenagbe Emmanuel Adedayo
  2. Nickname: emmadenagbe
  3. Email: [email protected]

PostMan Documentation

https://documenter.getpostman.com/view/3080167/2s93XvWQbm

Thanks. If you have any problem setting it up or complain you can kindly post them on issues or message me directly

books-api-harde's People

Contributors

emmadedayo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.