public double getVenueQuality(int PlaceID) { var venue = places.Find(p => p.PLACEID == PlaceID); Swarm sw = new Swarm(clientID, clientSecret); var newVenue = sw.VenueDetails(venue.SWARMID); double rating = 1; if (newVenue.rating >= 0) { rating = newVenue.rating; } long checkinCount = newVenue.stats.checkinsCount; long userCount = newVenue.stats.usersCount; double PopulerUserCheckinPoint = getPopulerUserCheckinPoint(PlaceID); double VenueQuality = getDefaultVenueQuality(checkinCount, userCount); if (PopulerUserCheckinPoint > 0) { VenueQuality = VenueQuality * (1 + PopulerUserCheckinPoint); } VenueQuality *= rating; return(VenueQuality); }
public VenueCategories(EntityFramework.Checkin checkin) { var venue = places.Find(p => checkin.PLACEID == p.PLACEID); Swarm sw = new Swarm(clientID, clientSecret); var newVenue = sw.VenueDetails(venue.SWARMID); this.Venue = newVenue; Categories = new List <FourSquare.SharpSquare.Entities.Category>(); getCategories(); }