Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion BrixelAPI.SpaceAPI/Domain/SpaceStateAggregate/SpaceState.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Collections.Generic;
using Schema;
using Schema.v14;


namespace BrixelAPI.SpaceState.Domain.SpaceStateAggregate;
Expand All @@ -18,7 +20,6 @@ public static SpaceState GetConfiguredSpaceAPI()
{
return new SpaceState()
{
ApiCompatibility = ["0.14"],
Space = "Brixel",
Logo = "https://www.brixel.be/wp-content/uploads/2015/09/Logo_small_transparant.png",
Url = "http://brixel.be",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.Linq;
using Schema.v14;

namespace BrixelAPI.SpaceState.Features.GetFullStatus
{
public class GetFullStatusResponse : SpaceApi
{
public GetFullStatusResponse(Domain.SpaceStateAggregate.SpaceState spaceState)
{
ApiCompatibility = spaceState.ApiCompatibility;
Space = spaceState.Space;
Logo = spaceState.Logo;
Url = spaceState.Url;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,130 +1,125 @@
// <auto-generated />
//
// To parse this JSON data, add NuGet 'System.Text.Json' then do:
//
// using SpaceApi;
//
// var coordinate = Coordinate.FromJson(jsonString);
using System;

using System;
using System.Collections.Generic;

using System.Text.Json;
using System.Text.Json.Serialization;
using System.Globalization;

/// <summary>
/// SpaceAPI v14
/// </summary>
public partial class SpaceApi
namespace Schema.v14
{
/// <summary>
/// The versions your SpaceAPI endpoint supports
/// </summary>
[JsonPropertyName("api_compatibility")]
public string[] ApiCompatibility { get; set; }

/// <summary>
/// URL(s) of webcams in your space
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("cam")]
public string[] Cam { get; set; }

/// <summary>
/// Contact information about your space
/// </summary>
[JsonPropertyName("contact")]
public Contact Contact { get; set; }

/// <summary>
/// Events which happened recently in your space and which could be interesting to the
/// public, like 'User X has entered/triggered/did something at timestamp Z'
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("events")]
public Event[] Events { get; set; }

/// <summary>
/// Feeds where users can get updates of your space
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("feeds")]
public Feeds Feeds { get; set; }

/// <summary>
/// Arbitrary links that you'd like to share
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("links")]
public Link[] Links { get; set; }

/// <summary>
/// Position data such as a postal address or geographic coordinates
/// </summary>
[JsonPropertyName("location")]
public Location Location { get; set; }

/// <summary>
/// URL to your space logo
/// </summary>
[JsonPropertyName("logo")]
public string Logo { get; set; }

/// <summary>
/// A list of the different membership plans your hackerspace might have. Set the value
/// according to your billing process. For example, if your membership fee is 10€ per month,
/// but you bill it yearly (aka. the member pays the fee once per year), set the amount to
/// 120 an the billing_interval to yearly.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("membership_plans")]
public MembershipPlan[] MembershipPlans { get; set; }

/// <summary>
/// Your project sites (links to GitHub, wikis or wherever your projects are hosted)
/// SpaceAPI v14
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("projects")]
public string[] Projects { get; set; }

/// <summary>
/// Data of various sensors in your space (e.g. temperature, humidity, amount of Club-Mate
/// left, …). The only canonical property is the <em>temp</em> property, additional sensor
/// types may be defined by you. In this case, you are requested to share your definition for
/// inclusion in this specification.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("sensors")]
public Sensors Sensors { get; set; }

/// <summary>
/// The name of your space
/// </summary>
[JsonPropertyName("space")]
public string Space { get; set; }

/// <summary>
/// A flag indicating if the hackerspace uses SpaceFED, a federated login scheme so that
/// visiting hackers can use the space WiFi with their home space credentials.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("spacefed")]
public Spacefed Spacefed { get; set; }

/// <summary>
/// A collection of status-related data: actual open/closed status, icons, last change
/// timestamp etc.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("state")]
public State State { get; set; }

/// <summary>
/// URL to your space website
/// </summary>
[JsonPropertyName("url")]
public string Url { get; set; }
public class SpaceApi
{
/// <summary>
/// The versions your SpaceAPI endpoint supports
/// </summary>
[JsonPropertyName("api_compatibility")]
public string[] ApiCompatibility => ["14"];

/// <summary>
/// URL(s) of webcams in your space
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("cam")]
public string[] Cam { get; set; }

/// <summary>
/// Contact information about your space
/// </summary>
[JsonPropertyName("contact")]
public Contact Contact { get; set; }

/// <summary>
/// Events which happened recently in your space and which could be interesting to the
/// public, like 'User X has entered/triggered/did something at timestamp Z'
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("events")]
public Event[] Events { get; set; }

/// <summary>
/// Feeds where users can get updates of your space
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("feeds")]
public Feeds Feeds { get; set; }

/// <summary>
/// Arbitrary links that you'd like to share
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("links")]
public Link[] Links { get; set; }

/// <summary>
/// Position data such as a postal address or geographic coordinates
/// </summary>
[JsonPropertyName("location")]
public Location Location { get; set; }

/// <summary>
/// URL to your space logo
/// </summary>
[JsonPropertyName("logo")]
public string Logo { get; set; }

/// <summary>
/// A list of the different membership plans your hackerspace might have. Set the value
/// according to your billing process. For example, if your membership fee is 10€ per month,
/// but you bill it yearly (aka. the member pays the fee once per year), set the amount to
/// 120 an the billing_interval to yearly.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("membership_plans")]
public MembershipPlan[] MembershipPlans { get; set; }

/// <summary>
/// Your project sites (links to GitHub, wikis or wherever your projects are hosted)
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("projects")]
public string[] Projects { get; set; }

/// <summary>
/// Data of various sensors in your space (e.g. temperature, humidity, amount of Club-Mate
/// left, …). The only canonical property is the <em>temp</em> property, additional sensor
/// types may be defined by you. In this case, you are requested to share your definition for
/// inclusion in this specification.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("sensors")]
public Sensors Sensors { get; set; }

/// <summary>
/// The name of your space
/// </summary>
[JsonPropertyName("space")]
public string Space { get; set; }

/// <summary>
/// A flag indicating if the hackerspace uses SpaceFED, a federated login scheme so that
/// visiting hackers can use the space WiFi with their home space credentials.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("spacefed")]
public Spacefed Spacefed { get; set; }

/// <summary>
/// A collection of status-related data: actual open/closed status, icons, last change
/// timestamp etc.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("state")]
public State State { get; set; }

/// <summary>
/// URL to your space website
/// </summary>
[JsonPropertyName("url")]
public string Url { get; set; }
}
}

/// <summary>
Expand Down