This is an automated email from the git hooks/post-receive script. New commit to branch feature/pollen-riot-js in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit d960be52ef806a295fbafd6abf91cfbbdfeb86ca Author: Tony CHEMIT <dev@tchemit.fr> Date: Fri Jan 20 09:06:57 2017 +0100 Début de documentation de l'api REST --- pollen-rest-api/pom.xml | 2 ++ pollen-rest-api/src/site/markdown/auth.md | 53 ++++++++++++++++++++++++++++++ pollen-rest-api/src/site/markdown/index.md | 5 +++ pollen-rest-api/src/site/markdown/poll.md | 13 ++++++++ pollen-rest-api/src/site/site_en.xml | 44 +++++++++++++++++++++++++ 5 files changed, 117 insertions(+) diff --git a/pollen-rest-api/pom.xml b/pollen-rest-api/pom.xml index de336ad..d5ab2fa 100644 --- a/pollen-rest-api/pom.xml +++ b/pollen-rest-api/pom.xml @@ -51,6 +51,8 @@ ${project.build.directory}/${project.build.finalName}.war </redmine.releaseFiles> + <siteSourcesType>md</siteSourcesType> + <maven.deploy.skip>true</maven.deploy.skip> </properties> diff --git a/pollen-rest-api/src/site/markdown/auth.md b/pollen-rest-api/src/site/markdown/auth.md new file mode 100644 index 0000000..c7d1462 --- /dev/null +++ b/pollen-rest-api/src/site/markdown/auth.md @@ -0,0 +1,53 @@ +# Auth API + +## /v1/login + +Method **POST** or **PUT** + +Use basic authentication. + +This will send you back two cookies: ``pollen-auth`` and ``pollen-connected``. + +## /v1/login2 + +Method **POST** or **PUT** + +Use POST form with parameters: `` login, password `` + +This will send you back two cookies: ``pollen-auth`` and ``pollen-connected``. + +## /v1/logout + +Method **GET** + +No parameters. Will remove the two cookies ``pollen-auth`` and ``pollen-connected`` from you browser. + +## /v1/lostpassword/{email} + +Method **GET** + +Generates a new password and send it to user by email. + +## /v1/resendValidation/{email} + +Method **GET** + +Generates a new invitation and send it to user by email. + +## /v1/users + +Method **POST** + +Create the user given in ``user`` request parameter. + +## /v1/users/connected + +Method **GET** + +Return the connected user. + +## /v1/users/{userId}?{token} + +Method **GET** + +Validate user account. diff --git a/pollen-rest-api/src/site/markdown/index.md b/pollen-rest-api/src/site/markdown/index.md new file mode 100644 index 0000000..0b67bb2 --- /dev/null +++ b/pollen-rest-api/src/site/markdown/index.md @@ -0,0 +1,5 @@ +# Pollen Rest Api + +This module exposes a simple REST API to communicate with Pollen. + +You will find here how to make it real. diff --git a/pollen-rest-api/src/site/markdown/poll.md b/pollen-rest-api/src/site/markdown/poll.md new file mode 100644 index 0000000..9df6d89 --- /dev/null +++ b/pollen-rest-api/src/site/markdown/poll.md @@ -0,0 +1,13 @@ +# Poll API + +## /v1/polls + +Method **POST** or **PUT** + +Create a new poll. + +## /v1/polls/created + +Method **GET** + +Get polls created by connected user. \ No newline at end of file diff --git a/pollen-rest-api/src/site/site_en.xml b/pollen-rest-api/src/site/site_en.xml new file mode 100644 index 0000000..3286be0 --- /dev/null +++ b/pollen-rest-api/src/site/site_en.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + Pollen + %% + Copyright (C) 2009 - 2017 Code Lutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --> + +<project name="${project.name}" xmlns="http://maven.apache.org/DECORATION/1.3.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/DECORATION/1.3.0 http://maven.apache.org/xsd/decoration-1.3.0.xsd"> + + <body> + + <breadcrumbs> + <item name="${project.version}" href="./index.html"/> + </breadcrumbs> + + <menu name="User documentation"> + <item name="Home" href="./index.html"/> + <item name="Auth API" href="./auth.html"/> + <item name="Poll API" href="./poll.html"/> + </menu> + + <menu ref="reports"/> + + </body> + +</project> + -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.