This repository has been archived by the owner on Apr 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathroutes.js
111 lines (93 loc) · 6.33 KB
/
routes.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
module.exports = function (app, router) {
var defController = require('./app/controllers/default');
router.get('/start', defController.init);
var housesController = require(__appbase + 'controllers/house');
router.post('/houses/find', housesController.get);
router.get('/houses', housesController.getAll);
router.get('/houses/:houseName', housesController.getByName);
router.get('/houses/byId/:houseId', housesController.getById);
var episodeController = require(__appbase + 'controllers/episode');
router.post('/episodes/find', episodeController.get);
router.get('/episodes', episodeController.getAll);
router.get('/episodes/:name', episodeController.getByName);
router.get('/episodes/byId/:id', episodeController.getById);
router.get('/episodes/byCharacter/:name', episodeController.getEpisodesByCharacter);
var eventsController = require(__appbase + 'controllers/event');
router.post('/events/find', eventsController.get);
router.get('/events', eventsController.getAll);
router.get('/events/:name', eventsController.getByName);
router.get('/events/byId/:id', eventsController.getById);
router.get('/episodes/byCharacter/:id', episodeController.getEpisodesByCharacter);
var ageController = require(__appbase + 'controllers/age');
router.post('/ages/find', ageController.get);
router.get('/ages', ageController.getAll);
router.get('/ages/:name', ageController.getByName);
router.get('/ages/byId/:id', ageController.getById);
var characterLocations = require(__appbase + 'controllers/characterLocations');
router.get('/characters/locations', characterLocations.getAll);
router.get('/characters/locations/:name', characterLocations.getByName);
router.get('/characters/locations/byLocation/:location', characterLocations.getByLocation);
router.get('/characters/locations/bySlug/:slug', characterLocations.getBySlug);
var characterPaths = require(__appbase + 'controllers/characterPaths');
router.get('/characters/paths', characterPaths.getAll);
router.get('/characters/paths/:name', characterPaths.getByName);
var characterNews = require(__appbase + 'controllers/characterNews');
router.post('/characters/news', characterNewsController.add);
router.get('characters/news', characterNewsController.getAll);
router.get('characters/news/:count', characterNewsController.getByCount);
router.get('characters/news/byName/:name', characterNewsController.getByName);
router.get('characters/news/bySlug/:slug', characterNewsController.getBySlug);
router.get('characters/news/byId/:id', characterNewsController.getById);
var characterController = require(__appbase + 'controllers/character');
router.post('/characters/find', characterController.get);
router.get('/characters', characterController.getAll);
router.get('/characters/:name', characterController.getByName);
router.get('/characters/bySlug/:slug', characterController.getBySlug);
router.get('/characters/byId/:id', characterController.getById);
// This data is not scraped by Project A but inserted via API by Project B!
// Percent Likelihood of Death (PLOD) will be inserted by Project B. DO NOT remove modifying routes!
var characterPlodController = require(__appbase + 'controllers/characterPlod');
router.post('/plod', characterPlodController.add);
router.post('/plod/find', characterPlodController.get);
router.get('/plod', characterPlodController.getAll);
router.get('/plod/byCount/:count', characterPlodController.getByPLOD);
router.get('/plod/bySlug/:slug', characterPlodController.getBySlug);
router.get('/plod/byName/:name', characterPlodController.getByName);
router.get('/plod/byId/:id', characterPlodController.getById);
router.get('/plod/byAlgorithm/:algorithm', characterPlodController.getByAlgorithm);
router.put('/plod/edit/:id', characterPlodController.edit);
router.delete('/plod/remove/:id', characterPlodController.remove);
// This data is not scraped by Project A but inserted via API by Project D!
// Twitter Sentiment will be inserted by Project D. DO NOT remove modifying routes!
var characterSentimentController = require(__appbase + 'controllers/characterSentiment');
router.post('/sentiment', characterSentimentController.add);
router.post('/sentiment/find', characterSentimentController.get);
router.get('/sentiment', characterSentimentController.getAll);
router.get('/sentiment/byDate/:date', characterSentimentController.getByDate);
router.get('/sentiment/byTimeRange', characterSentimentController.getByTimeRange);
router.get('/sentiment/byId/:id', characterSentimentController.getById);
router.get('/sentiment/byDescription/:description', characterSentimentController.getByDescription);
router.put('/sentiment/edit/:id', characterSentimentController.edit);
router.delete('/sentiment/remove/:id', characterSentimentController.remove);
var geographyController = require(__appbase + 'controllers/geography');
router.post('/continents/find', geographyController.getContinents);
router.get('/continents', geographyController.getAllContinents);
router.get('/continents/:name', geographyController.getContinentByName);
router.get('/continents/byId/:id', geographyController.getContinentById);
//router.post('/cultures', geographyController.addCulture);
router.get('/cultures', geographyController.getAllCultures);
router.get('/cultures/:name', geographyController.getCultureByName);
router.get('/cultures/byId/:id', geographyController.getCultureById);
router.post('/regions/find', geographyController.getRegions);
router.get('/regions', geographyController.getAllRegions);
router.get('/regions/:name', geographyController.getRegionByName);
router.get('/regions/byId/:id', geographyController.getRegionById);
router.post('/cities/find', geographyController.getCities);
router.get('/cities', geographyController.getAllCities);
router.get('/cities/:name', geographyController.getCityByName);
router.get('/cities/byId/:id', geographyController.getCityById);
var statsController = require(__appbase + 'controllers/statistics');
router.get('/stats/', statsController.getStats);
var twitterController = require('./app/controllers/twitter');
router.get('/twitter/search/:byKeywords/:tweetCount', twitterController.searchTwitter);
};