Skip to content

cndjp/qicoo-apimock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

README

API MockサーバのResponseJsonファイルを格納しています。

Quick Start

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published