Tristan B. Velloza Kildaire
aa77afccac
- Added logo
2023-01-09 12:21:52 +02:00
Tristan B. Velloza Kildaire
da22ae1c61
- Now using `jstruct` for serialization/deserialization (see Hax-io/jstruct for details)
...
- Updated .gitignore to exclude dub.selections.json
2023-01-09 11:19:11 +02:00
Tristan B. Velloza Kildaire
4fc4242c1e
- Moved back to more clean templating method (for now till a fix can be found for the type lookups for issue #7 )
2023-01-09 10:28:56 +02:00
Tristan B. Velloza Kildaire
c89d6bd8b6
Updated .gitignore
2023-01-08 13:36:28 +02:00
Tristan B. Velloza Kildaire
707a1b9373
- `fromJSON()` now throws `RemoteFieldMissing` exception if the input JSON does not have a field found in the input struct type `RecordType`
...
- Added a unittest to test the above
2023-01-08 13:36:01 +02:00
Tristan B. Velloza Kildaire
3d9b9a4976
- Attempt to mixin properly
2023-01-06 16:42:40 +02:00
Tristan B. Velloza Kildaire
b10c7d928d
Attempt at fixing enum type lookups (anything not implicitly in scope of mixin such as built-in types)
2023-01-06 16:38:34 +02:00
Tristan B. Velloza Kildaire
2f5710fafb
- Removed uneeded public imports
2023-01-06 16:38:03 +02:00
Tristan B. Velloza Kildaire
d89b7159dd
- Ensure that `serializeRecord()` and `fromJSON()` are publically imported as part of the package import to fix user-defined types lookups (such as enums)
2023-01-06 15:30:59 +02:00
Tristan B. Velloza Kildaire
5c0dcfe15b
Updated testing DB schema
2023-01-05 13:01:53 +02:00
Tristan B. Velloza Kildaire
b9a2254a66
- Removed uneeded default arguments
2023-01-05 13:01:13 +02:00
Tristan B. Velloza Kildaire
1b3ef337a5
- Now `updateRecord()` is for base collections and `updateRecordAuth()` is for auth collections
2023-01-05 12:58:51 +02:00
Tristan B. Velloza Kildaire
571e8dea81
- Mixin template `MemberAndType` should be private (not user-accessibe)
2023-01-05 12:50:36 +02:00
Tristan B. Velloza Kildaire
199b1f0120
- Now `listRecords()` is for base collections and `listRecordsAuth()` is for auth collections
...
- Now `viewRecord()` is for base collections and `viewRecordAuth()` is for auth collections
- Updated unittests accordingly
2023-01-05 12:36:36 +02:00
Tristan B. Velloza Kildaire
6da8696926
- Added documentation string to `NetworkException`
2023-01-05 11:33:00 +02:00
Tristan B. Velloza Kildaire
2c8141f5b6
Added all integral types
2023-01-05 11:31:42 +02:00
Tristan B. Velloza Kildaire
4a287864ee
- Fixed API call in usage example
2023-01-05 11:29:11 +02:00
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