changeset 5496:2b2216e8af36 stable

docs: update example output and example server configs kallithea-api example output was not up-to-date, and the text was a little vague on whether you specify a hostname or a URL. The Nginx example config has been updated to assume a Kallithea backend server on localhost:5000, like the Apache example. The redundant ServerAlias option was removed from the Apache example.
author Søren Løvborg <sorenl@unity3d.com>
date Wed, 09 Sep 2015 18:32:05 +0200
parents 222a9f3d4023
children 12b47803189f
files docs/api/api.rst docs/setup.rst
diffstat 2 files changed, 14 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/docs/api/api.rst	Thu Sep 10 23:29:50 2015 +0200
+++ b/docs/api/api.rst	Wed Sep 09 18:32:05 2015 +0200
@@ -83,30 +83,29 @@
 
 For example, to call ``get_repo``::
 
- kallithea-api --apihost=<your.kallithea.server.url> --apikey=<yourapikey> get_repo
+    kallithea-api --apihost=<Kallithea URL> --apikey=<API key> get_repo
 
- calling {"api_key": "<apikey>", "id": 75, "args": {}, "method": "get_repo"} to http://127.0.0.1:5000
- Kallithea said:
- {'error': 'Missing non optional `repoid` arg in JSON DATA',
-  'id': 75,
-  'result': None}
+    Calling method get_repo => <Kallithea URL>
+    Server response
+    ERROR:"Missing non optional `repoid` arg in JSON DATA"
 
 Oops, looks like we forgot to add an argument. Let's try again, now
 providing the ``repoid`` as a parameter::
 
-    kallithea-api get_repo repoid:myrepo
+    kallithea-api --apihost=<Kallithea URL> --apikey=<API key> get_repo repoid:myrepo
 
-    calling {"api_key": "<apikey>", "id": 39, "args": {"repoid": "myrepo"}, "method": "get_repo"} to http://127.0.0.1:5000
-    Kallithea said:
-    {'error': None,
-     'id': 39,
-     'result': <json data...>}
+    Calling method get_repo => <Kallithea URL>
+    Server response
+    {
+        "clone_uri": null,
+        "created_on": "2015-08-31T14:55:19.042",
+    ...
 
 To avoid specifying ``apihost`` and ``apikey`` every time, run::
 
-  kallithea-api --save-config --apihost=<your.kallithea.server.url> --apikey=<yourapikey>
+    kallithea-api --save-config --apihost=<Kallithea URL> --apikey=<API key>
 
-This will create a ``~/.config/kallithea`` with the specified hostname and API key
+This will create a ``~/.config/kallithea`` with the specified URL and API key
 so you don't have to specify them every time.
 
 
--- a/docs/setup.rst	Thu Sep 10 23:29:50 2015 +0200
+++ b/docs/setup.rst	Wed Sep 09 18:32:05 2015 +0200
@@ -612,7 +612,7 @@
        }
 
        location @kallithea {
-            proxy_pass      http://kallithea;
+            proxy_pass      http://127.0.0.1:5000;
        }
 
     }
@@ -649,7 +649,6 @@
 
     <VirtualHost *:80>
             ServerName hg.myserver.com
-            ServerAlias hg.myserver.com
 
             <Proxy *>
               # For Apache 2.4 and later: