Giter Site home page Giter Site logo

usermanapi's Introduction

MiUse (Mikrotik Userman) API Gateway

Useful MiUse API Gate for RESTful API Mikrotik Userman Development, using Mikrotik Userman API Gateway.

Used technologies: PHP 7, Slim 4, MySQL, PHPUnit, dotenv, Docker & Docker Compose.

Software License Build Status Coverage Status Packagist Version

โš™๏ธ QUICK INSTALL:

Requirements:

  • Composer.
  • PHP 7.4+ or 8.0+.
  • MySQL/MariaDB.
  • or Docker.

With Composer:

You can create a new project running the following commands:

$ composer create-project bojezcreative/usermanapi [my-api-name]
$ cd [my-api-name]
$ composer test
$ composer start

Configure your connection to MySQL Server:

By default, the API use a MySQL Database.

You should check and edit this configuration in your .env file:

DB_HOST='127.0.0.1'
DB_NAME='yourMySqlDatabase'
DB_USER='yourMySqlUsername'
DB_PASS='yourMySqlPassword'
DB_PORT='3306'

ROS_HOST='192.168.1.xx'
ROS_USER='user'
ROS_PASS='pass'
ROS_PORT='8728'

With Docker:

If you like Docker, you can use this project with docker and docker-compose.

Minimal Docker Version:

  • Engine: 18.03+
  • Compose: 1.21+

Docker Commands:

# Create and start containers for the API.
$ docker-compose up -d --build

# Checkout the API.
$ curl http://localhost:8081

# Stop and remove containers.
$ docker-compose down

๐Ÿ“ฆ DEPENDENCIES:

LIST OF REQUIRE DEPENDENCIES:

  • slim/slim: Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.
  • slim/psr7: PSR-7 implementation for use with Slim 4.
  • pimple/pimple: A small PHP dependency injection container.
  • vlucas/phpdotenv: Loads environment variables from .env to getenv(), $_ENV and $_SERVER automagically.

LIST OF DEVELOPMENT DEPENDENCIES:

๐Ÿ”– ENDPOINTS:

BY DEFAULT:

  • Hello: GET /
  • Health Check: GET /status
  • Get User List from RouterOs: GET /user/list
  • Import User from RoS to DB: GET /user/import
  • Show User list from DB: GET /user/show

๐Ÿ“น TUTORIAL:

Develop a RESTful API with PHP and Slim 4. [:movie_camera: :sound: :es: :argentina:]

โค๏ธ WOULD YOU LIKE TO SUPPORT THIS PROJECT?

You can support this project inviting me a coffee โ˜• ๐Ÿ˜‹ or giving a star to this repo โญ ๐Ÿ˜Š.

  • Paypal
  • Buy Me a coffee
  • SociaBuzz
  • BitCoin
  • BitCoin
  • DogeCoin

๐Ÿ˜Ž THAT'S IT!

Now go build a cool RESTful API.

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.