ridibooks-reading-note-api

1.0.0 • Public • Published

ridibooks-reading-note-api

Unofficial ridibooks reading note API

Usage

const RidiReadingNote = require('ridibooks-reading-note-api')
 
const ridiReadingNote = new RidiReadingNote({ 
  userId: 'userId', 
  password: 'password', 
})
 
ridiReadingNote.getBooks(books => { console.log(books) })
ridiReadingNote.getBooks.then(books => { 
  console.log(books) 
})
 
ridiReadingNote.getNotes('106000156', notes => { console.log(notes) })
ridiReadingNote.getNotes('106000156').then(notes => { 
  console.log(notes) 
})

API

RidiReadingNote({ userId, password })

A constructor of module. userId and password must be provided.

instance.getBooks([callback])

Returns a promise for an array of book data. Callback also supported.

// Example Data
[{
  bookTitle: "노인과 바다 (영문판)", 
  path: "/reading-note/detail/106000156", 
  bookId: "106000156", 
  notes: ["Others, of the older fishermen, looked at him and were sad.", "noteangry"]
}]

instance.getNotes(bookId, [callback])

Returns a promise for an array of note. Callback also supported.

// Example Data
["Others, of the older fishermen, looked at him and were sad.", "noteangry"]

Package Sidebar

Install

npm i ridibooks-reading-note-api

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • incleaf