toc_doc 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3637aae8586b1ea3b5b568a4ef64a295b3e3664ada7d252163e8176ce429aa37
4
+ data.tar.gz: da283d2f5efd9c37b7f6b20d6bc207dcb79f826850b8d7d0953157473f36345f
5
+ SHA512:
6
+ metadata.gz: 79a3d614929d14b5709dec397ab39a78c07db2db0e31da2e2de7423af8da4a1af5b5dbc77f3943da8b104ab25b85531328e739697384fb7a8a53451320bf9951
7
+ data.tar.gz: 962d1c35bb6ede7899491b93e0f00c868a3aa87ffe4a32b076576b0017d96ff09e3214eb37000bee0ba40f43269597c75d21daf18c77e92787b39d61b29b4696
data/.env.example ADDED
@@ -0,0 +1,17 @@
1
+ # Example environment configuration for TocDoc
2
+ # Copy this file to `.env` and adjust values as needed.
3
+
4
+ # Base API endpoint (supports other regions like .de, .it)
5
+ # TOCDOC_API_ENDPOINT=https://www.doctolib.fr
6
+
7
+ # Custom user agent sent with each request
8
+ # TOCDOC_USER_AGENT=TocDoc Ruby Gem
9
+
10
+ # Default media type for requests
11
+ # TOCDOC_MEDIA_TYPE=application/json
12
+
13
+ # Default pagination limit
14
+ # TOCDOC_PER_PAGE=3
15
+
16
+ # Max retry attempts for transient HTTP errors
17
+ # TOCDOC_RETRY_MAX=3
data/.yardopts ADDED
@@ -0,0 +1,12 @@
1
+ --markup markdown
2
+ --output-dir doc
3
+ --readme README.md
4
+ --title "TocDoc Ruby Gem Documentation"
5
+ --charset utf-8
6
+ --protected
7
+ --no-private
8
+ --hide-void-return
9
+ lib/**/*.rb
10
+ -
11
+ CHANGELOG.md
12
+ LICENSE.md
data/CHANGELOG.md ADDED
@@ -0,0 +1,22 @@
1
+ ## [Unreleased]
2
+
3
+ ## [1.0.0] - 2026-03-04
4
+
5
+ ### Added
6
+
7
+ - **Client** — `TocDoc::Client` with configurable options, method delegation from top-level `TocDoc` module, and block-based `TocDoc.setup`
8
+ - **Configuration** — 7 config keys (`api_endpoint`, `user_agent`, `middleware`, `connection_options`, `default_media_type`, `per_page`, `auto_paginate`) with environment variable overrides (`TOCDOC_API_ENDPOINT`, etc.)
9
+ - **Availabilities endpoint** — `Client#availabilities` supporting `visit_motive_ids`, `agenda_ids`, `start_date`, `limit`, and arbitrary extra query params
10
+ - **Pagination** — automatic multi-page fetching via `auto_paginate` option; merges results across pages using `next_slot`-based page advancement
11
+ - **Response models** — `TocDoc::Response::Availability` wrapping the API response with `#total`, `#next_slot`, `#availabilities` (filtered) and `#raw_availabilities` (unfiltered)
12
+ - **Resource base model** — `TocDoc::Resource` with dot-notation attribute access, bracket access, and Hash equality
13
+ - **Availability model** — `TocDoc::Availability` with `#date` and `#slots`
14
+ - **Error handling** — `TocDoc::Error` base class and `TocDoc::Middleware::RaiseError` Faraday middleware wrapping Faraday errors
15
+ - **Connection layer** — Faraday-based HTTP with `get`, `post`, `put`, `patch`, `delete`, `head` and a default middleware stack (retry, raise_error, JSON parsing)
16
+ - **Retry middleware** — automatic retries (up to 3, configurable via `TOCDOC_RETRY_MAX`) with exponential backoff on `429`, `5xx` errors
17
+ - **URI utilities** — `#dashed_ids` helper for Doctolib's dash-separated ID format
18
+ - **YARD documentation**
19
+
20
+ ## [0.1.0] - 2026-02-27
21
+
22
+ - Initial build
@@ -0,0 +1,10 @@
1
+ # Code of Conduct
2
+
3
+ "tocdoc" follows [The Ruby Community Conduct Guideline](https://www.ruby-lang.org/en/conduct) in all "collaborative space", which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.):
4
+
5
+ * Participants will be tolerant of opposing views.
6
+ * Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
7
+ * When interpreting the words and actions of others, participants should always assume good intentions.
8
+ * Behaviour which can be reasonably considered harassment will not be tolerated.
9
+
10
+ If you have any concerns about behaviour within this project, please contact us at ["m.louguet@gmail.com"](mailto:"m.louguet@gmail.com").