aha_builder_core 1.0.11 → 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 +15 -14
- data/lib/aha/auth/version.rb +1 -1
- data/lib/aha/user_guide.rb +5 -5
- metadata +1 -1
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
|
@@ -181,23 +181,24 @@ end
|
|
|
181
181
|
|
|
182
182
|
## User Guide
|
|
183
183
|
|
|
184
|
-
Access user guide
|
|
184
|
+
Access user guide pages created in Aha! for your application. The user guide is made up of many pages.
|
|
185
185
|
|
|
186
186
|
```ruby
|
|
187
|
-
#
|
|
188
|
-
result = Aha::UserGuide.
|
|
189
|
-
|
|
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
190
|
|
|
191
|
-
#
|
|
192
|
-
|
|
193
|
-
html_content =
|
|
191
|
+
# Load a specific page with HTML content
|
|
192
|
+
page = Aha::UserGuide.load_page(id)
|
|
193
|
+
html_content = page["content_html"]
|
|
194
194
|
```
|
|
195
195
|
|
|
196
|
-
###
|
|
196
|
+
### Page Structure
|
|
197
197
|
|
|
198
|
-
Each
|
|
199
|
-
- `id` -
|
|
200
|
-
- `name` -
|
|
201
|
-
- `parent_id` - Parent
|
|
202
|
-
- `position` - Sort order
|
|
203
|
-
- `
|
|
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
data/lib/aha/user_guide.rb
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
module Aha
|
|
4
4
|
module UserGuide
|
|
5
5
|
class << self
|
|
6
|
-
def
|
|
7
|
-
response = client.send(:get, "/api/core/
|
|
6
|
+
def table_of_contents
|
|
7
|
+
response = client.send(:get, "/api/core/user_guide/table_of_contents")
|
|
8
8
|
{
|
|
9
|
-
|
|
9
|
+
pages: response["pages"] || []
|
|
10
10
|
}
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
def
|
|
14
|
-
client.send(:get, "/api/core/
|
|
13
|
+
def load_page(id)
|
|
14
|
+
client.send(:get, "/api/core/user_guide/pages/#{id}")
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
private
|