Note
Install via npm
npm i -S @tsei/note
Get Started
git clone https://github.com/tseijp/note
-
cd note
,npm i
andnpm start
- open browser and visit http://localhost:3000
- Now you can go to our demo, and try its usage.
Recipes
Component |
Input Values |
Return Values |
|
Notemanage note data and api |
<Note url="..."
fetcher={...}
{...config}>
{(note, set) =>
<>{/*_*/}</>
}
</Note> |
|
|
Usermanage user info and API |
<User url="..."
fetcher={...}
{...config}>
{(user, set) =>
<>{/*_*/}</>
}
</User> |
|
|
Available API
URL | Description |
---|---|
/auth/ | Distribute Auth Token |
/api/ | Restful Api Router |
/api/note/ | Note Api |
key of /api/note
|
Description |
---|---|
next | next pagination url |
previous | previous pagination url |
results | seriaized data as array |
results[0].id | primary key |
results[0].note_id | primary key of parent |
results[0].ja_text | text data |
results[0].en_text | text data |
results[0].is_author | whether request user is author |
results[0].posted_time | time when it was posted |
results[0].author_name | username of posted user |