1. save_data
2. get_count_data
- used to count the number of entries stored in a repo
- syntax:
get_data_count(key)
3. get_data
- used to get the data list of a repo
- syntax:
get_data(key, per_page, page, order, sort)
in which:
- key (string): repository name
- per_page (int): number of entries on a page
- page (int): current page
- order (string): filter by list. usually id or time.
- sort (string): usually asc or desc
4. get_data_by_id
- used to get data according to id field of that data
- syntax:
get_data(key, id)
- result: array
[
'id' => 1,
'data' => [
'title' => 'Hello world!',
'content' => 'We are wap4 community'
],
'time' => 123456
]
5. check_data
used to check repo entries by id field. If the item exists, it returns true, otherwise false
- syntax:
check_data(key, id)
6. update_data_by_id
7. delete_data_by_id
8. delete_data_by_key
- syntax:
delete_data_by_key(key)