aha_builder_core 1.0.10 → 1.0.12
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 +4 -4
- data/README.md +24 -0
- data/lib/aha/auth/version.rb +1 -1
- data/lib/aha/user_guide.rb +24 -0
- data/lib/aha_builder_core.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6f587457e1e82ad9b4a22fd94b57e5bbd05e5ff6763f6bae6e085fac11393f1e
|
|
4
|
+
data.tar.gz: 7ef22938cdbc4c7a6e39a9c60c5534457db865c96a5fffd3f857e8d21e2c90c7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1cc85c41ce5216bbed1044ad8c2dc0425562370a536638236313bfee9d883446a01562e05fb4258d2be19bbaac9c4d93d97c0990e4704a977b7e6c3ce13c48e7
|
|
7
|
+
data.tar.gz: 1cd8e3729355ecb16c09ebe1a8106062aa7ec9653ebdaa040fb7e9dd5e574fe0f3ffddd47fb8229d52adbf598a53c59e73e2fff8039bfd102f8df0f39dd9a470
|
data/README.md
CHANGED
|
@@ -178,3 +178,27 @@ rescue Aha::Auth::ApiError => e
|
|
|
178
178
|
# Other API error, check e.status and e.body
|
|
179
179
|
end
|
|
180
180
|
```
|
|
181
|
+
|
|
182
|
+
## User Guide
|
|
183
|
+
|
|
184
|
+
Access user guide pages created in Aha! for your application. The user guide is made up of many pages.
|
|
185
|
+
|
|
186
|
+
```ruby
|
|
187
|
+
# Get the table of contents (all pages, metadata only)
|
|
188
|
+
result = Aha::UserGuide.table_of_contents
|
|
189
|
+
pages = result[:pages] # Array of page hashes without content.
|
|
190
|
+
|
|
191
|
+
# Load a specific page with HTML content
|
|
192
|
+
page = Aha::UserGuide.load_page(id)
|
|
193
|
+
html_content = page["content_html"]
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Page Structure
|
|
197
|
+
|
|
198
|
+
Each page hash contains:
|
|
199
|
+
- `id` - Page ID
|
|
200
|
+
- `name` - Page title
|
|
201
|
+
- `parent_id` - Parent page ID for building table of contents hierarchy (nil for top level pages)
|
|
202
|
+
- `position` - Sort order (integer)
|
|
203
|
+
- `children_count` - Number of child pages
|
|
204
|
+
- `content_html` - HTML content (only in `load_page` response)
|
data/lib/aha/auth/version.rb
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Aha
|
|
4
|
+
module UserGuide
|
|
5
|
+
class << self
|
|
6
|
+
def table_of_contents
|
|
7
|
+
response = client.send(:get, "/api/core/user_guide/table_of_contents")
|
|
8
|
+
{
|
|
9
|
+
pages: response["pages"] || []
|
|
10
|
+
}
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def load_page(id)
|
|
14
|
+
client.send(:get, "/api/core/user_guide/pages/#{id}")
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
private
|
|
18
|
+
|
|
19
|
+
def client
|
|
20
|
+
Aha::Auth.send(:client)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
data/lib/aha_builder_core.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aha_builder_core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aha! Labs Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -124,6 +124,7 @@ files:
|
|
|
124
124
|
- lib/aha/auth/user.rb
|
|
125
125
|
- lib/aha/auth/users_resource.rb
|
|
126
126
|
- lib/aha/auth/version.rb
|
|
127
|
+
- lib/aha/user_guide.rb
|
|
127
128
|
- lib/aha_builder_core.rb
|
|
128
129
|
- lib/generators/aha_builder_core/auth/USAGE
|
|
129
130
|
- lib/generators/aha_builder_core/auth/auth_generator.rb
|