GithubHelp home page GithubHelp logo

nukosuke / go-shashokuru Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 15 KB

:bento: shashokuru.jp Go client library

Home Page: https://godoc.org/github.com/nukosuke/go-shashokuru/shashokuru

License: MIT License

Go 100.00%
golang shashokuru bento

go-shashokuru's Introduction

go-shashokuru

package main

import (
	"github.com/nukosuke/go-shashokuru/shashokuru"
	"os"
	"time"
	"fmt"
)

const URL_DATE_FORMAT = "20060102"

func main() {
	client := shashokuru.NewClient()
	client.Login("[email protected]", "your_shashokuru_password")

	// :bento: メニューを取得する日付
	date, _ := time.Parse(URL_DATE_FORMAT, "20180122")

	// :bento: メニュー取得
	bentoList, err := client.Bento.GetListOnDate(date)
	if err != nil {
		fmt.Println(":bento: チャレンジ失敗")
		os.Exit(1)
	}

	// :bento: 予約
	// リストの最初の弁当を1つ予約
	err = client.Bento.Reserve(bentoList[0], 1)
	if err != nil {
 		fmt.Println(":bento: チャレンジ失敗")
		os.Exit(1)
	}

	fmt.Println(":bento: 獲得した。これで明日も生きていける。")
}

go-shashokuru's People

Contributors

nukosuke avatar yosuke-tamura avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

go-shashokuru's Issues

refactor

コピペコード量産してしまった

docs

  • README.md
  • wiki

annict

せっかくなので昔作ったgo-annictでアニメリスト取得する

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.