Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Получить события #38

Open
stormkirill98 opened this issue Nov 23, 2019 · 1 comment
Open

Получить события #38

stormkirill98 opened this issue Nov 23, 2019 · 1 comment
Assignees
Labels
API improve Есть варианты улучшения этого
Projects

Comments

@stormkirill98
Copy link
Owner

stormkirill98 commented Nov 23, 2019

Получить события за определенный месяц для текущего пользователя
GET запрос, на входе 2 аргумента: month, year
month число от 1 до 12 включительно
year любое число
Возвращает список событий в json или ошибку 400 -не валидные параметры, 401 - пользователь не прошел авторизацию

ПРИМЕР ВЫЗОВА
fetch("https://127.0.0.1:5000/events?month=11&year=2019").then((response) => {
if (response.ok){
response.json().then((data) => {
console.log(data);
})
} else {
console.log(response.statusText);
}
});

@stormkirill98 stormkirill98 created this issue from a note in Version 1 (To do) Nov 23, 2019
@stormkirill98
Copy link
Owner Author

Возвращать события в виде { 1: {...}, 2: {...} }

@stormkirill98 stormkirill98 added the improve Есть варианты улучшения этого label Dec 20, 2019
@stormkirill98 stormkirill98 moved this from To do to In progress in Version 1 Dec 20, 2019
@stormkirill98 stormkirill98 self-assigned this Dec 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API improve Есть варианты улучшения этого
Projects
Version 1
  
In progress
Development

No branches or pull requests

1 participant