Giter Site home page Giter Site logo

simple-library-api's Introduction

簡易図書館API

簡易図書館APIはいつ誰がどの本を借りていつ返したかを管理するAPIサーバーを提供します.

WebアプリケーションフレームワークにFalconを,データベースにTinyDBを用いています.

使い方

エンドポイントにJSONをPOSTすることで,貸出記録に対してCRUDできます.

全ての貸出記録を取得

GET /books HTTP/1.1
HTTP1.1 200
Content-type: application/json

[
	{
		"borrower": "田中 太郎",
		"borrowed_date": "2017-01-12",
		"id": 1,
		"returned_date": "2017-01-24",
		"title": "松浦さよ姫伝説の基礎的研究 近・現代編"
	},
	{
		"borrower": "山田 花子",
		"borrowed_date": "2018-03-11",
		"id": 5,
		"title": "実践Python3",
		"returned_date": "2018-03-11"
	}
]

1つの貸出記録を追加

POST /books HTTP/1.1
Content-Type: application/json

{
	"borrower": "山田 花子",
	"title": "実践Python3"
}
HTTP/1.0 201
content-type: application/json

{
	"borrower": "山田 花子",
	"borrowed_date": "2018-03-11",
	"id": 6,
	"title": "実践Python3"
}

1つの貸出記録を返却済みにする

PUT /books/:book_id/returning

参考

simple-library-api's People

Contributors

nakanoasaservice avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.