|
f802a56913
|
Added the delete_photo subcommand and its according tests
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-11-04 18:48:40 +01:00 |
|
|
cf0d1e2591
|
Unset album_id as mandatory in photo::add and set it as unsorted if not provided
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-11-03 23:39:51 +01:00 |
|
|
53e56f9122
|
Added basic Photo::add support, untested as of now
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-11-03 23:30:02 +01:00 |
|
|
230cb328d5
|
Added the set_public_album command and the according tests
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-11-02 22:11:02 +01:00 |
|
|
f77667b44f
|
Fixed typo in main.rs
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-11-02 09:29:21 +01:00 |
|
|
1fbfa1b122
|
Added the set_description_album command and the according tests
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-11-02 09:25:52 +01:00 |
|
|
50aec4c297
|
Added the set_title_album command and the according tests
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-11-01 23:03:08 +01:00 |
|
|
c261ab588f
|
Added the delete_album command and the according tests
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-11-01 22:13:12 +01:00 |
|
|
a50d19a2a1
|
Added the add_album command and the according tests
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-11-01 14:47:42 +01:00 |
|
|
ae36e25196
|
Added a method to query data about a specific album using its id, with the according unit tests
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-31 21:27:57 +01:00 |
|
|
c74335828d
|
Renamed the subcommand 'albums --get' to 'get_albums' for better documentation and easier handling
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-31 18:42:26 +01:00 |
|
|
a790e2534d
|
Added a unit test in albums.rs
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-31 18:37:34 +01:00 |
|
|
7f8312d0c2
|
Using tabled to show the values from get_albums
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-29 09:45:57 +02:00 |
|
|
b587f8e7fb
|
Replaced the json crate with serde_json
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-28 15:19:24 +02:00 |
|
|
912908a56d
|
No need to panic on first run
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-27 12:02:09 +02:00 |
|
|
c84646671e
|
Refactored the whole project to have a proper config file system instead of using a .env file
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-27 11:44:15 +02:00 |
|
|
636e77ab05
|
Refactored the main.rs file to have utils functions under the main, to improve readability and added a way to check and create missing folders and config files
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-26 22:14:54 +02:00 |
|
|
09388e8a36
|
Refactored the cookie session system to only send the name=value part instead of the whole cookie
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-26 21:34:05 +02:00 |
|
|
997c7b15bf
|
Added the album subcommand and the get arg, to query all albums
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-26 16:53:49 +02:00 |
|
|
f32becf5f5
|
Added a check to return an empty string when attempting to read a file that doesn't exist
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-26 16:35:02 +02:00 |
|
|
901ef7818d
|
Added the logout subcommand and show by default the app help when no subcommand is provided
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-26 11:54:52 +02:00 |
|
|
41b78b3bdb
|
Refactored to use the dirs crate to get the config files easily
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-26 11:20:07 +02:00 |
|
|
16f52a330b
|
Added a way to save files easily
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-26 11:02:31 +02:00 |
|
|
c37beb32c2
|
Implemented a function to give the configuration folder based on XDG_CONFIG_HOME and by default ~/.config/ suffixed with the program name
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-25 20:39:50 +02:00 |
|
|
8520b1e8a3
|
Refactored to only return lychee_session cookie and to return String from login function
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-25 11:58:24 +02:00 |
|
|
028adbff93
|
Added a structure to hold all of our recurrent and needed data that can be passed to all functions
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-24 00:01:36 +02:00 |
|
|
25fa9e74fa
|
Refactored to give username and password to login function as parameters, and use the clap framework to built the command line interface
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-23 23:35:30 +02:00 |
|
|
8e8dcece2d
|
lychee_session => &lychee_session in logout
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-21 17:10:17 +02:00 |
|
|
14d801d907
|
Added logout method and its correspoding tests
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-21 16:48:04 +02:00 |
|
|
e27c4e5f00
|
Added more tests for session::login
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-21 00:02:16 +02:00 |
|
|
f7ffe1473f
|
Refactored .env files to use more specific names, to avoid collision
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-20 11:48:27 +02:00 |
|
|
b6dd77f26d
|
Added a first draft for the client unit testing using mockito
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-20 11:47:13 +02:00 |
|
|
539bf51bab
|
Replaced dotenv::var with std::env::var
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-19 23:04:43 +02:00 |
|
|
567e750f73
|
Refactored to separate session and albums related functions
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-19 11:40:02 +02:00 |
|
|
a949f196c8
|
Added test body_to_str_not_empty
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-18 10:45:07 +02:00 |
|
|
cb9d1d50fd
|
Added test in CI/CD
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-18 10:22:54 +02:00 |
|
|
43750ab47a
|
Added test draft
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-18 10:21:47 +02:00 |
|
|
a07c11228f
|
Removed useless timelife
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-18 09:36:00 +02:00 |
|
|
c3882de838
|
Added get_albums and refactoring to make code more usable and less coupled
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-17 23:36:18 +02:00 |
|
|
6ef99ec389
|
Added json crate to dependencies
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-17 23:31:27 +02:00 |
|
|
80765c2bbd
|
Added USERNAME and PASSWORD fields in .env
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-17 23:30:41 +02:00 |
|
|
503323aac9
|
Added missing slash to LYCHEE_ENPOINT concatenation
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-17 10:19:36 +02:00 |
|
|
603e8127f9
|
Added string concatenation to only have to set the base URI for lychee instance
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-17 10:17:34 +02:00 |
|
|
d30656cc45
|
Added API_KEY to .env
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-17 10:16:46 +02:00 |
|
|
21fe4418f2
|
Added POST call for Session::init for demo purposes
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-16 22:20:46 +02:00 |
|
|
0907126f09
|
Added .env to gitignore
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-16 22:18:48 +02:00 |
|
|
70ca346e93
|
Switched to a .env config file
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-16 22:17:57 +02:00 |
|
|
43d9f7c71d
|
Updated Cargo.lock
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-15 10:05:30 +02:00 |
|
|
0a76255b75
|
Changed Rust edition for 2018
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-15 09:15:56 +02:00 |
|
|
3f5cfb7a14
|
Added CI configuration
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
|
2021-10-15 09:12:33 +02:00 |
|