From 133d91eb90763a245fe6bceb0f948a078e0761a3 Mon Sep 17 00:00:00 2001 From: Paul Pucciarelli Date: Fri, 1 Jul 2016 14:05:11 -0400 Subject: [PATCH] Improve docs. --- README.md | 3 + dist/specs/tevo-api-docs.yaml | 198 +++++++++++++++++++++++++ gulpfile.js | 16 +- src/main/html/css/tevo.css | 16 ++ src/main/html/images/pet_store_api.png | Bin 824 -> 0 bytes src/main/html/images/wordnik_api.png | Bin 980 -> 0 bytes src/main/html/index.html | 27 +++- src/main/less/tevo.less | 16 ++ 8 files changed, 259 insertions(+), 17 deletions(-) create mode 100644 src/main/html/css/tevo.css delete mode 100644 src/main/html/images/pet_store_api.png delete mode 100644 src/main/html/images/wordnik_api.png create mode 100644 src/main/less/tevo.less 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 f9f9cd4aeb35a108c4b2f1dddb59977d56c595d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 824 zcmV-81IPS{P)n=Rd;8mVwQNY4k4xJQ%YT}s;WA7;r!W@XgqjG_4og} z8w>{OB9REiMa8-B85td+y}bji^~2KA`Md4j-u{zw=H%Da@83%_8qEnl9k1WK;pWX- zb-lg)pQYAreK@>)*5Clqni{IZVYGG+NY67Bp-^bn;L{Nbh44I6CIK+n7p8#U?;fCA zYMFcy%UEjup4fgnli%NyzSe*@419QuU9lJ|T$?f9w?HIQ$RwEJGK7^!y7LhxIgVJp z9c!kB{0aydM1epU1NJ=h(}2X?Y{qn70yEN$dwm~favs=VbQ+T?!AvSl{P~PE zS&zsJbTQttne>kdM4$jBhLMFy@I1)3u-4cAzrY*l!o9eK^w%+jqY!oi(Ri8sMauvK zwnCP#%3hEH#FtNqq{iT(?=_JA_8XC>5Y8Y@!wmxKb|A87ZbpHA`+%v~0pt{5Nko1L zLKR^25YExt1lH7L1{t{|P z@n)yHyZf~3>LZ@#&CNw1rA#OlY^|)UJQKUrlKKO&x%wPhH}6&e0000dvj&>@zN_HP5m0E=+A=efDBI*IG*Gy%%< zz@yc%2XvGm)QQv5k^ZC6!9MwX8BCmQ{3eAX|GTwn#>(PS6PoB=$Pwn*?wz?%Tx2gwJ4apoy`A15D=>?%}hj`fV*p=6XW=YR(sp))`dxTnqHE&{&; zPdeO}SVkf*6_$c45W3Z}u|Z&a8{r!6ZNY62S>5{jAd)Hkjg@h%@c)c#BvZK2lmGw| z`Vh+%ECkF{t=)XpF3Z1bj=Pe9LpHbnQwjeTU#=4hB76#52DU2P2Ouj~^lRWwRd%eN zBw_z%FL0CUlk!`s2!`>QG&H__i_)I9=AuA=jn40z>;@hRsg)>J(58cx;l;h_zE*-R7Wbz6Ff#1Mss*)zTImU4`2@?a7y;v4 zH=lJ_PM5Rkw*AU`Cmq6aa>chASJ&Z3Ebj`y;w$MM!fa6`13VU7Kc|T5Xl#7ecj?mp zREV-nBJ6C)`?&}QDe_(KM>BrlN|iF{7-90j+J>N0^vY=LK;8!^9Y_m*aRPX{!S6ag zgRw(13pJvt`;{^S-vgUk?8pV_Vh4a4P7~}uHT)ENFMqd71QIOl8Q6+24TM_+158z) z54U-*C{M)S&!2Bfu&`?Ti6;WojY;%6+I;uCof+*T2iUMz!7Eg<{}#DJSx)C$5f zP(oSf>_s1t06cJ-U3?<9poS4O{Go>H>hro^ks;r3mm1Ehfq?m(_YE8UiVUgG%W9ZY z!@O^}KR%JW*0e=66rUYj5BP~=x%$^x92-m_ - 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 @@ -