Skip to content

Commit

Permalink
changed logo url, added fiels for more spaceapi.io fun
Browse files Browse the repository at this point in the history
  • Loading branch information
scammo committed Oct 2, 2023
1 parent 064e4f6 commit 5a5ac4e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 3 additions & 1 deletion api/.env.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
TOKEN=YOURSUPERSECRETTOKEN

SPACE=Chaostreff Flensburg
LOGO=https://chaostreff-flensburg.de/wp-content/uploads/2018/03/ctfl-logo.png
LOGO=https://chaostreff-flensburg.de/logo.png
URL=https://chaostreff-flensburg.de
ADDRESS=Apenrader Str. 49, 24939 Flensburg
LAT=54.8045778
LON=9.4224836
EMAIL=[email protected]
MASTODON=https://chaos.social/@chaos_fl
BLOG=https://chaostreff-flensburg.de/feed.rss
EXT_CCC=erfa
12 changes: 11 additions & 1 deletion api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ type Location struct {
Lon string `json:"lon"`
}

type Feeds struct {
Blog string `json:"blog"`
}

type Space struct {
Api string `json:"api"`
ApiCompatibility string `json:"api_compatibility"`
Expand All @@ -31,7 +35,9 @@ type Space struct {
Url string `json:"url"`
Location Location `json:"location"`
Contact Contact `json:"contact"`
Feeds Feeds `json:"feeds"`
Open bool `json:"open"`
ExtCCC string `json:"ext_ccc"`
}

func renderResponse() Space {
Expand All @@ -50,7 +56,11 @@ func renderResponse() Space {
Email: os.Getenv("EMAIL"),
Mastodon: os.Getenv("MASTODON"),
},
Open: getState(),
Feeds: Feeds{
Blog: os.Getenv("BLOG"),
},
ExtCCC: os.Getenv("EXT_CCC"),
Open: getState(),
}
}

Expand Down

0 comments on commit 5a5ac4e

Please sign in to comment.