Endpoint

struct Endpoint

Endpoints to access the REST API of the backend

  • url

    The URL of the endpoint

    Declaration

    Swift

    var url: URL? { get }
  • Endpoint for posting trip data to the backend

    Declaration

    Swift

    static func postTrip(userID: String, ticketID: String) -> Endpoint
  • Endpoint for getting an active ticket from the backend

    Declaration

    Swift

    static func ticket() -> Endpoint
  • Endpoint for getting all coupons owned by a userId

    Declaration

    Swift

    static func allCouponsFor(userID: String) -> Endpoint
  • Endpoint to use a coupon identified by a id Expects PUT request

    Declaration

    Swift

    static func useCoupon(userID: String, couponID: String) -> Endpoint
  • Endpoint for getting all coupons owned by a userId

    Declaration

    Swift

    static func walletFor(userID: String) -> Endpoint