https://github.com/silverbucket/remotestorage-module-flashcards
a remoteStorage data model for flash cards
https://github.com/silverbucket/remotestorage-module-flashcards
remotestorage remotestorage-module
Last synced: 9 months ago
JSON representation
a remoteStorage data model for flash cards
- Host: GitHub
- URL: https://github.com/silverbucket/remotestorage-module-flashcards
- Owner: silverbucket
- License: mit
- Created: 2018-08-23T22:34:22.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-07T15:07:28.000Z (over 7 years ago)
- Last Synced: 2024-04-25T10:44:16.986Z (about 2 years ago)
- Topics: remotestorage, remotestorage-module
- Language: JavaScript
- Homepage: https://remotestoragejs.readthedocs.io/en/latest/data-modules.html
- Size: 81.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## flashcards
A remoteStorage data module for flashcards.
Maintained by Nick Jennings
All flashcards are stored as timestamps.
* [flashcards](#module_flashcards)
* [store(frontText, backText)](#exp_module_flashcards--store) ⇒ Promise ⏏
* [remove(group, id)](#exp_module_flashcards--remove) ⇒ Promise ⏏
* [get(id)](#exp_module_flashcards--get) ⇒ object ⏏
* [listGroups()](#exp_module_flashcards--listGroups) ⇒ Promise ⏏
* [getAllByGroup(group)](#exp_module_flashcards--getAllByGroup) ⇒ Promise ⏏
### store(frontText, backText) ⇒ Promise ⏏
Stores a flashcard
**Kind**: Exported function
**Returns**: Promise - A promise, which will be fulfilled with the updated flashcard object
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| frontText | string | Filename |
| backText | string | Filename |
**Example**
```js
remoteStorage.flashcards.store(flashcard)
.then((flashcard) => { console.log(`the updated flashcard object is: ${flashcard}`)
```
### remove(group, id) ⇒ Promise ⏏
Remove a flashcard
**Kind**: Exported function
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| group | string | The group name of the flashcard |
| id | string | The ID of the flashcard |
### get(id) ⇒ object ⏏
Get a flashcard.
**Kind**: Exported function
**Returns**: object - The flashcard object
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| id | string | the ID of the flashcard |
### listGroups() ⇒ Promise ⏏
List all flashcard groups
**Kind**: Exported function
**Returns**: Promise - Resolves with an array containing the flashcard group names
**Access**: public
### getAllByGroup(group) ⇒ Promise ⏏
List all flashcards in a group
**Kind**: Exported function
**Returns**: Promise - Resolves with an array containing all the flashcard objects of that group
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| group | string | the name of the group |