Tristan B. Velloza Kildaire
8483a60da8
- Added missing documentaion string for `authWithPassword()`
2023-01-05 11:28:12 +02:00
Tristan B. Velloza Kildaire
6b47078b89
- Fixed up API to have seperate `createRecord()` (for base collections) and `createRecordAuth()` (for auth collections)
...
- Privatized and renamed the old `createRecord()` -> `createRecord_internal()`
2023-01-05 11:25:24 +02:00
Tristan B. Velloza Kildaire
f23a4c40bb
- Implemented `createRecordAuth()` which is to be used for creating authentication records as it has compile-time guarantees about the fields required in a struct for such a procedure
2023-01-05 11:22:35 +02:00
Tristan B. Velloza Kildaire
6a5e1d60ee
- Implemented `authWithPassword()` which provides a token back after providing authentication details
...
- Added unittest for `authWithPassword()`
2023-01-05 11:19:38 +02:00
Tristan B. Velloza Kildaire
cda2e6e54f
- Fixed the use of `serializeRecord` and `fromJSON` in README.md serialization/deserialization examples
2023-01-02 16:38:08 +02:00
Tristan B. Velloza Kildaire
78100faaef
- Privatized static method `isAbleCheck()` in PocketBase
2023-01-02 16:32:08 +02:00
Tristan B. Velloza Kildaire
2550e12496
- Privatised testing enum `EnumType` in serialization.d unit test
2023-01-02 16:28:04 +02:00
Tristan B. Velloza Kildaire
87b564f4e5
- Cleaned up serialization.d and deserialization.d imports
2023-01-02 16:21:20 +02:00
Tristan B. Velloza Kildaire
eeabd9173e
Merge branch 'master' of github.com:Hax-io/libpb
2023-01-02 16:16:00 +02:00
Tristan B. Velloza Kildaire
15fe95f532
Refactored various components into their own modules
2023-01-02 16:14:47 +02:00
Tristan B. Velloza Kildaire
f88ea15f38
Added link to full API docs
2023-01-02 15:59:19 +02:00
Tristan B. Velloza Kildaire
3e853e7431
- Added authentication token support on a per-instance basis, this adds `setAuthToken(string)` and `string getAuthToken()`
...
- Authentication tokens that are `""` (empty) will not cause headers to be added
2023-01-02 15:55:36 +02:00
Tristan B. Velloza Kildaire
4bb0c225af
- Removed stray `writeln()` without a wrapping `debug(dbg)`
2023-01-02 14:17:49 +02:00
Tristan B. Velloza Kildaire
f06dcaf8f5
- Fixed the filtering in `listRecords()`, now escaping is automatically done
...
- Added test cases for testing the filtering in `listRecords()`
- `libcurl` is now a dependency, for linking against the object files (see `.dub.json`)
2023-01-02 14:15:44 +02:00
Tristan B. Velloza Kildaire
889e07040e
Added filtering support to \'listRecords()\'
2023-01-01 08:36:27 +02:00
Tristan B. Velloza Kildaire
960eef4934
Removed stray debug print
2022-12-30 16:10:19 +02:00
Tristan B. Velloza Kildaire
4db1d40759
Fixed creation of auth-type records in `createRecord()`
2022-12-30 16:09:44 +02:00
Tristan B. Velloza Kildaire
e44fbf3189
Added more exception types for handling various error codes
2022-12-30 14:23:56 +02:00
Tristan B. Velloza Kildaire
1027e5580f
- Improved error handling with more specific errors
...
- Error 404 (when a record is not found) is now translated into `RecordNotFoundException`
- Added documentation
- Added unittest updates to test the usage of `RecordNotFoundException` in `deleteRecord()`, `viewRecord()` and `updateRecord()`
2022-12-30 14:01:04 +02:00
Tristan B. Velloza Kildaire
0b0a8d2b31
Updated usage
2022-12-30 13:18:16 +02:00
Tristan B. Velloza Kildaire
98723c0772
SIlent when not using -ddbg
2022-12-30 13:14:20 +02:00
Tristan B. Velloza Kildaire
c651b9d515
- `listRecords()` now returns an array of records
...
- Added unittests for `listRecords()`
2022-12-30 13:10:10 +02:00
Tristan B. Velloza Kildaire
1594943561
Updated usage
2022-12-29 21:37:28 +02:00
Tristan B. Velloza Kildaire
c2597788d7
- Implemented `viewRecord()`
...
- Added unittests for `viewRecord()`
2022-12-29 21:30:52 +02:00
Tristan B. Velloza Kildaire
9cfed9b33d
- `updateRecord()` now returns the updated record
2022-12-29 19:56:40 +02:00
Tristan B. Velloza Kildaire
1eab9e19b3
- Fixed compilation error when using meta-programming techniques in `updateRecord()`
...
- Added unittests for `updateRecord()`
2022-12-29 19:54:16 +02:00
Tristan B. Velloza Kildaire
b894b6e1c6
Updated usage examples with record management and updated assertions
2022-12-29 19:47:27 +02:00
Tristan B. Velloza Kildaire
0cd17f976e
- Added test case for object de-serialization
2022-12-29 19:39:45 +02:00
Tristan B. Velloza Kildaire
8b2ce3bce2
Added schema for unit tests
2022-12-29 18:48:54 +02:00
Tristan B. Velloza Kildaire
626660216b
- Ensure that any generic RecordType has an `id` field of type `string`
...
- `createRecord()` now returns the record created
- Implemented record deletion via `deleteRecord()`
- Removed unused alias
- Added assert on failure to deserialize
- Added record creation and deletion unit tests
2022-12-29 18:42:32 +02:00
Tristan B. Velloza Kildaire
e5e75f1712
Silent debug
2022-12-29 17:14:36 +02:00
Tristan B. Velloza Kildaire
4046f15230
Added enum support
2022-12-29 17:13:56 +02:00
Tristan B. Velloza Kildaire
ccc2a5cf31
Make testing prints and pragmas only enabled under `-ddbg` flag
2022-12-29 15:55:08 +02:00
Tristan B. Velloza Kildaire
a3d19fc515
Renamed module
2022-12-29 15:41:22 +02:00
Tristan B. Velloza Kildaire
0c4eecaad3
- Added example usage of serialization/deserialization to README
...
- Changed targetType in dub.json to library
2022-12-29 15:28:51 +02:00
Tristan B. Velloza Kildaire
3c6a81791b
Initial commit
2022-12-29 15:24:07 +02:00