public HttpResponseMessage GetCampaignGeoTargets(string campaignId) { try { CampaignControllerGet get = new CampaignControllerGet(); List <GeoTarget> retrievedLocations = get.GetCampaignGeoTargets(campaignId); return(ResponseHelper.CreateResponse(Request, HttpStatusCode.OK, retrievedLocations, PublicApiCommonErrorCode.SUCCESS)); } catch (Exception e) { return(ResponseHelper.CreateResponse(Request, HttpStatusCode.NotFound, e.Message + " " + e.InnerException + " " + e.StackTrace, PublicApiCommonErrorCode.NOT_FOUND)); } }
public HttpResponseMessage GetAdwordsCampaigns() { try { CampaignControllerGet get = new CampaignControllerGet(); List <AdwordsCampaign> retrievedCampaigns = get.GetCampaigns(); return(ResponseHelper.CreateResponse(Request, HttpStatusCode.OK, retrievedCampaigns, PublicApiCommonErrorCode.SUCCESS)); } catch (Exception e) { return(ResponseHelper.CreateResponse(Request, HttpStatusCode.NotFound, e.Message, PublicApiCommonErrorCode.NOT_FOUND)); } }