Skip to content

Commit

Permalink
Modified API Versioning System, Version 0.13.6
Browse files Browse the repository at this point in the history
  • Loading branch information
aneesh-neelam committed Feb 4, 2015
1 parent aa51c2a commit b31e950
Show file tree
Hide file tree
Showing 65 changed files with 740 additions and 24 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
716 changes: 716 additions & 0 deletions api/sample-data/courses.json

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ if (process.env.LOGENTRIES_TOKEN) {
});
}

var apiRoutes_012 = require(path.join(__dirname, 'routes', 'api-0.12'));
var apiRoutes_014 = require(path.join(__dirname, 'routes', 'api-0.14'));
var apiRoutes = require(path.join(__dirname, 'routes', 'api'));
var apiRoutesLegacy = require(path.join(__dirname, 'routes', 'api-legacy'));
var testRoutes = require(path.join(__dirname, 'routes', 'test'));
var txtwebRoutes = require(path.join(__dirname, 'routes', 'txtweb'));
var webRoutes = require(path.join(__dirname, 'routes', 'web'));
Expand Down Expand Up @@ -136,11 +136,11 @@ app.use(function (req, res, next) {

app.use('/', webRoutes);
app.use('/tests', testRoutes);
app.use('/api/0.14/vellore', apiRoutes_014);
app.use('/api/0.14/chennai', apiRoutes_014);
app.use('/api/v2/vellore', apiRoutes);
app.use('/api/v2/chennai', apiRoutes);
app.use('/api/txtweb', txtwebRoutes);
app.use('/api/vellore', apiRoutes_012);
app.use('/api/chennai', apiRoutes_012);
app.use('/api/vellore', apiRoutesLegacy);
app.use('/api/chennai', apiRoutesLegacy);

// catch 404 and forward to error handler
app.use(function (req, res, next) {
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "VITacademics",
"version": "0.13.5",
"version": "0.13.6",
"description": "VITacademics Backend and Web App",
"bugs": {
"url": "https://github.com/aneesh-neelam/VITacademics/issues",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "VITacademics",
"version": "0.13.5",
"version": "0.13.6",
"description": "VITacademics Backend and Web App",
"homepage": "http://vitacademics-dev.herokuapp.com/",
"bugs": {
Expand Down
16 changes: 8 additions & 8 deletions routes/api-0.12.js → routes/api-legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ var express = require('express');
var path = require('path');
var router = express.Router();

var loginManual = require(path.join(__dirname, '..', 'api-0.12', 'login', 'get'));
var loginAuto = require(path.join(__dirname, '..', 'api-0.12', 'login', 'auto'));
var loginSubmit = require(path.join(__dirname, '..', 'api-0.12', 'login', 'submit'));
var dataAggregate = require(path.join(__dirname, '..', 'api-0.12', 'scraper', 'aggregate'));
var dataGrades = require(path.join(__dirname, '..', 'api-0.12', 'scraper', 'grades'));
var friendsGenerate = require(path.join(__dirname, '..', 'api-0.12', 'friends', 'generate'));
var friendsShare = require(path.join(__dirname, '..', 'api-0.12', 'friends', 'share'));
var system = require(path.join(__dirname, '..', 'api-0.12', 'system'));
var loginManual = require(path.join(__dirname, '..', 'api-legacy', 'login', 'get'));
var loginAuto = require(path.join(__dirname, '..', 'api-legacy', 'login', 'auto'));
var loginSubmit = require(path.join(__dirname, '..', 'api-legacy', 'login', 'submit'));
var dataAggregate = require(path.join(__dirname, '..', 'api-legacy', 'scraper', 'aggregate'));
var dataGrades = require(path.join(__dirname, '..', 'api-legacy', 'scraper', 'grades'));
var friendsGenerate = require(path.join(__dirname, '..', 'api-legacy', 'friends', 'generate'));
var friendsShare = require(path.join(__dirname, '..', 'api-legacy', 'friends', 'share'));
var system = require(path.join(__dirname, '..', 'api-legacy', 'system'));


router.get('/system', function (req, res) {
Expand Down
10 changes: 5 additions & 5 deletions routes/api-0.14.js → routes/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ var express = require('express');
var path = require('path');
var router = express.Router();

var loginAuto = require(path.join(__dirname, '..', 'api-0.14', 'login', 'auto'));
var dataAggregate = require(path.join(__dirname, '..', 'api-0.14', 'scraper', 'aggregate'));
var dataGrades = require(path.join(__dirname, '..', 'api-0.14', 'scraper', 'grades'));
var friendsGenerate = require(path.join(__dirname, '..', 'api-0.14', 'friends', 'generate'));
var friendsShare = require(path.join(__dirname, '..', 'api-0.14', 'friends', 'share'));
var loginAuto = require(path.join(__dirname, '..', 'api', 'login', 'auto'));
var dataAggregate = require(path.join(__dirname, '..', 'api', 'scraper', 'aggregate'));
var dataGrades = require(path.join(__dirname, '..', 'api', 'scraper', 'grades'));
var friendsGenerate = require(path.join(__dirname, '..', 'api', 'friends', 'generate'));
var friendsShare = require(path.join(__dirname, '..', 'api', 'friends', 'share'));


router.get('/login', function (req, res) {
Expand Down
2 changes: 1 addition & 1 deletion routes/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var express = require('express');
var path = require('path');
var router = express.Router();

var system = require(path.join(__dirname, '..', 'api-0.14', 'system'));
var system = require(path.join(__dirname, '..', 'api', 'system'));


router.get('/system', function (req, res) {
Expand Down
2 changes: 1 addition & 1 deletion routes/txtweb.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var express = require('express');
var path = require('path');
var router = express.Router();

var api_txtweb = require(path.join(__dirname, '..', 'api-0.14', 'txtweb'));
var api_txtweb = require(path.join(__dirname, '..', 'api', 'txtweb'));

router.get('/', function (req, res) {
var googleAnalyticsToken = process.env.GOOGLE_ANALYTICS_TOKEN || 'UA-35429946-2';
Expand Down
2 changes: 1 addition & 1 deletion views/status.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<h4>Host Architecture: <%= arch %></h4>
</div>
<div class="large-12 columns">
<h4>Node Engine: <%= engine %></h4>
<h4>Node.js/io.js Engine: <%= engine %></h4>
</div>
</div>
<div class="row" style="text-align: center">
Expand Down

0 comments on commit b31e950

Please sign in to comment.