Open artyom-poptsov opened 5 years ago
I've looked at API docs and made a valid JSON response, that is based on the info from wiki and website. Here it is:
{
"api": "0.13",
"space": "CADR",
"url": "https://cadrspace.ru/",
"logo": "https://cadrspace.ru/images/cadr.png",
"location": {
"address": "Studencheskaya St, 6, Nizhnij Novgorod, Nizhegorodskaya oblast', 603022",
"lat": 56.3026069,
"lon": 43.988262
},
"state": {
"open": false,
"message": "Usually open in evenings on workdays. Status not updated automatically yet. Check Telegram channel https://t.me/cadr_hackerspace for exact status"
},
"contact": {
"keymasters": [
{
"name": "Artyom Poptsov",
"email": "poptsov.artyom@gmail.com",
"twitter": "@artyom_poptsov"
}
],
"irc": "irc://chat.freenode.net/##cadr",
"twitter": "@cadrspace",
"ml": "cadr-hackerspace@googlegroups.com",
"ext_telegram": "https://t.me/cadr_hackerspace"
},
"issue_report_channels": ["ml"],
"cam": ["http://qfaq.ru/"],
"feeds": {
"wiki": {
"url": "https://cadrspace.ru/w/index.php?title=CADR"
},
"calendar": {
"type": "ical",
"url": "https://www.google.com/calendar/ical/k63oqqu12qrmbo2giom17nu3m4@group.calendar.google.com/public/basic.ics"
}
},
"cache": {
"schedule": "m.02"
},
"projects": ["https://github.com/cadrspace", "https://cadrspace.ru/w/index.php?title=Projects", "https://www.youtube.com/channel/UC3VpKt2Iedwu_3hI5NYAKCg"]
}
There are a couple of fields that I interpreted freely, please check them:
"message": "Usually open in evenings on workdays. Status not updated automatically yet. Check Telegram channel https://t.me/cadr_hackerspace for exact status"
- I believe this is more or less correct, but feel free to provide a better message"projects"
section. This should be ok, videos could be considered as projects as well, especially educational ones.I have some more questions, but will write them below in separate posts.
The most important questions are:
open
status automatically? We can do it via telegram/IRC bot or via lock firmware. Anyway, API response would become dynamic, and we would need to generate it on server. Let's have a discussion about this."email"
and "issue_mail"
. Once we have an "issue_email"
, we should probably change to "issue_report_channels": ["issue_mail"]
."contact": { "keymasters": [...]}"
we should probably add all admins, I didn't find enough info about them on wiki. Also, @artyom-poptsov I didn't find your IRC nick, feel free to add one to "irc_nick"
field.Some less important questions:
"state" : {"icon": {...}}
where we can provide custom icons for open/closed status in the app. Do we have any suitable icons for this? I need to check how it looks in tha app, though, maybe default ones are ok."stream": "..."
field for video stream. Does our camera provide video stream? I could only found screenshots feed at (http://qfaq.ru/)"sensors": [...]
filed, do we have any sensors that we could put there?Some more fields that don't look important to me:
"events": ""
field. I guess we could put open
/close
events there once we add automatic status integration. But we can also add person entered/left
events and more."spacefed"
field has credentials for federated login scheme for visiting people. I guess we don't support this, and links to SpaceFED wiki currently don't work."radio_shows": [...]
field has a list of radio shows, there are none that I'm aware of at CADR."contact": {
"phone": "",
"sip": "",
"facebook": "",
"google": { "plus": ""},
"identica": "",
"foresquare": "",
"jabber": "",
}
Hello! Thanks for investigating the problem. I'll answer your questions in a few days or so.
1. Do we have a plan to update `open` status automatically? We can do it via telegram/IRC bot or via lock firmware. Anyway, API response would become dynamic, and we would need to generate it on server. Let's have a discussion about this.
Yes, @targence has created a bot that dwelled in our Telegram channel some time ago. I think we should ask Alexey for updating the bot.
- For contact information, I couldn't find CADR e-mail addresses (found only personal ones). There are two e-mail address in the API: just "email" and "issue_mail". Once we have an "issue_email", we should probably change to "issue_report_channels": ["issue_mail"].
We have a mailing list (https://groups.google.com/d/forum/cadr-hackerspace) for that matter.
- In "contact": { "keymasters": [...]}" we should probably add all admins, I didn't find enough info about them on wiki. Also, @artyom-poptsov I didn't find your IRC nick, feel free to add one to "irc_nick" field.
I'll ask admins if any of them agreed to publish some contact information in the API. But for now you can leave this field as is.
API schema has an optional field"state" : {"icon": {...}} where we can provide custom icons for open/closed status in the app. Do we have any suitable icons for this? I need to check how it looks in tha app, though, maybe default ones are ok.
Well, yes. ;-)
I used some JS code on the HTML page to make the Lisp Alien colorless when the hackerspace is closed.
And the icon itself can be found here.
There is an optional "stream": "..." field for video stream. Does our camera provide video stream? I could only found screenshots feed at (http://qfaq.ru/)
You should ask Alexey Papin (apapin at Telegram) for details -- he is maintaining this piece of infrastructure. I think he asked me once if we can use a subdomain for camera stream. I can help with that.
There is an "events": "" field. I guess we could put open/close events there once we add automatic status integration. But we can also add person entered/left events and more. "spacefed" field has credentials for federated login scheme for visiting people. I guess we don't support this, and links to SpaceFED wiki currently don't work. "radio_shows": [...] field has a list of radio shows, there are none that I'm aware of at CADR.
OK, we should left those for last.
What is the best way to publish our SpaceAPI endpoint according to the maintainers? Should we re-use existing code (https://github.com/cadrspace/endpoint-scripts)?
-- Artyom
I'm picking this up.