Blazor Diffusion

<back to all web services

UpdateSignup

Analytics
Requires Authentication
Required role:Moderator
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BlazorDiffusion.ServiceModel

Namespace Global

    Namespace BlazorDiffusion.ServiceModel

        Public Partial Class Signup
            Inherits StatBase
            Public Overridable Property Id As Integer
            Public Overridable Property Type As SignupType
            Public Overridable Property Email As String
            Public Overridable Property Name As String
            Public Overridable Property CancelledDate As Date?
        End Class

        Public Enum SignupType
            Updates
            Beta
        End Enum

        Public Partial Class StatBase
            Public Overridable Property RefId As String
            Public Overridable Property AppUserId As Integer?
            Public Overridable Property RawUrl As String
            Public Overridable Property RemoteIp As String
            Public Overridable Property CreatedDate As Date
        End Class

        <ValidateRequest(Validator:="HasRole(`Moderator`)")>
        Public Partial Class UpdateSignup
            Implements IPatchDb(Of Signup)
            Public Overridable Property Id As Integer
            Public Overridable Property Type As SignupType?
            <Validate(Validator:="Email")>
            Public Overridable Property Email As String

            Public Overridable Property Name As String
            Public Overridable Property CancelledDate As Date?
        End Class
    End Namespace
End Namespace

VB.NET UpdateSignup DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /jsv/reply/UpdateSignup HTTP/1.1 
Host: blazordiffusion.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: 0,
	type: Updates,
	email: String,
	name: String,
	cancelledDate: 0001-01-01
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: 0,
	type: Updates,
	email: String,
	name: String,
	cancelledDate: 0001-01-01,
	refId: String,
	appUserId: 0,
	rawUrl: String,
	remoteIp: String,
	createdDate: 0001-01-01
}