10000 GitHub - kalolo/daterangeapi: quick test
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

kalolo/daterangeapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

daterangeapi

$ composer install
$ php -S localhost:8181

Get list of dates

$ curl -X GET 'http://localhost:8181'

output:

[
  {
    "id": "3",
    "start": "1",
    "end": "8",
    "price": "5"
  },
  {
    "id": "4",
    "start": "10",
    "end": "13",
    "price": "15"
  },
  {
    "id": "5",
    "start": "14",
    "end": "15",
    "price": "8"
  }
]

Add a new range

$curl -X POST \
  'http://localhost:8181?a=add' \
  -H 'Content-Type: application/json' \
  -d '{
	"start": 10,
	"end": 13,
	"price": 15
}'

Delete all records

$ curl -X GET 'http://localhost:8181?a=deleteAll' 

Running test

$ ./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/DateRangeTest.php

About

quick test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0