Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Simple API based on Lumen framework

NotificationsYou must be signed in to change notification settings

ilmarin/points

Repository files navigation

Simple example of API that allows to store some interesting places with their map coordinates and description.

With this API you can:

  • Add Point info (name, description, coordinates, city)
  • Edit Point info
  • Get nearest Points by desired radius and IP address
  • Get Points located in desired city

Installation

  1. In project folder executedocker-compose up -d
  2. Enter container withdocker exec -ti points bash
  3. Executecomposer install
  4. Rename.env.example file into.env
  5. Execute./artisan migrate --force to run database migrations
  6. In.env file write yourIP_STACK_KEY andAPI_TOKEN
  7. Check api status by addresshttp://localhost:8080/api/v1/health?api_token=123

Tests

To run unit tests executevendor/bin/phpunit tests/unit insidepoints container.

To run only functional tests executevendor/bin/phpunit tests/functional.

To run all tests executevendor/bin/phpunit.

Working with API

Token auth

All requests must containapi_token parameter withAPI_TOKEN environment variable value.

Example:GET /api/v1/health?api_token=123

Health check

Get health status of the service.

URL:GET /api/v1/health

Description

Point related requests

Endpoints for viewing and manipulating points.

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp