feat: adds spaceapi endpoint #57

Merged
oysteikt merged 3 commits from spaceapi into master 2024-05-18 20:05:13 +02:00
Owner

A basic implementation of the https://spaceapi.io/ specification.
Tested working door sensor status. Added basic info about us, our website, git forge and wiki.

Co-authored with @sindos and @oysteikt.

A basic implementation of the https://spaceapi.io/ specification. Tested working door sensor status. Added basic info about us, our website, git forge and wiki. Co-authored with @sindos and @oysteikt.
felixalb added 1 commit 2024-05-12 03:38:23 +02:00
Author
Owner

We might need to do some tricks to make nginx shows this as application/json in the headers?
Edit: Resolved

We might need to do some tricks to make nginx shows this as `application/json` in the headers? Edit: Resolved
oysteikt reviewed 2024-05-12 04:51:58 +02:00
www/spaceapi.php Outdated
@ -0,0 +37,4 @@
"wiki": {
"type": "atom",
"url": "https://www.pvv.ntnu.no/w/api.php?hidebots=1&urlversion=1&action=feedrecentchanges&feedformat=atom"
}
Owner
Maybe add `calender` https://www.pvv.ntnu.no/hendelser/?
Author
Owner

That link is neither RSS nor ical, so that i don't think that's allowed per https://spaceapi.io/docs/. Ical support on the website would be amazing though, but surprisingly difficult to implement due to our terrible event system.

That link is neither RSS nor ical, so that i don't think that's allowed per https://spaceapi.io/docs/. Ical support on the website would be amazing though, but surprisingly difficult to implement due to our terrible event system.
Author
Owner

I added the /hendelser/-page to "links" for now.

I added the /hendelser/-page to "links" for now.
Owner

No, I do think we could add it under calendar. The type being rss, atom or ical are just being provided as examples. We could set "type": "html" and still be compliant.

No, I do think we could add it under calendar. The `type` being `rss`, `atom` or `ical` are just being provided as examples. We could set `"type": "html"` and still be compliant.
felixalb marked this conversation as resolved
oysteikt reviewed 2024-05-12 04:53:08 +02:00
www/spaceapi.php Outdated
@ -0,0 +42,4 @@
"projects": [
"https://github.com/Programvareverkstedet/",
"https://git.pvv.ntnu.no/"
]
Owner

Should we add links to other official medias, like youtube, facebook or linkedin using links?

Should we add links to other official medias, like youtube, facebook or linkedin using `links`?
Author
Owner

Not right there, under projects

"projects": Your project sites (links to GitHub, wikis or wherever your projects are hosted)

But we could make a list of

"links": Arbitrary links that you'd like to share

The list you recommended seems good 👍

Not right there, under projects > "projects": Your project sites (links to GitHub, wikis or wherever your projects are hosted) But we could make a list of > "links": Arbitrary links that you'd like to share The list you recommended seems good 👍
Owner

Thanks, that was what I meant. Not sure where else to comment

Thanks, that was what I meant. Not sure where else to comment
felixalb marked this conversation as resolved
oysteikt reviewed 2024-05-12 04:55:10 +02:00
www/spaceapi.php Outdated
@ -0,0 +13,4 @@
"api": "0.13",
"api_compatibility": ["14"],
"space": "Programvareverkstedet",
"logo": "https://git.pvv.ntnu.no/Drift/pvv-nixos-config/raw/branch/main/assets/logo_blue_regular.png",
Owner

We could potentially use https://git.pvv.ntnu.no/assets/img/logo.svg instead

We could potentially use https://git.pvv.ntnu.no/assets/img/logo.svg instead
oysteikt marked this conversation as resolved
felixalb force-pushed spaceapi from a20fae7595 to c76b424c94 2024-05-12 10:36:33 +02:00 Compare
felixalb force-pushed spaceapi from c76b424c94 to 5f7544588e 2024-05-12 10:42:39 +02:00 Compare
felixalb added 1 commit 2024-05-12 10:46:52 +02:00
oysteikt reviewed 2024-05-12 14:08:25 +02:00
www/spaceapi.php Outdated
@ -0,0 +21,4 @@
"lat": 63.250
},
"contact": {
"irc": "//irc.pvv.ntnu.no/pvv",
Owner

Should this be irc://irc.pvv.ntnu.no/pvv maybe?

Should this be `irc://irc.pvv.ntnu.no/pvv` maybe?
felixalb marked this conversation as resolved
felixalb force-pushed spaceapi from ccf0b0511e to c6df8e6ae3 2024-05-14 19:30:17 +02:00 Compare
felixalb added 1 commit 2024-05-14 19:53:42 +02:00
felixalb requested review from oysteikt 2024-05-14 19:55:14 +02:00
Author
Owner

I did validate all my changes at https://validator.spaceapi.io/ui/, by the way :)

I did validate all my changes at https://validator.spaceapi.io/ui/, by the way :)
oysteikt reviewed 2024-05-14 23:31:39 +02:00
@ -0,0 +30,4 @@
"issue_report_channels": ["email"],
"state": {
"open": <?php echo($doorEntry->open ? "true" : "false"); ?>,
"lastchange": <?php echo($doorEntry->time ? $doorEntry->time : 0); ?>
Owner

Maybe add a message, just in case anyone is wondering

"message": "Open for public when members are present"
Maybe add a message, just in case anyone is wondering ```json "message": "Open for public when members are present" ```
oysteikt marked this conversation as resolved
oysteikt reviewed 2024-05-14 23:31:50 +02:00
@ -0,0 +22,4 @@
},
"contact": {
"irc": "irc://irc.pvv.ntnu.no/pvv",
"email": "pvv@pvv.ntnu.no",
Owner

Should we add issue_mail?

Should we add `issue_mail`?
oysteikt marked this conversation as resolved
oysteikt force-pushed spaceapi from 6a8ad06e00 to a7a69ca2ac 2024-05-18 20:00:41 +02:00 Compare
oysteikt force-pushed spaceapi from a7a69ca2ac to 0542a10d03 2024-05-18 20:03:24 +02:00 Compare
oysteikt approved these changes 2024-05-18 20:03:57 +02:00
oysteikt left a comment
Owner



















Prop Status
status approved
hotel trivago
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- | Prop | Status | | -------- | -------- | | status | approved | | hotel | trivago |
oysteikt merged commit 7bf2c31db3 into master 2024-05-18 20:05:13 +02:00
oysteikt deleted branch spaceapi 2024-05-18 20:05:13 +02:00
Sign in to join this conversation.
No description provided.