Git Product home page Git Product logo

laboeleven's Introduction

LabEleven

~ ハッカソンでeslint使うやつまじで0人説 ~ 研究室にコンビニ導入したい!!

1. 概要

1.1 購入者

  1. LineBotに対して商品番号を送る(ex: 購入 1)
  2. Botから支払いするように命じられる
  3. oneClickで購入

メリット

  • 購入者にとっては, 研究室にいながら, ものが買える
  • まじで楽やんけ!

デメリット

割高

1.2 補充者

  1. LineBotに対して商品番号を送る(e: 登録 1
  2. Botから金額が支払われる(現状APIがないので、月末返還がよさそう)(ログを見ればすべて取引履歴がわかる)
  3. お金を受け取る

メリット

  • どこか行くついでに物を買うと, 定価+αのお金が貰える
  • 冷蔵庫にストックできる
  • いっぱい買っても後悔がない(欲しい時には自分で買い戻せばいいし、いらないなら、勝手に売れる)

デメリット

  • めんどくさい

1.3 備考

  • 差額の+αが貯まれば、みんなで鍋パやりたい

2. 開発技術

  • Nodejs + express
  • herokuにdeploy
  • DBはMySQL
  • LINE MESSAGE API
  • LINE PAY API

3. 参考

4. Please Test me

おまけ

  • もしも、No thanksおさずに鯖更新した時は, switchのスコープコメントアウトして、以下を実行する
// No thanks押し忘れた時用
const message = {
	type: "template",
	altText: "You need to purchase subscription to use this Chatbot. It's 1yen/month. Do you want to puchase?",
	template: {
		type: "confirm",
		text: "You need to purchase subscription to use this Chatbot. It's 1yen/month. Do you want to purchase?",
		actions: [
			{type: "postback", label: "Yes", data: "yes"},
			{type: "postback", label: "No Thanks", data: "no"}
		]
	}
};
return bot.replyMessage(event.replyToken, message).then((response) => {
	cache.put(event.source.userId, {
		subscription: "inactive"
	});
});

laboeleven's People

Contributors

udonda avatar

Watchers

James Cloos avatar

laboeleven's Issues

[Ref]

眠すぎてぐちゃぐちゃやけん整理!

[Add]購入の仕組み

商品は番号管理がいいかな〜〜〜〜

商品テーブル
id item price
1 お茶 150
2 おにぎり 150

みたいに、もうテーブル決めちゃってた方が楽そう

[Add]登録の仕組み

商品登録
-> 払い戻しAPI(あるか知らんけど、ありそう)で払い戻す
テーブルは #9 参照

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.