예제 #1
0
 public Service(IAdService service, WebMotorsAPI api)
 {
     this._adService = service;
     this._api       = api;
     this._makes     = new List <WebMotorsOptions>();
     this._models    = new List <WebMotorsOptions>();
     this._versions  = new List <WebMotorsOptions>();
 }
예제 #2
0
        public async Task <Announce> PostAnnounce(AnnounceRequest request)
        {
            if (request == null)
            {
                throw new BadRequestException("O dados de requisição da criação do anúncio não foram informados.");
            }

            var entity = await WebMotorsAPI.GetAnnounceByAPI(request);

            return(await AnnounceRepository.InsertAnnounceAsync(entity));
        }
 public async Task <IList <CarModel> > GetAllModels(int makeId)
 {
     return(await WebMotorsAPI.GetCarModelsByMakeId(makeId));
 }
 public async Task <IList <CarVersion> > GetAllVersions(int modelId)
 {
     return(await WebMotorsAPI.GetCarVersionByModelId(modelId));
 }
 private async Task <IList <CarMake> > GetAllMakes()
 {
     return(await WebMotorsAPI.GetCarMakes());
 }