Skip to content

Commit

Permalink
Bug fixes, search improvement, and Partner API clarification
Browse files Browse the repository at this point in the history
* Fixed minor bugs
* Improved search index to capture parameter names
* Added note about Australian state names
  • Loading branch information
HumanistSerif committed Apr 9, 2018
1 parent 88b38ea commit 715a690
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
@@ -1,5 +1,5 @@
# CloudHealth API Hub
Welcome to the CloudHealth API Hub ([http://apidocs.cloudhealthtech.com](http://apidocs.cloudhealthtech.com)). Here you'll find documentation for API services that programmatically retrieve data from the CloudHealth Platform.
# CloudHealth API Guide
Welcome to the CloudHealth API Guide ([http://apidocs.cloudhealthtech.com](http://apidocs.cloudhealthtech.com)). Here you'll find documentation for API services that programmatically retrieve data from the CloudHealth Platform.

The CloudHealth API is organized around [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer). The API has predictable, resource-oriented URLs, and it uses HTTP response codes to indicate API errors. All API responses, including errors, return JSON.

Expand Down
4 changes: 2 additions & 2 deletions _config.yml
@@ -1,13 +1,13 @@
# ----
# Site

title: CloudHealth Developer Hub
title: CloudHealth API Guide
description: The official API guide for the CloudHealth Platform.
# baseurl: ""
url: http://apidocs.cloudhealthtech.com
google_analytics_key:
permalink: pretty
repository: https://github.com/siddtewari/cht_help_staging
repository: https://github.com/CloudHealth/cht_api_guide

collections:
documentation:
Expand Down
2 changes: 1 addition & 1 deletion _documentation/getting_started.md
Expand Up @@ -6,7 +6,7 @@ parameters:
- name:
content:
content_markdown: |-
Welcome to the CloudHealth API Hub. Here you'll find API services that programmatically retrieve data from the CloudHealth Platform.
Welcome to the CloudHealth API Guide. Here you'll find API services that programmatically retrieve data from the CloudHealth Platform.
The CloudHealth API is organized around [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer){:target="_blank"}. The API has predictable, resource-oriented URLs, and it uses HTTP response codes to indicate API errors. All API responses, including errors, return JSON.
Expand Down
2 changes: 1 addition & 1 deletion _partner/customer-account-add.md
Expand Up @@ -23,7 +23,7 @@ parameters:
content: City specified as a string
- name: state
required: yes
content: State specified in abbreviated form. For example, specify Massachusetts as `MA`.
content: State specified in abbreviated form. For example, specify Massachusetts as `MA`. If your country is Australia, the API does not support abbreviated versions of state names. Use the fully spelled versions of Australian state names instead, namely, `Australian Capital Territory`, `New South Wales`, `Northern Territory`, `Queensland`, `South Australia`, `Tasmania`, `Victoria`, and `Western Australia`.
- name: zipcode
required: yes
content: Zipcode specified as a number
Expand Down
2 changes: 0 additions & 2 deletions _reporting/report-data-format.md
Expand Up @@ -6,8 +6,6 @@ parameters:
- name:
content:
content_markdown: |-
Familiarize yourself with the format of the response that a Standard Report query returns.
When you query a Standard Report, the response you receive has the following general structure.
```
Expand Down
6 changes: 5 additions & 1 deletion _sass/_main.scss
Expand Up @@ -306,7 +306,11 @@ h3 .endpoint {

.endpoint.example {
&:after {
content: "📘";
content: "Ex";
background-color: #666666;
color: #FFFFFF;
padding: 3px;
border-radius: 2px;
}
}

Expand Down
2 changes: 1 addition & 1 deletion _tagging/post-tags-for-assets.md
Expand Up @@ -7,7 +7,7 @@ endpoint: https://chapi.cloudhealthtech.com/v1/custom_tags
parameters:
- name: JSON document
required: yes
content: Payload containing the tags that you want to post. See [How Tags are Processed](#tagginghow-tags-are-processed).
content: Payload containing the tags that you want to post. See [How Tags are Processed](#tagging_how-tags-are-processed).
content_markdown: |-
The response to the post request is JSON.
* Each successful update is shown to the `updates` array in the response.
Expand Down
4 changes: 2 additions & 2 deletions js/search.js
Expand Up @@ -81,10 +81,10 @@
window.index = lunr(function () {
this.field("id");
this.field("title", {boost: 10});
this.field("category");
this.field("url");
this.field("content");
this.field("description");
this.field("parameters");
this.field("url");
});

var query = decodeURIComponent((getQueryVariable("q") || "").replace(/\+/g, "%20")),
Expand Down
6 changes: 4 additions & 2 deletions search.html
Expand Up @@ -22,11 +22,13 @@ <h2>Search Results</h2>
"{{ item.id | slugify }}": {
"id": "{{ item.id | slugify }}",
"title": "{{ item.title | xml_escape }}",
"category": "{{ collection.label | xml_escape }}",
"description": "{{item.description | xml_escape }}",
"type": "{{item.type | xml_escape}}",
"url": "{{ site.baseurl }}/#{{ item.collection }}_{{item.title | slugify }}",
"content": {{ item.content | strip_html | replace_regex: "[\s/\n]+"," " | strip | jsonify }}
"content": {{ item.content_markdown | strip_html | replace_regex: "[\s/\n]+"," " | strip | jsonify }},
{% if item.parameters %}
"parameters" : "{% for parameter in item.parameters %}{{ parameter.name }} {{ parameter.content }}{% if parameter.sub-fields %}{% for field in parameter.sub-fields %}{{ field.name }}{{ field.content }}{% endfor %}{% endif %}{% endfor %}"
{% endif %}
}
{% assign added = true %}
{% endunless %}
Expand Down

0 comments on commit 715a690

Please sign in to comment.