meetup-web-mocks
Version:
Meetup Web Mocks
159 lines (148 loc) • 3.84 kB
JavaScript
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var MOCK_MEMBER = exports.MOCK_MEMBER = {
name: 'mocky mcmockerson',
id: 1243,
photo: {
photo_link: 'http://placekitten.com/g/400/400'
}
};
var MOCK_SELF = exports.MOCK_SELF = _extends({}, MOCK_MEMBER, { lang: 'en_US' });
var MOCK_SELF_FR = exports.MOCK_SELF_FR = _extends({}, MOCK_MEMBER, { lang: 'fr_FR' });
var MOCK_DUOTONES = exports.MOCK_DUOTONES = [['a', 'b']];
var MOCK_DUOTONE_URLS = exports.MOCK_DUOTONE_URLS = {
dtaxb: 'http://a.b'
};
var MOCK_GROUP = exports.MOCK_GROUP = {
id: 1234,
urlname: 'fake-hq-faff',
key_photo: {
id: 1234,
photo_link: 'http://placekitten.com/400/300',
thumb_link: 'http://placekitten.com/400/300'
},
group_photo: {
id: 1234,
photo_link: 'http://placekitten.com/400/300',
thumb_link: 'http://placekitten.com/400/300'
},
name: 'fake HQ FAFF',
who: 'Faffers',
members: 999,
photo_gradient: {
light_color: MOCK_DUOTONES[0][1],
dark_color: MOCK_DUOTONES[0][0]
},
event_sample: [{
id: 1234,
name: 'Sample event',
time: new Date().getTime(),
yes_rsvp_count: 50
}]
};
var MOCK_CHAPTER_MEMBER = exports.MOCK_CHAPTER_MEMBER = {
id: 82159492,
name: 'Grayson Cheese',
status: 'active',
joined: 1361806241000,
city: 'new york',
country: 'us',
lat: 40,
lon: -72,
photo: {
photo_link: 'http://placekitten.com/g/400/400'
},
group_profile: {
status: 'active',
visited: 1396285003000,
created: 1395768492000,
updated: 1478880527000,
group: MOCK_GROUP,
intro: 'cheese is the best!'
}
};
var MOCK_CHAPTER_MEMBER_2 = exports.MOCK_CHAPTER_MEMBER_2 = {
id: 234322,
name: 'Chesterton Gordidason',
status: 'active',
joined: 1361806241020,
city: 'new york',
country: 'us',
lat: 40,
lon: -72,
photo: {
photo_link: 'http://placekitten.com/g/400/400'
},
group_profile: {
status: 'active',
visited: 1396285003000,
created: 1395768492000,
updated: 1478880527000,
group: MOCK_GROUP,
intro: 'cheese is the best!'
}
};
var MOCK_CHAPTER_MEMBER_3 = exports.MOCK_CHAPTER_MEMBER_3 = {
id: 23222,
name: 'Simon Cheddar',
status: 'active',
joined: 1361806541020,
city: 'new york',
country: 'us',
lat: 40,
lon: -72,
photo: {
photo_link: 'http://placekitten.com/g/400/400'
},
group_profile: {
status: 'active',
visited: 1396285003000,
created: 1395768492000,
updated: 1478880527000,
group: MOCK_GROUP,
intro: 'cheese is the best!'
}
};
var oneMonthAgo = new Date();
oneMonthAgo.setMonth(oneMonthAgo.getMonth() - 1);
var oneMonthFuture = new Date();
oneMonthFuture.setMonth(oneMonthFuture.getMonth() + 1);
var MOCK_EVENT = exports.MOCK_EVENT = {
id: 123456,
comment_count: 5,
created: oneMonthAgo.getTime(),
description: 'The coolest event in the world during which we will run and dance and sing\n\t<script>alert("bad time")</script>, \uD83D\uDE0A, <blink>what what<blink> this is getting\n\tlonger than it needs to be why am I still typing omg',
duration: 3600000,
name: 'So much fun',
rsvp_sample: [{
created: 1462833255609,
id: 1234,
member: MOCK_MEMBER,
updated: 1462833255610
}, {
created: 1462833255609,
id: 2345,
member: _extends({}, MOCK_MEMBER, { id: 8912894 }),
updated: 1462833255610
}, {
created: 1462833255609,
id: 3456,
member: _extends({}, MOCK_MEMBER, { id: 899828 }),
updated: 1462833255610
}],
rsvpable: true,
group: MOCK_GROUP,
self: {
actions: ['rsvp'],
pay_status: 'none',
rsvp: {}
},
status: 'upcoming',
time: oneMonthFuture.getTime(),
utc_offset: 0,
visibility: 'public',
yes_rsvp_count: 23
};