var app = app || {};
/**
* Hotel
* @name app.Hotel
* @class Hotel
* @memberof app
*/
app.Hotel = function() {
'use strict';
var self = this;
self.hotels = ko.observableArray();
self.yelp = {};
/**
* @typedef Hotels
* @type Object
* @property {string} name - Name of hotel
* @property {string} id - Yelp business ID
* @property {string} twitter - Twitter screen name
* @property {object} location - Hotel coordinates
* @property {number} location.lat - Latitude
* @property {number} location.lng - Longitude
* @property {number} diamonds - Diamond rating of hotel
*/
/**
* Retrieves the hotels json from Firebase server.
*
* @function app.Hotel.init
* @memberof app.Hotel
* @see {@link https://firebase.google.com/docs/web/setup}
* @see {@link https://firebase.google.com/docs/firestore/quickstart}
* @see {@link https://firebase.google.com/docs/firestore/query-data/get-data#get_all_documents_in_a_collection}
* @returns {Hotels} - Hotel data in json notation
*/
self.init = function() {
var hotelsRef;
var hotel = [];
var db;
var firebaseConfig = {
apiKey: "AIzaSyDAkU7fnDw-cOpyrXsRhMWCFeKbrNgvZGs",
authDomain: "zeta-time-122004.firebaseapp.com",
projectId: "zeta-time-122004",
};