API MockサーバのResponseJsonファイルを格納しています。
git clone https://github.com/cndjp/qicoo-apimock.git ~/qicoo-apimock
docker run --name apimock --rm -d -p 80:80 -v ~/qicoo-apimock/api_responses/:/data/ sugimount/qicoo-apimock:0.0.1
API Curl
# create a question
curl -s -v -H "Content-Type: application/json" -X POST http://localhost/v1/jkd1812/questions -d '
{
"event_id": "jkd1812",
"program_id": "1",
"comment": "kubernetesの〇〇について教えてください!"
}
'
# Retrieve a Question
curl -s -v -H "Content-Type: application/json" -X GET http://localhost/v1/jkd1812/questions/BosWT9EsdzgjPn
# Delete a Question
curl -s -v -H "Content-Type: application/json" -X DELETE http://localhost/v1/jkd1812/questions/BosWT9EsdzgjPn
# list all questions
curl -s -v -H "Content-Type: application/json" -X GET http://localhost/v1/jkd1812/questions
# like a question
curl -s -v -H "Content-Type: application/json" -X PUT http://localhost/v1/jkd1812/questions/BosWT9EsdzgjPn/like
# create a user
curl -s -v -H "Content-Type: application/json" -X POST http://localhost/v1/users -d '
{
"username": "sugimount",
"type": "twitter",
"user_url": "https://twitter.com/sugimount"
}
'
# Retrieve a user
curl -s -v -H "Content-Type: application/json" -X GET http://localhost/v1/users/IOodngp39890ba
# Delete a User
curl -s -v -H "Content-Type: application/json" -X DELETE http://localhost/v1/users/IOodngp39890ba
# List all Users
curl -s -v -H "Content-Type: application/json" -X GET http://localhost/v1/users