Skip to content

Commit a51b033

Browse files
committed
update docs, AS verison
1 parent 7c10dac commit a51b033

15 files changed

+84
-243
lines changed

doc/JsonSamples/app_data.json

Lines changed: 65 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,96 @@
11
{
2-
"events": [
2+
"paths": [
33
{
44
"id": 1,
5-
"name": "event1",
6-
"img": "https://www.petmd.com/sites/default/files/cat-stroke-606267548.jpg",
7-
"address": "human readable address",
8-
"room": "room number",
9-
"info": "event info",
10-
"topic": "event topic",
11-
"speaker_id": 1,
12-
"dor1_img": "http://know.wroc.pl/wp-content/uploads/2014/08/Pwr_chemia.jpg",
13-
"dor2_img": "http://know.wroc.pl/wp-content/uploads/2014/08/Pwr_chemia.jpg",
14-
"latitude": "51.1107075",
15-
"longitude": "17.042731"
5+
"name": "Scieżka 1",
6+
"info": "Scieżka 1",
7+
"active": false
168
},
179
{
1810
"id": 2,
19-
"name": "event2",
20-
"img": "https://www.petmd.com/sites/default/files/cat-stroke-606267548.jpg",
21-
"address": "human readable address",
22-
"room": "room number",
23-
"info": "event info",
24-
"topic": "event topic",
25-
"speaker_id": 2,
26-
"dor1_img": "http://know.wroc.pl/wp-content/uploads/2014/08/Pwr_chemia.jpg",
27-
"dor2_img": "http://know.wroc.pl/wp-content/uploads/2014/08/Pwr_chemia.jpg",
28-
"latitude": "51.1107075",
29-
"longitude": "17.042731"
11+
"name": "Scieżka 2",
12+
"info": "Scieżka 2",
13+
"active": true
3014
}
3115
],
32-
"map_others": [
33-
{
34-
"id": 1,
35-
"type": 1,
36-
"name": "Bar Bazylia",
37-
"info": "some info and stuff",
38-
"img": "http://know.wroc.pl/wp-content/uploads/2014/08/Pwr_chemia.jpg",
39-
"latitude": "51.1307075",
40-
"longitude": "17.052731"
41-
},
16+
"timetables": [
4217
{
43-
"id": 2,
44-
"type": 1,
45-
"name": "SKS",
46-
"info": "some info and stuff",
47-
"img": "http://know.wroc.pl/wp-content/uploads/2014/08/Pwr_chemia.jpg",
48-
"latitude": "51.1507075",
49-
"longitude": "17.012731"
18+
"id": 4,
19+
"path_id": 2,
20+
"event_id": 5,
21+
"time_start": 1521878400,
22+
"time_end": 1521882000
5023
},
5124
{
52-
"id": 3,
53-
"type": 2,
54-
"name": "some other place type",
55-
"info": "some info and stuff",
56-
"img": "http://know.wroc.pl/wp-content/uploads/2014/08/Pwr_chemia.jpg",
57-
"latitude": "51.4507075",
58-
"longitude": "17.112731"
25+
"id": 5,
26+
"path_id": 2,
27+
"event_id": 6,
28+
"time_start": 1521882000,
29+
"time_end": 1521885600
5930
}
6031
],
61-
"paths": [
62-
{
63-
"id": 1,
64-
"name": "path1",
65-
"info": "path info",
66-
"active": 0
67-
},
32+
"events": [
6833
{
69-
"id": 2,
70-
"name": "path2",
71-
"info": "path info",
72-
"active": 1
34+
"id": 5,
35+
"name": "Rejestracja",
36+
"img": "https://i.imgur.com/McCLjh8.jpg",
37+
"address": "C-13, Wybrzeże Stanisława Wyspiańskiego 23/25",
38+
"room": "Parter",
39+
"info": "",
40+
"topic": "Rejestracja uczestników",
41+
"speaker_id": 3,
42+
"dor1_img": "https://i.imgur.com/McCLjh8.jpg",
43+
"dor2_img": "",
44+
"latitude": "51.10742743688339",
45+
"longitude": "17.05923020839691"
7346
},
7447
{
75-
"id": 3,
76-
"name": "path3",
77-
"info": "path info",
78-
"active": 0
48+
"id": 6,
49+
"name": "Oficjalne rozpoczęcie",
50+
"img": "https://i.imgur.com/SXpzyaN.jpg",
51+
"address": "A1, Wybrzeże Wyspiańskiego 27",
52+
"room": "Aula główna PWR",
53+
"info": "",
54+
"topic": "Oficjalne rozpoczęcie",
55+
"speaker_id": 3,
56+
"dor1_img": "https://i.imgur.com/JcXOOEo.jpg",
57+
"dor2_img": "https://i.imgur.com/SXpzyaN.jpg",
58+
"latitude": "51.10736681077137",
59+
"longitude": "17.06180512905121"
7960
}
8061
],
81-
"timetables": [
62+
"speakers": [
8263
{
83-
"id": 1,
84-
"path_id": 2,
85-
"event_id": 1,
86-
"time_start": 1003000,
87-
"time_end": 10006600
64+
"id": 3,
65+
"name": "NaS",
66+
"info": "Not a Speaker - for registry and opening",
67+
"img": ""
8868
},
8969
{
90-
"id": 2,
91-
"path_id": 2,
92-
"event_id": 2,
93-
"time_start": 1000000,
94-
"time_end": 10003600
70+
"id": 4,
71+
"name": "Dr inż. Marta Tsirigotis-Maniecka",
72+
"info": "Pani Doktor poszukuje odpowiednich mikroukładów nośnikowych opartych na biopolimerach, a przeznaczonych do enkapsulacji biologicznie aktywnych związków pochodzenia naturalnego, tak aby poprawić ich możliwości aplikacyjne w terapii różnych chorób. Jest współautorem kilkunastu artykułów naukowych, w tym 10 znajdujących się na Liście Filadelfijskiej, a także licznych międzynarodowych i krajowych komunikatów konferencyjnych.",
73+
"img": ""
9574
}
9675
],
97-
"speakers:": [
76+
"places": [
9877
{
9978
"id": 1,
100-
"speaker_name": "Name Surname",
101-
"speaker_info": "short speaker info",
102-
"speaker_img": "https://www.wykop.pl/cdn/c3201142/comment_LfNZtBbrA6zGMC5a8ocADPcOXUcVbPIj.jpg"
79+
"type": 2,
80+
"name": "Bar Bazylia",
81+
"info": "Bar Bazylia w budynku C-13 Politechniki Wroclawskiej to stołówka stworzona z myślą o studentach i specjalnie dla nich.\r\n\r\nStarannie dobrany, nowoczesny wystrój wnętrza sprawi, iż będziecie mogli oderwać się od uczelnianej rzeczywistości i choć na chwilę zapomnieć o stresach.\r\n\r\nRóżnorodność oferowanych dań, zawsze świeże potrawy, ich wyszukany smak, niewygórowana cena oraz szybka i miła obsługa sprawią, że od nas nigdy nie wyjdziecie głodni i zawsze chętnie wrócicie. Oprócz stałych pozycji w menu, każdego dnia staramy się Was zaskakiwać nowymi potrawami.\r\n\r\nPo pysznym obiedzie zapraszamy piętro wyżej do naszej kawiarni na aromatyczną kawę oraz domowe ciasto.",
82+
"img": "https://i.imgur.com/fdaYDDh.jpg",
83+
"latitude": "51.107402176013075",
84+
"longitude": "17.05905854701996"
10385
},
10486
{
10587
"id": 2,
106-
"speaker_name": "Jakub Dorda",
107-
"speaker_info": "short speaker info",
108-
"speaker_img": "https://www.wykop.pl/cdn/c3201142/comment_LfNZtBbrA6zGMC5a8ocADPcOXUcVbPIj.jpg"
88+
"type": 2,
89+
"name": "SKS",
90+
"info": "Strefa Kultury Studenckiej\r\n- stołówka, kawiarnia, miejsce spotkań oraz wydarzeń kulturalnych",
91+
"img": "https://i.imgur.com/ODm8OaI.jpg",
92+
"latitude": "51.10886054765045",
93+
"longitude": "17.056875228881836"
10994
}
11095
]
11196
}

doc/JsonSamples/events.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

doc/JsonSamples/last_update.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"updated_at": "2018-03-24T00:40:53.866240Z"
3+
}

doc/JsonSamples/login.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
{
2-
"token":"sampleToken"
3-
}
1+
{
2+
"token": "3824680825b81ca86758726b31deaf2fc6b3b08c"
3+
}

doc/JsonSamples/map_other.json

Lines changed: 0 additions & 29 deletions
This file was deleted.

doc/JsonSamples/paths.json

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"active": true
3+
}

doc/JsonSamples/speakers.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

doc/JsonSamples/timetable.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

doc/plannedAPI.txt

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
Authentication method: login + token (one-time use login&password generated by backend)
2-
login API endpoint: /api/login -> GET with Authorization header - user, password -> 200 returns access token
3-
any other API call -> GET with Authorization header - access token -> 200 response
2+
login API endpoint: /api/login -> POST FormUrlEncoded with fields - user, password -> 200 returns access token
43

54
API endpoints:
6-
/api/app_data -> all other request responses wrapped in single json (without /login, /last_update)
7-
/api/last_update -> (no token required) returns last date of db modification in seconds from unix epoch (or some other unique id, INT number only!)
8-
/api/public_access -> (no token required) activates automatically or manually after event ending, returns public access token, or 403 if inactive
9-
10-
/api/paths -> returns path names + marked logged user path
11-
/api/timetable -> returns events ids, paths ids, time
12-
/api/events -> returns events info
13-
/api/speakers -> returns speaker info
14-
/api/map_other -> returns other places info not connected to events
15-
16-
Sample Authorization headers:
17-
Login: Basic dXNlcjpwYXNzd29yZA==
18-
Token: hashedAccessToken
5+
/api/app_data -> GET (token required) all other request responses wrapped in single json (without /login, /last_update, /api/public_access), return only data relevent for user active path(!), with public acces token returns data for all paths
6+
/api/last_update -> GET (no token required) returns last date of db modification in seconds from unix epoch as String
7+
/api/public_access -> GET (no token required) activates automatically or manually after event ending, returns public access token(same response as login endpoint), or 403 if inactive
8+
/api/public_access_active -> GET (no token required) returns true/false if public access is available

labday/.idea/dictionaries/jakdor.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

labday/.idea/encodings.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

labday/.idea/kotlinc.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

labday/.idea/misc.xml

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

labday/.idea/vcs.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)