-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5155b3
commit 89986f6
Showing
9 changed files
with
13 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.0.3' | ||
__version__ = '0.0.4' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
coredocs/templates/languages/javascript.html → ...plates/coredocs/languages/javascript.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
<pre class="highlight javascript"><code>{% highlight 'javascript' %}var coreapi = window.coreapi | ||
|
||
// Initialize a client & load the schema document | ||
var auth = new coreapi.BasicAuth(username='xxx', password='xxx') | ||
var client = new coreapi.Client(auth=auth) | ||
var client = new coreapi.Client() | ||
var document = null | ||
client.get("{{ schema_url }}").then(function(result) { | ||
document = result | ||
}) | ||
|
||
// Interact with the API endpoint | ||
var action = ["{{ section_key }}", "{{ link_key }}"] | ||
var params = {id: 123} | ||
client.action(document, action, params=params).then(function(result) { | ||
{% if link.fields %}var params = { | ||
{% for field in link.fields %} {{ field.name }}: ...{% if not loop.last %},{% endif %} | ||
{% endfor %}} | ||
{% endif %}client.action(document, action, params=params).then(function(result) { | ||
// Return value is in 'result' | ||
}){% endhighlight %}</code></pre> |
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
coredocs/templates/coreapi/link.html → coredocs/templates/coredocs/link.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
coredocs/templates/coreapi/section.html → coredocs/templates/coredocs/section.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<h1 id="{{ section_key }}">{{ section_key }}</h1> | ||
|
||
{% for link_key, link in get_links(section) %} | ||
{% include "coreapi/link.html" %} | ||
{% include "coredocs/link.html" %} | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters