From d4a1d6d1081b7949c521a3f5ca826bf8f3207dc4 Mon Sep 17 00:00:00 2001 From: phampton Date: Sat, 2 Apr 2016 14:57:25 +0000 Subject: [PATCH 1/6] Adding Barrel http api cheat sheet. --- .../cheat_sheets/json/barrel-http-api.json | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 share/goodie/cheat_sheets/json/barrel-http-api.json diff --git a/share/goodie/cheat_sheets/json/barrel-http-api.json b/share/goodie/cheat_sheets/json/barrel-http-api.json new file mode 100644 index 000000000..d2b46d540 --- /dev/null +++ b/share/goodie/cheat_sheets/json/barrel-http-api.json @@ -0,0 +1,44 @@ +{ + "id": "barrel_http_api_cheat_sheet", + "name": "Barrel HTTP API Cheat Sheet", + "description": "An overview of the Barrel HTTP API using cURL", + + "metadata": { + "sourceName": "Barrel", + "sourceUrl" : "https://docs.barrel.org/" + }, + + "aliases": [ + "first alias", "second alias", "etc" + ], + + "template_type": "terminal", + + "section_order": [ + "First Section", + "Second Section" + ], + + "sections": { + "First Section": [ + { + "key": "Key 1.1", + "val": "Value 1.1" + }, + { + "key": "Key 1.2", + "val": "Value 1.2" + } + ], + "Second Section": [ + { + "key": "Key 2.1", + "val": "Value 2.2" + }, + { + "key": "Key 2.2", + "val": "Value 2.2" + } + ] + } +} From dd9030d721bfaa4818b1fa52ecad6ecc9e5e96b0 Mon Sep 17 00:00:00 2001 From: phampton Date: Thu, 7 Apr 2016 15:20:01 +0000 Subject: [PATCH 2/6] updated barrel http api file --- .../cheat_sheets/json/barrel-http-api.json | 83 +++++++++++++++---- 1 file changed, 65 insertions(+), 18 deletions(-) diff --git a/share/goodie/cheat_sheets/json/barrel-http-api.json b/share/goodie/cheat_sheets/json/barrel-http-api.json index d2b46d540..de0d1e04b 100644 --- a/share/goodie/cheat_sheets/json/barrel-http-api.json +++ b/share/goodie/cheat_sheets/json/barrel-http-api.json @@ -5,40 +5,87 @@ "metadata": { "sourceName": "Barrel", - "sourceUrl" : "https://docs.barrel.org/" + "sourceUrl" : "https://docs.barrel-db.org/reference" }, - "aliases": [ - "first alias", "second alias", "etc" - ], - "template_type": "terminal", "section_order": [ - "First Section", - "Second Section" + "Barrel Commands", + "Barrel API", + "Document API" ], "sections": { - "First Section": [ + + "Barrel Commands": [ { - "key": "Key 1.1", - "val": "Value 1.1" + "key": "barrel start", + "val": "starts a barrel instance" }, { - "key": "Key 1.2", - "val": "Value 1.2" + "key": "barrel stop", + "val": "stops the barrel instane" + }, + { + "key": "barrel console", + "val": "starts the barrel console" } ], - "Second Section": [ + + "Barrel API": [ { - "key": "Key 2.1", - "val": "Value 2.2" + "key": "localhost:5984", + "val": "retrieves information about this node (GET)" }, { - "key": "Key 2.2", - "val": "Value 2.2" + "key": "localhost:5984/_active_tasks", + "val": "retrieves the list of active tasks (GET)" + }, + { + "key": "localhost:5984/_all_dbs", + "val": "retrieves the list of database names (GET)" + }, + { + "key": "localhost:5984/_config", + "val": "retrieves the barrel configuration (GET)" + }, + { + "key": "localhost:5984/_db_updates", + "val": "retrieves the latest database change (GET)" + }, + { + "key": "localhost:5984/_log", + "val": "tails the main log file (GET)" + }, + { + "key": "localhost:5984/_stats", + "val": "statistics about the current node (GET)" + }, + { + "key": "localhost:5984/_uuids", + "val": "UUIDs generated by Barrel (GET)" + } + ], + + "Document API": [ + { + "key": "localhost:5984/{db_name}", + "val": "creates a new database (POST)" + }, + { + "key": "localhost:5984/{db_name}", + "val": "returns database information (GET)" + }, + { + "key": "localhost:5984/{db_name}/_all_docs", + "val": "returns all the documents in the database (GET)" + }, + { + "key": "localhost:5984/{db_name}/{doc_id}", + "val": "returns the document (GET)" } ] + } -} +} \ No newline at end of file From 9bb38a0d88d1635cf7ab1bcff0dd530d35370f4d Mon Sep 17 00:00:00 2001 From: phampton Date: Thu, 7 Apr 2016 18:25:03 +0000 Subject: [PATCH 3/6] updated json document - removed curl --- share/goodie/cheat_sheets/json/barrel-http-api.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/goodie/cheat_sheets/json/barrel-http-api.json b/share/goodie/cheat_sheets/json/barrel-http-api.json index de0d1e04b..8907bfecc 100644 --- a/share/goodie/cheat_sheets/json/barrel-http-api.json +++ b/share/goodie/cheat_sheets/json/barrel-http-api.json @@ -1,7 +1,7 @@ { - "id": "barrel_http_api_cheat_sheet", - "name": "Barrel HTTP API Cheat Sheet", - "description": "An overview of the Barrel HTTP API using cURL", + "id": "barrel_api_cheat_sheet", + "name": "Barrel API Cheat Sheet", + "description": "An overview of the Barrel DB HTTP API", "metadata": { "sourceName": "Barrel", From 435a44e9d8f3d7548d8eb04a81894a8dd463738b Mon Sep 17 00:00:00 2001 From: phampton Date: Thu, 7 Apr 2016 19:39:49 +0000 Subject: [PATCH 4/6] Updated cheat sheet. --- .../json/{barrel-http-api.json => barrel-http.json} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename share/goodie/cheat_sheets/json/{barrel-http-api.json => barrel-http.json} (98%) diff --git a/share/goodie/cheat_sheets/json/barrel-http-api.json b/share/goodie/cheat_sheets/json/barrel-http.json similarity index 98% rename from share/goodie/cheat_sheets/json/barrel-http-api.json rename to share/goodie/cheat_sheets/json/barrel-http.json index 8907bfecc..30b689686 100644 --- a/share/goodie/cheat_sheets/json/barrel-http-api.json +++ b/share/goodie/cheat_sheets/json/barrel-http.json @@ -1,5 +1,5 @@ { - "id": "barrel_api_cheat_sheet", + "id": "barrel_http_cheat_sheet", "name": "Barrel API Cheat Sheet", "description": "An overview of the Barrel DB HTTP API", From 8299be0dc173aa229e5016fa636e7b28e9a882ce Mon Sep 17 00:00:00 2001 From: phampton Date: Fri, 8 Apr 2016 09:09:08 +0000 Subject: [PATCH 5/6] Added aliases. --- share/goodie/cheat_sheets/json/barrel-http.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/goodie/cheat_sheets/json/barrel-http.json b/share/goodie/cheat_sheets/json/barrel-http.json index 30b689686..57f16583e 100644 --- a/share/goodie/cheat_sheets/json/barrel-http.json +++ b/share/goodie/cheat_sheets/json/barrel-http.json @@ -9,6 +9,10 @@ }, "template_type": "terminal", + + "aliases": [ + "barreldb", "barrel cheat sheet", "barrel api", "barreldb api" + ], "section_order": [ "Barrel Commands", From 1e6e9c251b3d8fb152ad2c6bec18c7a8d75d73d8 Mon Sep 17 00:00:00 2001 From: phampton Date: Fri, 8 Apr 2016 09:23:52 +0000 Subject: [PATCH 6/6] Potential pass for tests? --- share/goodie/cheat_sheets/json/barrel-http.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/goodie/cheat_sheets/json/barrel-http.json b/share/goodie/cheat_sheets/json/barrel-http.json index 57f16583e..e43686927 100644 --- a/share/goodie/cheat_sheets/json/barrel-http.json +++ b/share/goodie/cheat_sheets/json/barrel-http.json @@ -11,7 +11,7 @@ "template_type": "terminal", "aliases": [ - "barreldb", "barrel cheat sheet", "barrel api", "barreldb api" + "barreldb", "barrel", "barrel api", "barreldb api" ], "section_order": [