aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorwabilin <[email protected]>2020-07-31 23:09:45 +0900
committerwabilin <[email protected]>2020-07-31 23:14:26 +0900
commit30eb6ed6d772c802deb29f557a3564bdc43dbc26 (patch)
tree19b221415124fc036df6a97d3ff1abd950d85182 /README.md
parentremove example.ts (diff)
downloadholo-schedule-30eb6ed6d772c802deb29f557a3564bdc43dbc26.tar.xz
holo-schedule-30eb6ed6d772c802deb29f557a3564bdc43dbc26.zip
Add Readmev0.0.1
Diffstat (limited to 'README.md')
-rw-r--r--README.md47
1 files changed, 47 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..4a4b081
--- /dev/null
+++ b/README.md
@@ -0,0 +1,47 @@
+# holo-schedule
+
+> I love Haachama.
+
+Hololive schedule crawler and parser.
+
+## Install
+```sh
+yarn add holo-schedule
+
+# or
+npm install holo-schedule
+```
+
+## Usage
+
+```js
+const { parseScheduleHtml, getScheduleHtml } = require('holo-schedule')
+
+// You can also get html by yourself
+const html = await getScheduleHtml()
+
+// The dict stores steamers' icon data, you can save for using next time
+const { lives, dict } = parseScheduleHtml(html)
+
+console.log(lives)
+```
+
+Gets list like
+```
+[
+ {
+ time: 2020-07-30T08:01:00.000Z,
+ streamer: '天音かなた',
+ guests: [ '赤井はあと', '姫森ルーナ' ]
+ },
+ {
+ time: 2020-07-30T08:01:00.000Z,
+ streamer: '姫森ルーナ',
+ guests: [ '赤井はあと', '天音かなた' ]
+ },
+ { time: 2020-07-30T08:20:00.000Z, streamer: 'ロボ子さん', guests: [] },
+ ...
+]
+```
+
+For detail, see the TypeScript definition.