diff --git a/README.md b/README.md index 8731ce27c66..63010d764cb 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,9 @@ 1. Run `npm run serve`. +## About + +1. All CSS / style differences are done via inline styles. Don't bother changing the less/css files. diff --git a/dist/specs/tevo-api-docs.yaml b/dist/specs/tevo-api-docs.yaml index 7fa8e750fc9..8ab248d124a 100644 --- a/dist/specs/tevo-api-docs.yaml +++ b/dist/specs/tevo-api-docs.yaml @@ -185,6 +185,126 @@ paths: Radius in miles for geolocated searches (default is 15 miles). default: 15 + ############################################################################## + # PERFORMERS + ############################################################################## + + # SHOW ####################################################################### + /performers/{performer_id}: + get: + tags: + - performers + description: > + Get a specific performer (team, artist, etc). + responses: + '200': + description: None + schema: + $ref: '#/definitions/Performer' + parameters: + - name: performer_id + in: path + required: true + type: number + format: int32 + description: + The ID of the specific Performer. + - name: include + in: query + required: false + type: boolean + description: + Show opponents (for performers in Sports category). + + # INDEX ###################################################################### + /performers: + get: + tags: + - performers + description: Obtain a list of Performers that match given conditions. + responses: + '200': + description: None. + schema: + $ref: '#/definitions/Performers' + parameters: + - name: venue_id + in: query + required: false + type: number + format: int32 + description: ID of the Performer’s home venue (most performers do not have one). + - name: category_id + in: query + required: false + type: number + format: int32 + description: Show only Performers in this category (does not include sub-categories). + - name: category_tree + in: query + required: false + type: boolean + description: >- + When `true` and used in conjunction with `category_id`, + performers in sub-categories of the `category_id` will be included. + - name: only_with_upcoming_events + in: query + required: false + type: boolean + description: Filter to only Performers who have upcoming events + - name: upcoming_events_end_date + in: query + required: false + type: string + format: iso8601 + description: >- + Filter to only Performers who have upcoming events earlier than the date (`only_with_upcoming_events` must be true). + - name: first_letter + in: query + required: false + type: string + description: Filter to Performers whose names begin with this letter. + - name: popularity_score + in: query + required: false + type: number + format: float + description: Filter to Performers whose popularity score meets the provided conditionals. + - name: disabled_at + in: query + required: false + type: string + format: iso8601 + description: Filter to Performers disabled before or after a certain date. + - name: deleted_at + in: query + required: false + type: string + format: iso8601 + description: Filter performers deleted before or after a certain date. + - name: updated_at + in: query + required: false + type: string + format: iso8601 + description: Filter performers updated before or after a certain date. + - name: name + in: query + required: false + type: string + description: >- + Exact name of the Performer. Use `performers/search` when searching for a Performer by name. + - name: order_by + in: query + required: false + type: string + description: >- + Pass in the parameter that you want to order by and the sorting order. + E.g. `performers.popularity_score%20DESC`. It is literal SQL and the space should be URL encoded to `%20`. + + ############################################################################## + # TICKETS + ############################################################################## /tickets: get: tags: @@ -192,6 +312,7 @@ paths: responses: '200': description: aaa + definitions: ############################################################################## @@ -260,6 +381,9 @@ definitions: per_page: type: integer description: Items per page of pagination. + total_entries: + type: integer + description: Total number of items. events: type: array description: The actual events. @@ -337,6 +461,80 @@ definitions: description: >- The time the event occurs. This time is NOT UTC. The time is in whatever timezone the venue is located in. Disregard the 'Z'. + + ############################################################################## + # Performer + ############################################################################## + Performer: + type: object + properties: + keywords: + type: string + description: A comma separated list of search keywords that yield this performer. + updated_at: + type: string + format: iso8601 + description: The time of last update for this performer. + opponents: + type: array + description: >- + An array of `Performers` this team will play in the near future. + Only provided when the `include` param is used. + items: + $ref: '#/definitions/Performer' + upcoming_events: + type: object + description: >- + An object containing the first (closest to now) and last (furthest in the future) event dates for events scheduled at this venue. + venue: + $ref: '#/definitions/Venue' + popularity_score: + type: number + format: float + description: The relative popularity of this performer. + category: + $ref: '#/definitions/Category' + url: + type: string + format: url + description: The API url to access this performer. + venues: + description: Deprecated. + name: + type: string + description: The performer name. + id: + type: number + format: int32 + description: The id of this performer. + meta: + type: object + description: >- + An object of performer metadata like imagery and background information. + This information is managed (provided) by each API user for the purposes of fleshing out their own content. + It is largely unused at the moment. + + ############################################################################## + # Performers + ############################################################################## + Performers: + type: object + properties: + current_page: + type: integer + description: Current page of pagination. + per_page: + type: integer + description: Items per page of pagination. + total_entries: + type: integer + description: Total number of items. + performers: + type: array + description: The actual performers. + items: + $ref: '#/definitions/Performer' + Performance: type: object Venue: diff --git a/gulpfile.js b/gulpfile.js index 39d98b8a94f..83dc2a6a6fa 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -35,19 +35,10 @@ gulp.task('clean', function() { .on('error', log); }); -/** - * JShint all *.js files - */ -gulp.task('lint', function () { - return gulp.src('./src/main/javascript/**/*.js') - .pipe(jshint()) - .pipe(jshint.reporter('jshint-stylish')); -}); - /** * Build a distribution */ -gulp.task('dist', ['clean', 'lint'], _dist); +gulp.task('dist', ['clean'], _dist); function _dist() { return es.merge( gulp.src([ @@ -76,7 +67,7 @@ function _dist() { .pipe(gulp.dest('./dist')) .pipe(connect.reload()); } -gulp.task('dev-dist', ['lint', 'dev-copy'], _dist); +gulp.task('dev-dist', ['dev-copy'], _dist); /** * Processes less files into CSS files @@ -88,7 +79,8 @@ function _less() { './src/main/less/screen.less', './src/main/less/print.less', './src/main/less/reset.less', - './src/main/less/style.less' + './src/main/less/style.less', + './src/main/less/tevo.less' ]) .pipe(less()) .on('error', function(err){ log(err); this.emit('end');}) diff --git a/src/main/html/css/tevo.css b/src/main/html/css/tevo.css new file mode 100644 index 00000000000..cf67b59f4af --- /dev/null +++ b/src/main/html/css/tevo.css @@ -0,0 +1,16 @@ +input[type=text] { + padding: 5px 10px; +} +input[type=submit] { + cursor: pointer; + background: #0f6ab4; + padding: 10px 30px !important; + border-radius: 5px; + color: #fff; + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.67); + font-size: 1.5em; + border: 1px solid rgba(0, 0, 0, 0.67); +} +input[type=submit]:hover { + background: #519ddb; +} diff --git a/src/main/html/images/pet_store_api.png b/src/main/html/images/pet_store_api.png deleted file mode 100644 index f9f9cd4aeb3..00000000000 Binary files a/src/main/html/images/pet_store_api.png and /dev/null differ diff --git a/src/main/html/images/wordnik_api.png b/src/main/html/images/wordnik_api.png deleted file mode 100644 index dca4f1455ac..00000000000 Binary files a/src/main/html/images/wordnik_api.png and /dev/null differ diff --git a/src/main/html/index.html b/src/main/html/index.html index 37b0ae94f40..946c91e6726 100644 --- a/src/main/html/index.html +++ b/src/main/html/index.html @@ -2,12 +2,13 @@ - Swagger UI + Ticket Evolution API - The best ticket API for sports concerts & theater. + @@ -38,7 +39,7 @@ if (url && url.length > 1) { url = decodeURIComponent(url[1]); } else { - url = "/specs/tevo-api-docs.yaml"; + url = "specs/tevo-api-docs.yaml"; } hljs.configure({ @@ -76,11 +77,14 @@ jsonEditor: false, defaultModelRendering: 'schema', showRequestHeaders: false, - operationsSorter: 'alpha' + operationsSorter: 'alpha', + jsonEditor: true }); window.swaggerUi.load(); + window.swaggerUi.api.clientAuthorizations.add('key', new SwaggerClient.ApiKeyAuthorization('X-Token', '58fb1ea1998319e3c0e8d9195b00f2ee', 'header')); + function log() { if ('console' in window) { console.log.apply(console, arguments); @@ -103,15 +107,28 @@ -