Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bep/docuapi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-10-20 15:03:57 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-10-20 15:03:57 +0300
commit035f4dcf37f63050e4644cce6f7945001609c443 (patch)
tree0d1fa3951e813ab6421cfa38f54ac5756bb30cec /exampleSite
parent6312ee0deb2fa48fc388ebafeb066bdd4debaf7b (diff)
Add Go versions of the code examples
Diffstat (limited to 'exampleSite')
-rw-r--r--exampleSite/config.toml6
-rw-r--r--exampleSite/content/index.md37
2 files changed, 43 insertions, 0 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 120184b..9484f4c 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -23,6 +23,9 @@ toc_footers = [
# Configure the language example tabs.
[[params.language_tabs]]
+key = "go"
+name = "Go"
+[[params.language_tabs]]
key = "shell"
name = "Shell"
[[params.language_tabs]]
@@ -31,3 +34,6 @@ name = "Ruby"
[[params.language_tabs]]
key = "python"
name = "Python"
+[[params.language_tabs]]
+key = "javascript"
+name = "Javascript" \ No newline at end of file
diff --git a/exampleSite/content/index.md b/exampleSite/content/index.md
index 299479f..b78ce68 100644
--- a/exampleSite/content/index.md
+++ b/exampleSite/content/index.md
@@ -15,6 +15,19 @@ This example API documentation page was created with [DocuAPI](https://github.co
> To authorize, use this code:
+```go
+package main
+
+import "github.com/bep/kittn/auth"
+
+func main() {
+ api := auth.Authorize("meowmeowmeow")
+
+ // Just to make it compile
+ _ = api
+}
+```
+
```ruby
require 'kittn'
@@ -55,6 +68,18 @@ You must replace <code>meowmeowmeow</code> with your personal API key.
## Get All Kittens
+```go
+package main
+
+import "github.com/bep/kittn/auth"
+
+func main() {
+ api := auth.Authorize("meowmeowmeow")
+
+ _ = api.GetKittens()
+}
+```
+
```ruby
require 'kittn'
@@ -121,6 +146,18 @@ Remember — a happy kitten is an authenticated kitten!
## Get a Specific Kitten
+```go
+package main
+
+import "github.com/bep/kittn/auth"
+
+func main() {
+ api := auth.Authorize("meowmeowmeow")
+
+ _ = api.GetKitten()
+}
+```
+
```ruby
require 'kittn'