<commit_before>[![Latest Stable Version](https://poser.pugx.org/ublaboo/api-router-project/v/stable)](https://packagist.org/packages/ublaboo/api-router-project)
[![License](https://poser.pugx.org/ublaboo/api-router-project/license)](https://packagist.org/packages/ublaboo/api-router-project)
[![Total Downloads](https://poser.pugx.org/ublaboo/api-router-project/downloads)](https://packagist.org/packages/ublaboo/api-router-project)
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/ublaboo/help)

# ApiRouter Example Project

This repository is meant as a starter project for [ublaboo/api-router](https://github.com/ublaboo/api-router).

## Requirements

PHP 7.1 or higher.


## ublaboo/api-router-project usage

	composer create-project ublaboo/api-router-project


## Long Story Short

- Using `ublaboo/api-router` for routing
- Implementing `IPresneter` in endpoints (`App\Controllers\LoginController`) instead of extending `UI\Presenter`
- Extending `ApiResponse` from Nette `JsonResponse`, just to make it more simple to add more custom headers and so on
- `LoginController` and `ErrorController` is using `ApiResponseFormatter` for formatting succes message, payload data or and exception<commit_msg>Typo in readme<commit_after>[![Latest Stable Version](https://poser.pugx.org/ublaboo/api-router-project/v/stable)](https://packagist.org/packages/ublaboo/api-router-project)
[![License](https://poser.pugx.org/ublaboo/api-router-project/license)](https://packagist.org/packages/ublaboo/api-router-project)
[![Total Downloads](https://poser.pugx.org/ublaboo/api-router-project/downloads)](https://packagist.org/packages/ublaboo/api-router-project)
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/ublaboo/help)

# ApiRouter Example Project

This repository is meant as a starter project for [ublaboo/api-router](https://github.com/ublaboo/api-router).

## Requirements

PHP 7.1 or higher.


## ublaboo/api-router-project usage

	composer create-project ublaboo/api-router-project


## Long Story Short

- Using `ublaboo/api-router` for routing
- Implementing `IPresenter` in endpoints (`App\Controllers\LoginController`) instead of extending `UI\Presenter`
- Extending `ApiResponse` from Nette `JsonResponse`, just to make it more simple to add more custom headers and so on
- `LoginController` and `ErrorController` is using `ApiResponseFormatter` for formatting succes message, payload data or and exception
{'fraction_non_alphanumeric': 0.14129995962858297, 'fraction_numerical': 0.0016148566814695195, 'mean_word_length': 5.403100775193798, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 18, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6973508', 'n_tokens_mistral': 826, 'n_tokens_neox': 795, 'n_words': 161}