Betting.WebApi

<back to all web services

GetUserProfile

Requires Authentication
The following routes are available for this service:
All Verbs/qry/users/profile
package dtos

import (
	"time"
)

type Name struct {
	First *string `json:"first,omitempty"`
	Last  *string `json:"last,omitempty"`
	Full  *string `json:"full,omitempty"`
}

type Ref struct {
	Id  string `json:"id"`
	Val string `json:"val"`
}

type GPSCoordinates struct {
	Lat float64 `json:"lat,omitempty"`
	Lng float64 `json:"lng,omitempty"`
}

type Address struct {
	Street     string                           `json:"street"`
	City       string                           `json:"city"`
	State      string                           `json:"state"`
	PostalCode string                           `json:"postalCode"`
	Country    Ref                              `json:"country"`
	Gps        GPSCoordinates                   `json:"gps"`
	Data       RecordDictionary[string, string] `json:"data"`
}

type ContactInfo struct {
	Phone *string `json:"phone,omitempty"`
	Email *string `json:"email,omitempty"`
}

type Person struct {
	Name        *Name        `json:"name,omitempty"`
	Address     *Address     `json:"address,omitempty"`
	DateOfBirth *time.Time   `json:"dateOfBirth,omitempty"`
	ContactInfo *ContactInfo `json:"contactInfo,omitempty"`
}

type BettorWalletProfile struct {
	Id       *string                           `json:"id,omitempty"`
	Username *string                           `json:"username,omitempty"`
	Person   *Person                           `json:"person,omitempty"`
	Data     *RecordDictionary[string, string] `json:"data,omitempty"`
}

type GetUserProfile struct {
	Id *string `json:"id,omitempty"`
}

type RecordDictionary[TKey any, TVal any] map[TKey]TVal

Go GetUserProfile DTOs

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

HTTP + CSV

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.bettor.webhop.biz 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"id":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
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-01T00:00:00.0000000Z","contactInfo":{"phone":"String","email":"String"}},"data":{"String":"String"}}