public static mappingsMapping GetMappingsMapping(int id = 0, int subItemCount = 0)
        {
            if (subItemCount == 0)
            {
                subItemCount = SR.I(20);
            }

            var outcomes = new List <mappingsMappingMapping_outcome>();

            for (var j = 0; j < subItemCount; j++)
            {
                outcomes.Add(GetMappingsMappingMappingOutcome());
            }
            var producerId = SR.I(10);

            return(new mappingsMapping
            {
                market_id = id == 0 ? SR.S1000 : id.ToString(),
                product_id = producerId,
                product_ids = $"{producerId}|{producerId+1}",
                sport_id = SR.Urn("sport", SR.I100).ToString(),
                sov_template = SR.S1000,
                valid_for = "setnr=" + SR.I100,
                mapping_outcome = SR.I100 > 50 ? null : outcomes.ToArray()
            });
        }
        public static teamCompetitor GetTeamCompetitor(int id = 0)
        {
            var references = new List <competitorReferenceIdsReference_id>();

            for (var j = 0; j < 5; j++)
            {
                var rc = GetReferenceCompetitor();
                if (references.Find(i => i.name == rc.name) == null)
                {
                    references.Add(rc);
                }
            }

            return(new teamCompetitor
            {
                id = id == 0 ? SR.Urn("competitor", 100000).ToString() : SR.Urn(id, "competitor").ToString(),
                name = "Competitor " + SR.S1000,
                abbreviation = SR.S1000,
                @virtual = true,
                country = SR.S1000,
                virtualSpecified = true,
                qualifier = SR.S1000,
                country_code = SR.S1000,
                reference_ids = references.ToArray(),
                divisionSpecified = true,
                division = SR.I100,
                state = "PA"
            });
        }
        public static competitorProfileEndpoint GetCompetitorProfileEndpoint(int id = 0, int playerCount = 0, IDictionary <string, string> referenceIds = null)
        {
            if (playerCount == 0)
            {
                playerCount = SR.I(20);
            }

            var players = new List <playerExtended>();

            for (var j = 0; j < playerCount; j++)
            {
                players.Add(GetPlayerExtended());
            }

            return(new competitorProfileEndpoint
            {
                competitor = new teamExtended
                {
                    id = id == 0 ? SR.Urn("competitor", 100000).ToString() : SR.Urn(id, "competitor").ToString(),
                    name = "my name",
                    abbreviation = SR.S1000,
                    @virtual = true,
                    virtualSpecified = true,
                    country = SR.S1000,
                    state = "PA",
                    reference_ids = referenceIds?.Select(s => new competitorReferenceIdsReference_id {
                        name = s.Key, value = s.Value
                    }).ToArray()
                },
                generated_at = DateTime.Today,
                generated_atSpecified = true,
                players = players.ToArray()
            });
        }
 public static currentSeason GetCurrentSeason(int id = 0)
 {
     return(new currentSeason
     {
         id = id == 0 ? SR.Urn("season", 100000).ToString() : SR.Urn(id, "season").ToString(),
         name = $"Season name {SR.S1000}"
     });
 }
 public static IAssist GetAssist(int id = 0)
 {
     return(new Assist(
                SR.Urn(id == 0 ? SR.I1000 : id),
                new Dictionary <CultureInfo, string> {
         { new CultureInfo("en"), "Assist name" }
     }, "assist type"));
 }
 public static sport GetSport(int id = 0)
 {
     return(new sport
     {
         id = id == 0 ? SR.Urn("sport", 100).ToString() : SR.Urn(id, "sport").ToString(),
         name = $"Sport {SR.S1000}",
     });
 }
 public static category GetCategory(int id = 0)
 {
     return(new category
     {
         id = id == 0 ? SR.Urn("category").ToString() : SR.Urn(id, "category").ToString(),
         name = $"Category name {SR.S1000}"
     });
 }
 public static referee GetReferee(int id = 0)
 {
     return(new referee
     {
         id = id == 0 ? SR.Urn("player").ToString() : SR.Urn(id, "player").ToString(),
         name = "Name " + SR.S1000,
         nationality = "Nationality " + SR.S100,
     });
 }
 public static desc_outcomesOutcome GetDescOutcomesOutcome(int id = 0)
 {
     return(new desc_outcomesOutcome
     {
         id = id == 0 ? SR.Urn("market").ToString() : SR.Urn(id, "market").ToString(),
         name = "Name " + SR.S(),
         description = "Description " + SR.S1000
     });
 }
        public static List <URN> GetUrns(int count, string type)
        {
            var items = new List <URN>();

            for (int i = 0; i < count; i++)
            {
                items.Add(SR.Urn(type));
            }
            return(items);
        }
 public static IPlayer GetPlayer(int id = 0)
 {
     return(new Player(
                id == 0
             ? SR.Urn("", 10000)
             : SR.Urn(id),
                new Dictionary <CultureInfo, string> {
         { new CultureInfo("en"), "Player " + SR.I1000 }
     }));
 }
        public static fixture GetFixture(int id = 0, int subItemCount = 0)
        {
            if (subItemCount == 0)
            {
                subItemCount = SR.I(10);
            }

            var infos = new List <info>();

            for (var j = 0; j < subItemCount; j++)
            {
                var info = GetInfo();
                if (infos.Find(i => i.key == info.key) == null)
                {
                    infos.Add(info);
                }
            }

            var references = new List <referenceIdsReference_id>();

            for (var j = 0; j < subItemCount; j++)
            {
                var rc = GetReference();
                if (references.Find(i => i.name == rc.name) == null)
                {
                    references.Add(rc);
                }
            }

            var msg = new fixture
            {
                id                      = id == 0 ? SR.Urn("match", 10000).ToString() : SR.Urn(id, "match").ToString(),
                name                    = "Fixture " + SR.S1000,
                competitors             = GetTeamCompetitorList(subItemCount).ToArray(),
                coverage_info           = GetCoverageInfo(),
                delayed_info            = GetDelayedInfo(),
                extra_info              = infos.ToArray(),
                liveodds                = SR.S1000,
                next_live_time          = DateTime.Today.ToString(SdkInfo.ISO8601_24H_FullFormat, CultureInfo.InvariantCulture), // should be like "2020-08-18T10:30:00+00:00"
                start_time_tbdSpecified = true,
                start_time_tbd          = true,
                start_timeSpecified     = true,
                start_time              = DateTime.Today,
                scheduledSpecified      = true,
                scheduled               = DateTime.Today.AddDays(3),
                scheduled_endSpecified  = true,
                scheduled_end           = DateTime.Today.AddDays(4),
                reference_ids           = references.ToArray(),
                replaced_by             = SR.I100 < 70 ? $"sr:match:{SR.I1000}" : null,
                status                  = SR.S10000P
            };

            return(msg);
        }
Example #13
0
 public static team GetTeam(int id = 0)
 {
     return(new team
     {
         id = id == 0 ? SR.Urn("team", 100000).ToString() : SR.Urn(id, "team").ToString(),
         name = "Team " + SR.I1000,
         abbreviation = SR.S1000,
         @virtual = true,
         virtualSpecified = true,
         country = SR.S1000
     });
 }
 public static seasonExtended GetSeasonExtended(int id = 0)
 {
     return(new seasonExtended
     {
         id = id == 0 ? SR.Urn("season", 10000).ToString() : SR.Urn(id, "season").ToString(),
         name = "Season " + SR.S1000,
         end_date = DateTime.Now.AddDays(SR.I100),
         start_date = DateTime.Now,
         tournament_id = SR.Urn("tournament", SR.I100).ToString(),
         year = DateTime.Now.Year.ToString()
     });
 }
Example #15
0
 public static teamExtended GetTeamExtended(int id = 0)
 {
     return(new teamExtended
     {
         id = id == 0 ? SR.Urn("competitor", 1000).ToString() : SR.Urn(id, "competitor").ToString(),
         name = "Team " + SR.I1000,
         abbreviation = SR.S1000,
         @virtual = true,
         virtualSpecified = true,
         country = SR.S1000
     });
 }
 public static fixture_change GetFixtureChange(IProducer producer, int eventId, long requestId)
 {
     return(new fixture_change
     {
         product = producer.Id,
         timestamp = GetTimestamp(),
         EventURN = SR.Urn(eventId, "match"),
         event_id = SR.Urn(eventId, "match").ToString(),
         request_id = requestId,
         request_idSpecified = requestId > 0
                               // missing
     });
 }
 public static rollback_bet_cancel GetRollbackBetCancel(IProducer producer, int eventId, long requestId)
 {
     return(new rollback_bet_cancel
     {
         product = producer.Id,
         timestamp = GetTimestamp(),
         EventURN = SR.Urn(eventId, "match"),
         event_id = SR.Urn(eventId, "match").ToString(),
         request_id = requestId,
         request_idSpecified = requestId > 0
                               // missing
     });
 }
 public static seasonCoverageInfo GetSeasonCoverageInfo(int id = 0)
 {
     return(new seasonCoverageInfo
     {
         season_id = id == 0 ? SR.Urn("season", 10000).ToString() : SR.Urn(id, "season").ToString(),
         max_coverage_level = $"{SR.S1000}",
         max_covered = SR.I1000,
         scheduled = SR.I1000,
         max_coveredSpecified = true,
         min_coverage_level = SR.S1000,
         played = SR.I1000
     });
 }
 public static bet_settlement GetBetSettlement(IProducer producer, int eventId, long requestId)
 {
     return(new bet_settlement
     {
         product = producer.Id,
         timestamp = GetTimestamp(),
         EventURN = SR.Urn(eventId, "match"),
         event_id = SR.Urn(eventId, "match").ToString(),
         request_id = requestId,
         request_idSpecified = requestId > 0
                               // missing
     });
 }
 public static odds_change GetOddsChange(IProducer producer, int sportId, int eventId, long requestId)
 {
     return(new odds_change()
     {
         product = producer.Id,
         timestamp = GetTimestamp(),
         SportId = sportId == 0 ? SR.Urn("sport") : SR.Urn(sportId, "sport"),
         EventURN = SR.Urn(eventId, "match"),
         event_id = SR.Urn(eventId, "match").ToString(),
         request_id = requestId,
         request_idSpecified = requestId > 0
     });
 }
 public static tournament GetTournament(int id = 0)
 {
     return(new tournament
     {
         id = id == 0 ? SR.Urn("tournament").ToString() : SR.Urn(id, "tournament").ToString(),
         name = "Tournament name " + SR.S100,
         scheduled = DateTime.Now,
         scheduledSpecified = true,
         scheduled_end = DateTime.Today,
         scheduled_endSpecified = true,
         category = GetCategory(),
         sport = GetSport()
     });
 }
 public static bet_cancel GetBetCancel(IProducer producer, int eventId, long requestId)
 {
     return(new bet_cancel
     {
         product = producer.Id,
         timestamp = GetTimestamp(),
         EventURN = SR.Urn(eventId, "match"),
         event_id = SR.Urn(eventId, "match").ToString(),
         request_id = requestId,
         request_idSpecified = requestId > 0,
         market = GetMarkets(SR.I100).ToArray()
                  // missing
     });
 }
Example #23
0
        public static venue GetVenue(int id = 0)
        {
            var msg = new venue
            {
                id                = id == 0 ? SR.Urn("venue").ToString() : SR.Urn(id, "venue").ToString(),
                name              = "Venue name " + SR.S1000,
                capacity          = SR.I1000,
                capacitySpecified = true,
                city_name         = "City " + SR.S1000,
                country_name      = "Country " + SR.S1000,
                map_coordinates   = "Coordinates" + SR.S1000,
            };

            return(msg);
        }
        public static ISport GetSport(int id = 0, int subItemCount = 0)
        {
            if (subItemCount < 1)
            {
                subItemCount = SR.I(20);
            }
            var c = new List <ICategory>();

            while (subItemCount > 0)
            {
                subItemCount--;
                c.Add(GetCategory());
            }
            return(new Sport(SR.Urn(id == 0 ? SR.I1000 : id, "sport"), GetNames(null), c));
        }
        public static fixture GetFixture(int id = 0, int subItemCount = 0)
        {
            if (subItemCount == 0)
            {
                subItemCount = SR.I(10);
            }

            var infos = new List <info>();

            for (var j = 0; j < subItemCount; j++)
            {
                var info = GetInfo();
                if (infos.Find(i => i.key == info.key) == null)
                {
                    infos.Add(info);
                }
            }

            var references = new List <referenceIdsReference_id>();

            for (var j = 0; j < subItemCount; j++)
            {
                var rc = GetReference();
                if (references.Find(i => i.name == rc.name) == null)
                {
                    references.Add(rc);
                }
            }

            var msg = new fixture
            {
                id                      = id == 0 ? SR.Urn("match", 10000).ToString() : SR.Urn(id, "match").ToString(),
                name                    = "Fixture " + SR.S1000,
                competitors             = GetTeamCompetitorList(subItemCount).ToArray(),
                coverage_info           = GetCoverageInfo(),
                delayed_info            = GetDelayedInfo(),
                extra_info              = infos.ToArray(),
                liveodds                = SR.S1000,
                next_live_time          = DateTime.Today.ToString(CultureInfo.InvariantCulture),
                start_time_tbdSpecified = true,
                start_time_tbd          = true,
                reference_ids           = references.ToArray(),
                replaced_by             = SR.I100 > 50 ? $"sr:match:{SR.I1000}" : string.Empty
            };

            return(msg);
        }
 public static playerExtended GetPlayerExtended(int id = 0)
 {
     return(new playerExtended
     {
         name = SR.S1000,
         id = id == 0 ? SR.Urn("player").ToString() : SR.Urn(id, "player").ToString(),
         weight = SR.I(150),
         heightSpecified = true,
         jersey_number = 60,
         jersey_numberSpecified = true,
         nationality = "nat " + SR.S1000,
         type = SR.S1000,
         height = SR.I(200),
         date_of_birth = DateTime.Today.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture),
         weightSpecified = true
     });
 }
Example #27
0
 public static simpleTeamProfileEndpoint GetSimpleTeamCompetitorProfileEndpoint(int id = 0, IDictionary <string, string> referenceIds = null)
 {
     return(new simpleTeamProfileEndpoint
     {
         competitor = new team
         {
             id = id == 0 ? SR.Urn("simpleteam", 100000).ToString() : SR.Urn(id, "simpleteam").ToString(),
             name = "my name",
             abbreviation = SR.S1000,
             @virtual = true,
             virtualSpecified = true,
             country = SR.S1000,
             reference_ids = referenceIds?.Select(s => new competitorReferenceIdsReference_id {
                 name = s.Key, value = s.Value
             }).ToArray()
         },
         generated_at = DateTime.Today,
         generated_atSpecified = true,
     });
 }
        public static matchSummaryEndpoint GetMatchSummaryEndpoint(int id = 0, int subItemCount = 2)
        {
            var sportEvent = new sportEvent
            {
                competitors            = GetTeamCompetitorList(subItemCount).ToArray(),
                id                     = id == 0 ? SR.Urn("match", 10000).ToString() : SR.Urn(id, "match").ToString(),
                liveodds               = "booked",
                scheduledSpecified     = true,
                scheduled              = new DateTime(2017, 2, 17),
                scheduled_endSpecified = true,
                scheduled_end          = new DateTime(2017, 2, 18)
            };

            return(new matchSummaryEndpoint
            {
                coverage_info = GetCoverageInfo(subItemCount),
                sport_event = sportEvent,
                sport_event_conditions = GetSportEventConditions()
            });
        }
        public static tournamentExtended GetTournamentExtended(int id = 0, int subItemCount = 0)
        {
            if (subItemCount == 0)
            {
                subItemCount = SR.I(20);
            }
            var msg = new tournamentExtended
            {
                id                     = id == 0 ? SR.Urn("tournament").ToString() : SR.Urn(id, "tournament").ToString(),
                name                   = "Tournament name " + SR.S(1000),
                scheduled              = DateTime.Now,
                scheduledSpecified     = true,
                scheduled_end          = DateTime.Today,
                scheduled_endSpecified = true,
                category               = GetCategory(),
                sport                  = GetSport(),
                tournament_length      = GetTournamentLength(),
                current_season         = GetCurrentSeason(),
                season_coverage_info   = GetSeasonCoverageInfo(),
                competitors            = GetTeamList(subItemCount).ToArray()
            };

            return(msg);
        }
 public static ICategory GetCategory(int id = 0)
 {
     return(new Category(SR.Urn(id == 0 ? SR.I1000 : id, "category"), GetNames(null), "SR", GetTournamentList(SR.I100)));
 }