clockify_detailed_reports_api_docs 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: 414310f636ee7f1c54de4fa35715b685ffd04dfb3d0c088ba6c7b70009801d23
4
+ data.tar.gz: cd2cb66ec833601964dbb78b091c30c07520c1f457cee2040bb681c4bd432843
5
+ SHA512:
6
+ metadata.gz: ffc83ab72d73afeffdd6f418bb3eb027d3964126d457465f048d1a9fe3898ee5fbc5bad881121b6cb244e4a562d5c8cdf719a5a8f1437c7dd1503713b6b23384
7
+ data.tar.gz: 62b478659fe6e7be9c7f54b4ea916a34e7f625924805466528a1921b3699a764c1a72d843bf78610c9c2f6f74746d2238e1d745d053a2eacb96329df7282346a
data/CHANGELOG.md ADDED
@@ -0,0 +1,56 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2025-08-23
9
+
10
+ ### Added
11
+ - Initial release of comprehensive Clockify Detailed Reports API documentation
12
+ - Complete parameter reference with 60+ documented parameters
13
+ - 43+ documented error conditions with solutions
14
+ - Three documentation formats: User Guide, Complete Reference, and Internal Documentation
15
+ - Search functionality across all documentation
16
+ - Error listing and categorization
17
+ - Real-world implementation examples
18
+
19
+ ### Discovered
20
+ - 3 new validation errors not in official Clockify documentation:
21
+ - summaryFilter Groups Limit: Groups array must have 1-3 valid group types (Code 501)
22
+ - Invalid Group Names: Must use enum values like PROJECT, CLIENT, USER (Code 501)
23
+ - AttendanceFilter Page Limit: Different limit (201) than main filter (1000) (Code 501)
24
+
25
+ ### Corrected
26
+ - AttendanceFilter maximum pageSize is 201, not 1000 as documented
27
+ - AttendanceFilter sortColumn "NAME" fails, must use "USER" instead
28
+ - summaryFilter requires specific enum values, not custom IDs
29
+ - Empty strings in sortColumn, amountShown, exportType cause server crashes
30
+
31
+ ### Features
32
+ - `ClockifyApiDocs.documentation` - Main documentation access
33
+ - `ClockifyApiDocs.user_guide` - Beginner-friendly guide
34
+ - `ClockifyApiDocs.complete_reference` - Complete technical reference
35
+ - `ClockifyApiDocs.internal_documentation` - Internal/team documentation
36
+ - `Documentation#search(query)` - Search across all documentation
37
+ - `Documentation#list_errors` - List all documented errors
38
+ - `Documentation#save_all_to_directory(path)` - Export documentation
39
+ - `Documentation#endpoint_info` - API endpoint information
40
+ - `Documentation#quick_start_example` - Basic usage example
41
+
42
+ ### Documentation Coverage
43
+ - Complete API endpoint documentation
44
+ - Authentication and setup instructions
45
+ - All request parameters with examples
46
+ - Response structure documentation
47
+ - Error handling with 40+ error conditions
48
+ - Production considerations and best practices
49
+ - Real-world implementation examples
50
+ - Troubleshooting guides
51
+
52
+ ### Based On
53
+ - Systematic API testing with automated error discovery
54
+ - Real-world validation of all parameters and edge cases
55
+ - Corrections to official Clockify API documentation
56
+ - Battle-tested in production environments
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Clockify API Docs Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,222 @@
1
+ # ClockifyApiDocs
2
+
3
+ 🚀 **Battle-tested Clockify Detailed Reports API documentation** - More accurate than official documentation!
4
+
5
+ 📊 **IMPORTANT**: This gem is **ONLY** for the Clockify **Detailed Reports API endpoint** (`POST /reports/detailed`). It's **NOT** general Clockify API documentation.
6
+
7
+ Based on comprehensive API testing, this gem provides complete documentation specifically for the Clockify Detailed Reports API endpoint with 43+ documented error conditions and corrections to the official Clockify specification.
8
+
9
+ ## 🔍 What Makes This Special
10
+
11
+ - **43+ documented API errors** discovered through systematic testing
12
+ - **Corrections to official Clockify documentation** - our testing found errors in the official spec
13
+ - **3 newly discovered validation errors** not documented anywhere else
14
+ - **Complete parameter reference** with real-world examples
15
+ - **AttendanceFilter corrections** - different limits than documented (201 vs 1000)
16
+ - **summaryFilter enum requirements** - must use specific enum values
17
+
18
+ ## 📦 Installation
19
+
20
+ Add this line to your application's Gemfile:
21
+
22
+ ```ruby
23
+ gem 'clockify_detailed_reports_api_docs'
24
+ ```
25
+
26
+ And then execute:
27
+
28
+ $ bundle install
29
+
30
+ Or install it yourself as:
31
+
32
+ $ gem install clockify_detailed_reports_api_docs
33
+
34
+ ## 🚀 Usage
35
+
36
+ ```ruby
37
+ require 'clockify_api_docs'
38
+
39
+ # Quick access to documentation
40
+ puts ClockifyApiDocs.user_guide # Beginner-friendly guide
41
+ puts ClockifyApiDocs.complete_reference # Complete technical reference
42
+ puts ClockifyApiDocs.internal_documentation # Internal team documentation
43
+
44
+ # Access documentation object
45
+ docs = ClockifyApiDocs.documentation
46
+
47
+ # Save all documentation to a folder
48
+ docs.save_all_to_directory('/path/to/save/docs')
49
+
50
+ # Search documentation
51
+ results = docs.search('attendanceFilter')
52
+ results.each do |result|
53
+ puts "Found in #{result[:document]}: #{result[:content]}"
54
+ end
55
+
56
+ # List all documented errors
57
+ errors = docs.list_errors
58
+ puts "Total errors documented: #{errors.length}"
59
+
60
+ # Get endpoint information
61
+ endpoint = docs.endpoint_info
62
+ puts "API Endpoint: #{endpoint[:url]}"
63
+
64
+ # Get quick start example
65
+ example = docs.quick_start_example
66
+ puts example[:minimal].to_json
67
+ ```
68
+
69
+ ### Available Documentation
70
+
71
+ - **User Guide** (`user_guide`) - Beginner-friendly guide with copy-paste examples
72
+ - **Complete Reference** (`complete_reference`) - Technical reference with all 60+ parameters
73
+ - **Internal Documentation** (`internal_documentation`) - Team/enterprise documentation
74
+
75
+ ## 📚 What's Included
76
+
77
+ ### Complete API Coverage
78
+ - **Endpoint**: POST `/reports/detailed`
79
+ - **Authentication**: X-Api-Key header setup
80
+ - **All Parameters**: 60+ parameters documented with examples
81
+ - **Response Structure**: Complete response format
82
+ - **Error Handling**: 43+ error conditions with solutions
83
+
84
+ ### Key Discoveries
85
+ - **AttendanceFilter** has max pageSize of 201 (not 1000 as documented)
86
+ - **summaryFilter.groups** requires 1-3 specific enum values
87
+ - **Empty strings** in certain parameters cause server crashes
88
+ - **Official sortColumn values** for AttendanceFilter are incorrect
89
+
90
+ ### Documentation Types
91
+
92
+ #### 1. User Guide
93
+ Perfect for beginners:
94
+ ```ruby
95
+ ClockifyApiDocs.user_guide
96
+ ```
97
+ - Simple explanations
98
+ - Copy-paste ready examples
99
+ - Common use cases
100
+ - Troubleshooting guide
101
+
102
+ #### 2. Complete Technical Reference
103
+ For developers:
104
+ ```ruby
105
+ ClockifyApiDocs.complete_reference
106
+ ```
107
+ - All 60+ parameters explained
108
+ - Complete examples
109
+ - All error conditions
110
+ - Advanced filtering options
111
+
112
+ #### 3. Internal Documentation
113
+ For teams and enterprises:
114
+ ```ruby
115
+ ClockifyApiDocs.internal_documentation
116
+ ```
117
+ - Production considerations
118
+ - Security best practices
119
+ - Implementation examples
120
+ - Monitoring guidelines
121
+
122
+ ## 🔧 API Quick Start
123
+
124
+ ⚠️ **This gem covers ONLY this specific endpoint:**
125
+ ```
126
+ POST https://reports.api.clockify.me/v1/workspaces/{workspaceId}/reports/detailed
127
+ ```
128
+
129
+ 🚫 **NOT covered**: Other Clockify API endpoints like time entries, projects, users, etc.
130
+
131
+ Minimal required request:
132
+ ```json
133
+ {
134
+ "dateRangeStart": "2024-01-01T00:00:00.000Z",
135
+ "dateRangeEnd": "2024-12-31T23:59:59.999Z",
136
+ "detailedFilter": {
137
+ "page": 1,
138
+ "pageSize": 100
139
+ }
140
+ }
141
+ ```
142
+
143
+ ## 🚨 Critical Warnings
144
+
145
+ Based on our testing, avoid these common issues:
146
+
147
+ - **Never use empty strings** in `sortColumn`, `amountShown`, or `exportType` - causes server crashes
148
+ - **AttendanceFilter pageSize** max is 201, not 1000
149
+ - **summaryFilter.groups** cannot be empty - needs 1-3 enum values
150
+ - **Date format must be exact**: `YYYY-MM-DDTHH:MM:SS.sssZ`
151
+
152
+ ## 🎯 Real-World Examples
153
+
154
+ ### Monthly Invoice Generation
155
+ ```ruby
156
+ # Get the example from the gem
157
+ docs = ClockifyApiDocs.documentation
158
+ invoice_example = docs.complete_reference.match(/Invoice Generation[\s\S]*?```json([\s\S]*?)```/)[1]
159
+ ```
160
+
161
+ ### Team Productivity Report
162
+ ```ruby
163
+ # Search for team examples
164
+ results = docs.search('team productivity')
165
+ ```
166
+
167
+ ## 🔍 Search Documentation
168
+
169
+ ```ruby
170
+ # Search across all documentation
171
+ results = ClockifyApiDocs.documentation.search('attendanceFilter')
172
+
173
+ # Search for specific error codes
174
+ error_results = ClockifyApiDocs.documentation.search('400/501')
175
+
176
+ # Find parameter examples
177
+ param_results = ClockifyApiDocs.documentation.search('pageSize')
178
+ ```
179
+
180
+ ## 🐛 Error Reference
181
+
182
+ List all documented errors:
183
+ ```ruby
184
+ errors = ClockifyApiDocs.documentation.list_errors
185
+ puts "We've documented #{errors.length} error conditions"
186
+
187
+ errors.each do |error|
188
+ puts "#{error[:code]}: #{error[:description]}"
189
+ end
190
+ ```
191
+
192
+ ## 💡 Why This Gem Exists
193
+
194
+ We built this after discovering that the official Clockify API documentation contained errors and missing information. Through systematic testing, we:
195
+
196
+ - Found 43+ error conditions not properly documented
197
+ - Discovered 3 validation errors not mentioned officially
198
+ - Corrected incorrect parameter limits and enum values
199
+ - Created more accurate and complete documentation
200
+
201
+ ## 🤝 Contributing
202
+
203
+ Bug reports and pull requests are welcome on GitHub at https://github.com/yourusername/clockify_detailed_reports_api_docs.
204
+
205
+ ## 📄 License
206
+
207
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
208
+
209
+ ## 🔗 Links
210
+
211
+ - **GitHub**: https://github.com/yourusername/clockify_detailed_reports_api_docs
212
+ - **RubyGems**: https://rubygems.org/gems/clockify_detailed_reports_api_docs
213
+ - **Issues**: https://github.com/yourusername/clockify_detailed_reports_api_docs/issues
214
+
215
+ ---
216
+
217
+ **📊 Documentation Stats**:
218
+ - 43+ documented errors
219
+ - 60+ API parameters covered
220
+ - 3 documentation formats
221
+ - Based on real API testing
222
+ - More accurate than official docs