private static Venue GetPurchaseVenue(CheckinsContainer checkinsContainer, CheckinParser.CheckinParser checkinParser) { Venue venue = new Venue(); venue.Name = checkinParser.GetPurchaseVenue(); return(GetVenue(venue, checkinsContainer)); }
private static Venue GetBreweryVenue(CheckinsContainer checkinsContainer, CheckinParser.CheckinParser checkinParser) { Venue venue = new Venue(); venue.Country = checkinParser.GetBreweryCountry(); venue.State = checkinParser.GetBreweryState(); venue.City = checkinParser.GetBreweryCity(); return(GetVenue(venue, checkinsContainer)); }
private static Brewery GetBrewery(CheckinParser.CheckinParser checkinParser) { Brewery brewery = new Brewery(); brewery.Id = checkinParser.GetBreweryID(); brewery.Name = checkinParser.GetBreweryName(); brewery.Url = checkinParser.GetBreweryURL(); return(brewery); }
private static Venue GetCheckinVenue(CheckinsContainer checkinsContainer, CheckinParser.CheckinParser checkinParser) { Venue venue = new Venue(); venue.Name = checkinParser.GetVenueName(); venue.Country = checkinParser.GetVenueCountry(); venue.State = checkinParser.GetVenueState(); venue.City = checkinParser.GetVenueCity(); venue.Latitude = checkinParser.GetVenueLat(); venue.Longitude = checkinParser.GetVenueLng(); return(GetVenue(venue, checkinsContainer)); }
private static Beer GetBeer(CheckinParser.CheckinParser checkinParser) { Beer beer = new Beer(); beer.Name = checkinParser.GetBeerName(); beer.Id = checkinParser.GetBeerID(); beer.GlobalRatingScore = checkinParser.GetGlobalRatingScore(); beer.GlobalWeightedRatingScore = checkinParser.GetGlobalWeightedRatingScore(); beer.Url = checkinParser.GetBeerURL(); beer.Type = checkinParser.GetBeerType(); beer.ABV = checkinParser.GetBeerABV(); beer.IBU = checkinParser.GetBeerIBU(); return(beer); }
private static Checkin GetCheckin(CheckinParser.CheckinParser checkinParser) { Checkin checkin = new Checkin(); checkin.Id = checkinParser.GetCheckinID(); checkin.Url = checkinParser.GetCheckinURL(); checkin.RatingScore = checkinParser.GetRatingScore(); checkin.CreatedDate = checkinParser.GetCreatedData(); checkin.Comment = checkinParser.GetComment(); checkin.UrlPhoto = checkinParser.GetPhotoURL(); checkin.FlavorPprofiles = checkinParser.GetFlavorProfiles(); checkin.ServingType = checkinParser.GetServingType(); checkin.TaggedFriends = checkinParser.GetTaggedFriends(); checkin.TotalToasts = checkinParser.GetTotalToasts(); checkin.TotalComments = checkinParser.GetTotalComments(); return(checkin); }
private static void FillCheckinsContainer(CheckinsContainer checkinsContainer, CheckinParser.CheckinParser checkinParser) { Checkin checkin = GetCheckin(checkinParser); checkin.VenuePurchase = GetPurchaseVenue(checkinsContainer, checkinParser); checkin.Venue = GetCheckinVenue(checkinsContainer, checkinParser); checkinsContainer.AddCheckin(checkin); Beer beer = checkinsContainer.GetBeer(checkinParser.GetBeerID()); if (beer == null) { beer = GetBeer(checkinParser); checkinsContainer.AddBeer(beer); Brewery brewery = checkinsContainer.GetBrewery(checkinParser.GetBreweryID()); if (brewery == null) { brewery = GetBrewery(checkinParser); brewery.Venue = GetBreweryVenue(checkinsContainer, checkinParser); checkinsContainer.AddBrewery(brewery); } beer.Brewery = brewery; } checkin.Beer = beer; }