{"id":23512682,"url":"https://github.com/creoone/exam891","last_synced_at":"2025-05-13T19:28:08.988Z","repository":{"id":264849408,"uuid":"893994674","full_name":"CreoOne/Exam891","owner":"CreoOne","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-26T18:32:06.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-25T13:19:03.327Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CreoOne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-25T15:09:24.000Z","updated_at":"2024-11-26T18:32:09.000Z","dependencies_parsed_at":"2024-11-26T13:23:16.630Z","dependency_job_id":"3d3b3647-ec44-4ae8-bd48-52589cbfe280","html_url":"https://github.com/CreoOne/Exam891","commit_stats":null,"previous_names":["creoone/exam891"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreoOne%2FExam891","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreoOne%2FExam891/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreoOne%2FExam891/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreoOne%2FExam891/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CreoOne","download_url":"https://codeload.github.com/CreoOne/Exam891/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239195481,"owners_count":19598038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-25T13:19:04.210Z","updated_at":"2025-02-16T21:17:44.856Z","avatar_url":"https://github.com/CreoOne.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Exam891\r\n\r\n## Build\r\n\r\nThis project depends on .NET 8 SDK\r\n\r\nIn `./sources` directory:\r\n\r\n```\r\ndotnet build\r\n```\r\n\r\n## Run\r\n\r\nMain executable is called `Exam891.Cli` and it will enter interactive mode, where application reads user input until end of line character is typed.\r\n\r\n### Running from build artifacts\r\n\r\nCurrently the application can only be executed from build artifacts.\r\n\r\nIn order to start the app, please go to:\r\n\r\n- `sources/Exam891.Cli/bin/Debug/net8.0`\r\n- `sources/Exam891.Cli/bin/Release/net8.0`\r\n\r\n_(Depends on build configuration)_\r\n\r\n### Arguments\r\n\r\nExecutable requires arguments which can be used like this:\r\n\r\n```\r\n./Exam891.Cli.exe --bookings bookings.json --hotels hotels.json\r\n```\r\n\r\n#### Bookings (required)\r\n\r\nLocates JSON file where bookings information is provided and then loads it into application memory. This file is not written to.\r\n\r\n_Json file structure with accordance to provided documentation_\r\n\r\nExample:\r\n\r\n```\r\n--bookings bookings.json\r\n```\r\n\r\n#### Hotels (required)\r\n\r\nLocates JSON file where hotels information is provided and then loads it into application memory. This file is not written to.\r\n\r\n_Json file structure with accordance to provided documentation_\r\n\r\nExample:\r\n\r\n```\r\n--hotels hotels.json\r\n```\r\n\r\n### Commands\r\n\r\nCommands can be typed in after application is correctly started.\r\n\r\n**Commands and parameters are case sensitive**\r\n\r\n#### Search\r\n\r\nSearch query allows to retrieve information about available rooms from now until specified range in days.\r\n\r\n- `hotelId` (string) - identifies which hotel this search is related to\r\n- `daysLimit` (int) - specifies how far in the future search needs to be performed (in days)\r\n- `roomType` (string) - identifies which room type this search is related to\r\n\r\nExample:\r\n\r\n```javascript\r\nSearch(HotelName, 40, SGL)\r\n```\r\n\r\nReturns time range and amount of available rooms for this range.\r\n\r\nExample:\r\n\r\n```\r\n(20241125-20241201, 2),\r\n(20241201-20241203, 1),\r\n(20241203-20251125, 2)\r\n```\r\n\r\n#### Availability\r\n\r\nAvailability query allows to retrieve information about number of available rooms for specific day or date range.\r\n\r\n- `hotelId` (string) - identifies which hotel this search is related to\r\n- `date` (date) - specifies the day for which the availability check needs to be performed (cannot be used with `dateRange` parameter)\r\n- `dateRange` (date range) - specifies the start and end date range (separated with `-` character) for which the availability check needs to be performed (cannot be used with `date` parameter)\r\n- `roomType` (string) - identifies which room type this search is related to\r\n\r\nExamples:\r\n\r\n```javascript\r\nAvailability(H1, 20241201, SGL)\r\nAvailability(H1, 20241201-20241203, DBL)\r\n```\r\n\r\nReturns number of available rooms for this range. Note: this is number of the best availability in provided range, it does not imply that all the rooms are available all the time. See `Search` command for more detailed information.\r\n\r\nExample:\r\n\r\n```\r\n2\r\n```\r\n\r\n#### Exit\r\n\r\nTo exit the interactive mode of application, just type in the empty line.\r\n\r\n## Technical overview\r\n\r\nThis project was created with simplicity and extensibility in mind. Although it is not implemented yet, it is possible to embed almost all of its functionality inside Web App or more pipeline friendly version of CLI.\r\n\r\n### Project structure\r\n\r\n- `sources/Exam891.Cli/` - contains logic related to running this application from CLI, like parsing arguments, parsing commands, main control etc.\r\n- `sources/Exam891.Core/` - contains logic related to algorithmic side of the application, like parsing json files, storing, retrieving and processing hotels and bookings information.\r\n- `sources/Exam891.Cli.Tests` - contains tests related to `Exam891.Cli` project.\r\n- `sources/Exam891.Core.Tests` - contains tests related to `Exam891.Core` project.\r\n\r\n## Notes\r\n\r\n- Used CoPilot for accelerating productivity\r\n- Written using Visual Studio 2022 and Visual Studio Code\r\n- Assumed all dates are written in UTC","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreoone%2Fexam891","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreoone%2Fexam891","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreoone%2Fexam891/lists"}