Namdak Tonpa 5 years ago
parent
commit
41e32621d9
8 changed files with 1 additions and 316 deletions
  1. 1 1
      index.html
  2. 0 22
      man/rest_app.htm
  3. 0 22
      man/rest_sup.htm
  4. 0 110
      man/ua/index.html
  5. 0 41
      man/ua/rest.htm
  6. 0 41
      man/ua/rest_app.htm
  7. 0 41
      man/ua/rest_cowboy.htm
  8. 0 38
      man/ua/rest_sup.htm

+ 1 - 1
index.html

@@ -13,7 +13,7 @@
 <nav>
 <nav>
     <a href="https://n2o.dev">DEV</a>
     <a href="https://n2o.dev">DEV</a>
     <a href="#" style="background:#ededed;">REST</a>
     <a href="#" style="background:#ededed;">REST</a>
-    <a href="man/ua/index.html">UA</a>
+    <a href="https://n2o.dev/deps/rest/man/ua/index.html">UA</a>
     <a href="#" style="background:#ededed;">EN</a>
     <a href="#" style="background:#ededed;">EN</a>
 </nav>
 </nav>
 <header>
 <header>

+ 0 - 22
man/rest_app.htm

@@ -1,22 +0,0 @@
-<!DOCTYPE html><html><head><meta charset="utf-8" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="description" content="" /><meta name="author" content="Maxim Sokhatsky" /><title>APP</title><link rel="stylesheet" href="https://synrc.space/synrc.css" /></head><body><nav>
-    <a href="https://n2o.dev">DEV</a>
-    <a href="https://rest.n2o.space">REST</a>
-    <a href="#" style="background:#ededed;">APP</a>
-</nav><header>
-    <a href="../index.html"><img src="https://n2o.space/img/Synrc Neo.svg" /></a>
-    <h1>APP</h1>
-</header><main>
-    <section>
-
-<h3>INTRO</h3>
-
-<p>The APP module.</p>
-    </section>
-    <section>
-<p>This module may refer to:
-MAN_MODULES
-</p>
-    </section>
-</main><footer>
-    2005&#8211;2019 © Synrc Research Center
-</footer></body></html>

+ 0 - 22
man/rest_sup.htm

@@ -1,22 +0,0 @@
-<!DOCTYPE html><html><head><meta charset="utf-8" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="description" content="" /><meta name="author" content="Maxim Sokhatsky" /><title>SUP</title><link rel="stylesheet" href="https://synrc.space/synrc.css" /></head><body><nav>
-    <a href="https://n2o.dev">DEV</a>
-    <a href="https://rest.n2o.space">REST</a>
-    <a href="#" style="background:#ededed;">SUP</a>
-</nav><header>
-    <a href="../index.html"><img src="https://n2o.space/img/Synrc Neo.svg" /></a>
-    <h1>SUP</h1>
-</header><main>
-    <section>
-
-<h3>INTRO</h3>
-
-<p>The SUP module.</p>
-    </section>
-    <section>
-<p>This module may refer to:
-MAN_MODULES
-</p>
-    </section>
-</main><footer>
-    2005&#8211;2019 © Synrc Research Center
-</footer></body></html>

+ 0 - 110
man/ua/index.html

@@ -1,110 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8" />
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="viewport" content="width=device-width, initial-scale=1.0" />
-<meta name="description" content="" />
-<meta name="author" content="Maxim Sokhatsky" />
-<title>REST</title>
-<link rel="stylesheet" href="https://tonpa.guru/blank.css?v=2" />
-</head>
-<body>
-<nav>
-    <a href="https://n2o.dev/ua/">DEV</a>
-    <a href="#" style="background:#ededed;">REST</a>
-    <a href="#" style="background:#ededed;">UA</a>
-    <a href="../../index.html">EN</a>
-</nav>
-<header>
-    <a href="https://github.com/synrc/rest"><img src="https://synrc.space/images/Synrc Neo.svg?v=1" /></a>
-    <h1>REST</h1>
-</header>
-<aside>
-    <article>
-        <section>
-            <h3>СИНОПСИС</h3>
-            <div>REST: фреймворк з типізованим JSON<br /><br />
-                 <b>Переваги та цілі</b><br /><br />
-                 1. Найшвидші можливі Record &#60;-&#62; Proplists перетворення<br />
-                 2. Найменший REST фреймворк у світі<br />
-                 3. ETS/KVS/Будь-яка база даних, просте налаштування<br /><br />
-                 Ми досягли першої мети, визначаючи генерацію коду parse_transform для перетворень кортежів.
-                 Друга вимога була досягнута за допомогою виключення з кодової бази фреймворка зайвого роутингу та інших сумнівних моментів.
-            </div>
-        </section>
-
-        <section>
-            <a name="usage"></a><h3>ВИКОРИСТАННЯ</h3>
-            <div>Просто підключіть кінцеву точку REST безпосередньо до вашого Cowboy роутера:</div>
-        <figure>
-        <code>
-  {"/rest/:resource", rest_cowboy, []},
-  {"/rest/:resource/:id", rest_cowboy, []},
-        </code>
-        </figure>
-            <div>
-                OCT 2018 © <a href="https://github.com/5HT">5HT</a> <a href="https://5ht.co/license.htm">ISC</a><br />
-                VER 5.10
-            </div>
-        </section>
-    </article>
-</aside>
-<main>
-    <section>
-        <a name="module"></a><h3>Модуль</h3>
-        <p>
-            Приклад реалізації REST API:
-        </p>
-        <figure>
-        <code>
--module(users).
--behaviour(rest).
--compile({parse_transform, rest}).
--include("users.hrl").
--export([init/0, populate/1, exists/1, get/0, get/1, post/1, delete/1]).
--rest_record(user).
-
-init() -> ets:new(users, [public, named_table, {keypos, #user.id}]).
-populate(Users) -> ets:insert(users, Users).
-exists(Id) -> ets:member(users, wf:to_list(Id)).
-get() -> ets:tab2list(users).
-get(Id) -> [User] = ets:lookup(users, wf:to_list(Id)), User.
-delete(Id) -> ets:delete(users, wf:to_list(Id)).
-post(#user{} = User) -> ets:insert(users, User);
-post(Data) -> post(from_json(Data, #user{})).
-        </code>
-        </figure>
-    </section>
-    <section>
-        <a name="usage2"></a><h3>Використання API</h3>
-        <figure>
-        <code>
-$ curl -i -X POST -d "id=vlad" localhost:8005/rest/users
-$ curl -i -X POST -d "id=doxtop" localhost:8005/rest/users
-$ curl -i -X GET localhost:8005/rest/users
-$ curl -i -X PUT -d "id=5HT" localhost:8005/rest/users/vlad
-$ curl -i -X GET localhost:8005/rest/users/5HT
-$ curl -i -X DELETE localhost:8005/rest/users/5HT
-        </code></figure>
-    </section>
-
-    <section>
-        <a name="modules"></a><h3>Модулі</h3>
-        <ul><li><b><a href="rest.htm">rest</a></b> — rest</li>
-            <li><b><a href="rest_app.htm">rest_app</a></b> — rest_app</li>
-            <li><b><a href="rest_cowboy.htm">rest_cowboy</a></b> — rest_cowboy</li>
-            <li><b><a href="rest_sup.htm">rest_sup</a></b> — rest_sup</li>
-        </ul>
-    </section>
-
-    <section>
-        <a name="credits"></a><h3>Credits</h3>
-        <ul><li>Dmitry Bushmelev</li></ul>
-    </section>
-</main>
-<footer>
-    Made with <span class="heart">❤</span> to Erlang
-</footer>
-</body>
-</html>

+ 0 - 41
man/ua/rest.htm

@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8" />
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="viewport" content="width=device-width, initial-scale=1.0" />
-<meta name="description" content="" />
-<meta name="author" content="Maxim Sokhatsky" />
-<title>REST</title>
-<link rel="stylesheet" href="https://tonpa.guru/blank.css?v=2" />
-</head>
-<body>
-    <nav>
-    <a href="https://n2o.dev">DEV</a>
-    <a href="https://rest.n2o.space">REST</a>
-    <a href="#" style="background:#ededed;">REST</a>
-    <a href="#" style="background:#ededed;">UA</a>
-    <a href="../rest.htm">EN</a>
-</nav>
-<header>
-    <a href="index.html"><img src="https://n2o.space/img/Synrc Neo.svg" /></a>
-    <h1>REST</h1>
-</header>
-<main>
-    <section>
-
-<h3>ВСТУП</h3>
-
-<p>Модуль REST</p>
-    </section>
-    <section>
-<p>Цей модуль може бути пов'язаним з:
-MAN_MODULES
-</p>
-    </section>
-</main>
-<footer>
-    2005&#8211;2019 © Synrc Research Center
-</footer>
-</body>
-</html>

+ 0 - 41
man/ua/rest_app.htm

@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8" />
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="viewport" content="width=device-width, initial-scale=1.0" />
-<meta name="description" content="" />
-<meta name="author" content="Maxim Sokhatsky" />
-<title>APP</title>
-<link rel="stylesheet" href="https://tonpa.guru/blank.css?v=2" />
-</head>
-<body>
-<nav>
-    <a href="https://n2o.dev">DEV</a>
-    <a href="https://rest.n2o.space">REST</a>
-    <a href="#" style="background:#ededed;">APP</a>
-    <a href="#" style="background:#ededed;">UA</a>
-    <a href="../rest_app.htm">EN</a>
-</nav>
-<header>
-    <a href="index.html"><img src="https://n2o.space/img/Synrc Neo.svg" /></a>
-    <h1>APP</h1>
-</header>
-<main>
-   <section>
-
-<h3>ВСТУП</h3>
-
-<p>Модуль APP</p>
-    </section>
-    <section>
-<p>Цей модуль може бути пов'язаним з:
-MAN_MODULES
-</p>
-    </section>
-</main>
-<footer>
-    2005&#8211;2019 © Synrc Research Center
-</footer>
-</body>
-</html>

+ 0 - 41
man/ua/rest_cowboy.htm

@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8" />
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="viewport" content="width=device-width, initial-scale=1.0" />
-<meta name="description" content="" />
-<meta name="author" content="Maxim Sokhatsky" />
-<title>COWBOY</title>
-<link rel="stylesheet" href="https://tonpa.guru/blank.css?v=2" />
-</head>
-<body>
-<nav>
-    <a href="https://n2o.dev">DEV</a>
-    <a href="https://rest.n2o.space">REST</a>
-    <a href="#" style="background:#ededed;">COWBOY</a>
-    <a href="#" style="background:#ededed;">UA</a>
-    <a href="../rest_cowboy.htm">EN</a>
-</nav>
-<header>
-    <a href="index.html"><img src="https://n2o.space/img/Synrc Neo.svg" /></a>
-    <h1>COWBOY</h1>
-</header>
-<main>
-    <section>
-
-<h3>ВСТУП</h3>
-
-<p>Модуль COWBOY</p>
-    </section>
-    <section>
-<p>Цей модуль може бути пов'язаним з:
-MAN_MODULES
-</p>
-    </section>
-</main>
-<footer>
-    2005&#8211;2019 © Synrc Research Center
-</footer>
-</body>
-</html>

+ 0 - 38
man/ua/rest_sup.htm

@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8" />
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="viewport" content="width=device-width, initial-scale=1.0" />
-<meta name="description" content="" />
-<meta name="author" content="Maxim Sokhatsky" />
-<title>SUP</title>
-<link rel="stylesheet" href="https://tonpa.guru/blank.css?v=2" />
-</head>
-<body>
-<nav>
-    <a href="https://n2o.dev">DEV</a>
-    <a href="https://rest.n2o.space">REST</a>
-    <a href="#" style="background:#ededed;">SUP</a>
-    <a href="#" style="background:#ededed;">UA</a>
-    <a href="../rest_sup.htm">EN</a>
-</nav>
-<header>
-    <a href="index.html"><img src="https://n2o.space/img/Synrc Neo.svg" /></a>
-    <h1>SUP</h1>
-</header>
-<main>
-    <section>
-
-<h3>ВСТУП</h3>
-
-<p>Модуль SUP</p>
-    </section>
-    <section>
-<p>Цей модуль може бути пов'язаним з:
-MAN_MODULES
-</p>
-    </section>
-</main><footer>
-    2005&#8211;2019 © Synrc Research Center
-</footer></body></html>