Giter VIP home page Giter VIP logo

poll-question's Introduction

REST-сервис для управления опросами

Настройки доступа к базе данных:

/src/main/resources/application.properties

spring.datasource.url=jdbc:postgresql://localhost:5432/poll spring.datasource.username=polluser spring.datasource.password=pollPassword

Формат даты - timestamp

Список запросов:

- Добавление нового опроса

POST /polls

{ "name": "Новый опрос", "startDate": 533456, "endDate": 1033456, "status": 1 }

- Удаление опроса

DEL /polls/{pollId}

  • pollId - id удаляемого опроса

- Редактирование опроса

PUT /polls/{pollId}

  • pollId - id опроса

{ "name": "Новое наименование запроса", "startDate": 424234, "endDate": 634234, "status": 2 }

- Получить список опросов

GET /polls?orderBy={orderBy}&direction={direction}&name={name}&status={status}&fromStartDate={fromStartDate}&toStartDate={toStartDate}&fromEndDate={fromEndDate}&toEndDate={toEndDate}

Обязательные поля:

  • orderBy - сортировка по полю startDate/name
  • direction - ASC/DESC порядок сортировки

Опциональные поля для фильтрации:

  • name - наименование опроса
  • status - статус опроса
  • fromStartDate - диапазон даты начала опроса начиная с даты ...
  • toStartDate - диапазон даты начала опроса заканчивая датой ...
  • fromEndDate - диапазон даты окончания опроса начиная с даты ...
  • toEndDate - диапазон даты окончания опроса заканчивая датой ...

- Добавить новый вопрос опроса:

POST /questions

{ "pollId": 1, "text": "текст вопроса" "order": 2 }

  • pollId - id опроса
  • text - текст вопроса
  • order - порядок отображения

poll-question's People

Contributors

lfleny avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.