//private List<Participant> _participants public Smashgg(BracketSettings settings) : base(settings) { ApiName = "Smash GG"; _baseUrl = "https://api.smash.gg/"; if (settings is SmashGgSettings) { _settings = settings as SmashGgSettings; RetrieveTournamentId(); } }
private void InitializeBracketApiList() { Type[] apis = Assembly.GetExecutingAssembly().GetTypes().Where((t) => t.IsSubclassOf(typeof(BracketApi))).ToArray(); ApiList = new ObservableCollection <string>(); foreach (var type in apis) { BracketSettings s = new BracketSettings(); BracketApi a = Activator.CreateInstance(type, s) as BracketApi; ApiList.Add(a.ApiName); if (type == Configuration.Instance.Stream?.GetType()) { SelectedApi = ApiList.Count - 1; } } }
public SmashggGraphQL(BracketSettings settings) : base(settings) { ApiName = "smash.gg (GraphQL)"; _baseUrl = "https://api.smash.gg/gql/alpha"; if (settings is SmashGgGQLSettings s) { _settings = s; } else { _settings = new SmashGgGQLSettings(); } _headers.Add("Authorization", "Bearer " + _settings.ApiKey); }