0.0.1 • Published 9 years ago
geongei v0.0.1
건게이
대여 정책 제발
Usage
const Geongei = require('geongei')
const FORMAT = 'M월 D일 H시'
Geongei({
year: 2017,
month: 1
}, (e, c) => {
if(e) return console.error(e)
c.rents[2017][1].forEach(day => {
day.forEach(_ => {
console.log(`#${_.aid}: ${_.start.format(FORMAT)}부터 ${_.totalDuration}시간 (${_.comment})`)
for(let k in _.devices) {
let v = _.devices[k]
console.log(`* ${k}: ${v.duration || _.totalDuration}시간 ${v.count || 1}대`)
}
})
})
})...
#57750: 1월 22일 9시부터 2시간 (**님 예약.)
* sdvx: 2시간 2대
#57757: 1월 23일 10시부터 6시간 (*****님 예약.)
* iidx: 6시간 1대
#57744: 1월 24일 9시부터 4시간 (******** 님 예약.)
* iidx: 4시간 1대
#57730: 1월 27일 10시부터 3시간 (**님 예약.)
* sdvx: 3시간 1대
#57730: 1월 28일 10시부터 3시간 (**님 예약.)
* sdvx: 3시간 1대
#57730: 1월 29일 10시부터 3시간 (**님 예약.)
* sdvx: 3시간 1대
#57753: 1월 30일 11시부터 4시간 (*님 예약.)
* sdvx: 4시간 1대
#57730: 1월 30일 11시부터 2시간 (**님 예약.)
* sdvx: 2시간 1대Docs
Geongei (GeongeiFetcher)
Geongei([option,] callback)
option: Objectyearmonthcollection: if it'sGeongeiCollection, callback will provide merged collection.
callback: functione: error (from request)c: collection
GeongeiCollection
.rents: Array of (Array ofRent). Day of Month is used to index.#append(year, month, raw): GetreturnValue.todo, parse, and save them.#merge(collection): Mergecollectiononto this collection..today: Today'sRents..tomorrow: Tomorrow'sRents.falseif tomorrow is next month, etc.
Rent
.aid: article id, naver cafe-related..sid: schedule id, naver cafe-related..start,end:momentobject.date: date of month, of start time.comment: related comment (usually 'who rented this device').totalDuration:end - start, in hour.devices: Object- key:
sdvx,iidx,jubeat,drum - value:
duration: in hour, if specifiedcount: count of device, default 1
- key:
0.0.1
9 years ago