Skip to content
This repository has been archived by the owner on Jan 3, 2020. It is now read-only.

Zero-Fork-Storage/Real-Time-Delivery-Query-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-Time Delivery Query API

pythonVersion License
Real-Time Delivery Query API provides fast response speed by applying asynchronous programming,
and provides processed and processed JSON with better readability than existing delivery tracking API.

Prerequisites

  • Python 3.7 +
  • sanic
  • aiohttp
  • nest_asyncio

Usage

1. Install prerequisites

0. $ git clone https://github.com/zeroday0619/Real-Time-Delivery-Query-API.git 
1. $ pip install -r requirements.txt
1. $ pip3 install -r requirements.txt
1. $ python3 -m pip install -r requirements.txt

2. Run

python3 server-run.py

3. How to use

  • HTTP
POST /v1/rtsq HTTP/1.1
Content-Type: application/json
{
	"name": "CJ대한통운",
	"code": "0000000000"
}

  • curl
curl -X POST \
  http://127.0.0.1:8000/v1/rtsq \
  -H 'Content-Type: application/json' \
  -d '{
	"name": "CJ대한통운",
	"code": "0000000000"
}'
  • node js
var request = require("request");

var options = { method: 'POST',
  url: 'http://127.0.0.1:8000/v1/rtsq',
  headers: {'Content-Type': 'application/json' },
  body: { name: 'CJ대한통운', code: '0000000000' },json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Author

LICENSE

Copyright 2019 Euiseo Cha (차의서) | zeroday0619
MIT License

About

Real-Time Delivery Query API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages