Betting.WebApi

<back to all web services

GetUserProfile

Requires Authentication
The following routes are available for this service:
All Verbs/qry/users/profile
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Betting.WebApi.ServiceModel;
using Betting.Common;
using Starnet.Common;

namespace Betting.Common
{
    public partial class BettorWalletProfile
    {
        public virtual string Id { get; set; }
        public virtual string Username { get; set; }
        public virtual Person Person { get; set; }
        public virtual RecordDictionary<string, string> Data { get; set; }
    }

    public partial class ContactInfo
    {
        public virtual string Phone { get; set; }
        public virtual string Email { get; set; }
    }

    public partial class Name
    {
        public virtual string First { get; set; }
        public virtual string Last { get; set; }
        public virtual string Full { get; set; }
    }

    public partial class Person
    {
        public virtual Name Name { get; set; }
        public virtual Address Address { get; set; }
        public virtual DateTime? DateOfBirth { get; set; }
        public virtual ContactInfo ContactInfo { get; set; }
    }

}

namespace Betting.WebApi.ServiceModel
{
    public partial class GetUserProfile
    {
        public virtual string Id { get; set; }
    }

}

namespace Starnet.Common
{
    public partial class Address
    {
        public virtual string Street { get; set; }
        public virtual string City { get; set; }
        public virtual string State { get; set; }
        public virtual string PostalCode { get; set; }
        public virtual Ref Country { get; set; }
        public virtual GPSCoordinates GPS { get; set; }
        public virtual RecordDictionary<string, string> Data { get; set; }
    }

    public partial class GPSCoordinates
    {
        public virtual double Lat { get; set; }
        public virtual double Lng { get; set; }
    }

    public partial class RecordDictionary<TKey, TVal>
        : Dictionary<TKey, TVal>
    {
    }

    public partial class Ref
    {
        public virtual string Id { get; set; }
        public virtual string Val { get; set; }
    }

}

C# GetUserProfile 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 /qry/users/profile HTTP/1.1 
Host: api.sbbet.ath.cx 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: String,
	username: String,
	person: 
	{
		name: 
		{
			first: String,
			last: String,
			full: String String
		},
		address: 
		{
			street: String,
			city: String,
			state: String,
			postalCode: String,
			country: 
			{
				id: String,
				val: String
			},
			gps: 
			{
				lat: 0,
				lng: 0
			},
			data: 
			{
				String: String
			}
		},
		dateOfBirth: 0001-01-01,
		contactInfo: 
		{
			phone: String,
			email: String
		}
	},
	data: 
	{
		String: String
	}
}