-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathstateWorkup.js
82 lines (68 loc) · 1.76 KB
/
stateWorkup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// This is a state contract -- redux store state should contain the following information.
// If it should be necessary to have more information stored on state, reflect those changes here.
var state = {
userProfileInformation: {
username: 'String',
name: 'String',
bio: 'String',
feed: ['String', 'String', 'String'], // A user's recently completed events.
photo: {
small: 'String',
medium: 'String',
large: 'String'
}
},
userUpcomingEvents: [],
profileUrl: '',
interests: [],
locationDetails: {
town: '',
state: '',
country: '',
lat: 'num',
lon: 'num'
},
userToken: ['String'],
userFriends: ['Object[miniProfile]', 'Object[miniProfile]'],
nearbyEvents: ['Object[event]', 'Object[event]'],
friendsEvents: ['Object[event]', 'Object[event]'],
watchedEvents: ['Object[event]', 'Object[event]'],
myEvents: ['Object[event]', 'Object[event]'],
// The following are more variable in nature; they reflect structural state
currentlyViewing: 'Object[event]'
}
/*
upcoming
profile url
interests
next 5 activites
location details
*/
// These are object contracts. They describe the shape of various useful objects. Should an object
// need a different shape, please reflect those changes here.
var event = {
id: 'Number[unique]',
location: {
name: 'String',
latitude: 'Number',
longitude: 'Number',
geom: 'Geometry'
},
time: {
created: 'Date',
startTime: 'Date',
endTime: 'Date'
},
eventType: 'String(e.g., "Basketball")',
minPlayers: 'Number or Null',
maxPlayers: 'Number or Null',
eventPhoto: 'String',
attendees: [],
creatorUserName: '',
eventName: '',
eventDescription: ''
}
var miniProfile = {
username: 'String'
// ajax for rest
}