public GalleryViewModel() { this._client = new MobageClient(); this._client.LoadCookie(); this._characterClient = new CharacterClient { Client = this._client }; //this._characterClient.Update(); this._cardsCache = new SimpleCache <Character, Card[]>(); }
public ComicVineClient(string apiKey, string?userAgent = null) { HttpMessenger = new HttpMessenger(userAgent); HttpConnection = new HttpConnection(HttpMessenger, apiKey); ApiConnection = new ApiConnection(HttpConnection); Character = new CharacterClient(ApiConnection); Series = new SeriesClient(ApiConnection); Issue = new IssueClient(ApiConnection); Volume = new VolumeClient(ApiConnection); Search = new SearchClient(ApiConnection); }
public IEnumerable <CharacterSheet> GetCharacterSheets(IEnumerable <string> characterNames) { List <CharacterSheet> characterSheets = new List <CharacterSheet>(); using (var characterClient = new CharacterClient(Credentials.ApiKey, Credentials.SecretKey)) { characterNames.ToList().ForEach(name => { var apiResponse = characterClient.GetCharacterSheet(name, TauriApiWrapper.Enums.Realm.Crystalsong); if (apiResponse.IsSuccess) { characterSheets.Add(apiResponse.Response); } }); } return(characterSheets); }
public void TestInitialize() { // Loggers var loggerStarship = Mock.Of <ILogger <StarshipClient> >(); var loggerCharacter = Mock.Of <ILogger <CharacterClient> >(); var loggerFilm = Mock.Of <ILogger <FilmClient> >(); var loggerPlanet = Mock.Of <ILogger <PlanetClient> >(); // Settings var starWarsSettings = Options.Create(new StarWarSettings() { Url = configuration["StarWarSettings:Url"] }); // Clients var httpClient = new HttpClient(); var characterClient = new CharacterClient(httpClient, starWarsSettings, loggerCharacter); var filmClient = new FilmClient(httpClient, starWarsSettings, loggerFilm); var planetClient = new PlanetClient(httpClient, starWarsSettings, loggerPlanet); var starshipClient = new StarshipClient(httpClient, starWarsSettings, loggerStarship); _characterService = new CharacterService(characterClient, planetClient, filmClient); _starshipService = new StarshipService(starshipClient); }
public ServersController() { _client = new CharacterClient(); _context = new LetsraidContext(); }
public CharacterController() { _characterClient = new CharacterClient(); }