├── .DS_Store ├── .browserslistrc ├── .env ├── .eslintrc.js ├── .gitignore ├── .postcssrc.js ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── babel.config.js ├── cypress.json ├── package-lock.json ├── package.json ├── public ├── .DS_Store ├── _redirects ├── cat-favicon.ico ├── example-pages │ ├── .DS_Store │ ├── basic-search.html │ ├── breed-selection.html │ ├── categories.html │ ├── dogs │ │ ├── basic-search.html │ │ ├── breed-selection.html │ │ ├── categories.html │ │ ├── favourites.html │ │ ├── filter-by-type.html │ │ ├── image-analysis.html │ │ ├── image-upload.html │ │ ├── pagination.html │ │ └── voting.html │ ├── favourites.html │ ├── filter-by-type.html │ ├── image-analysis.html │ ├── image-upload.html │ ├── pagination.html │ └── voting.html ├── favicon.ico ├── index.html ├── l-favicon.ico └── meta-tag-image.png ├── src ├── .DS_Store ├── App.vue ├── assets │ ├── .DS_Store │ ├── favicon.ico │ └── images │ │ ├── angular.png │ │ ├── jquery.png │ │ ├── node.png │ │ ├── react.png │ │ └── vue.png ├── components │ ├── CodeExamples.vue │ ├── ExBtn.js │ ├── Footer.vue │ ├── NavBar.vue │ ├── SectionTabs.vue │ ├── Sections │ │ ├── Breeds.vue │ │ ├── Favourites.vue │ │ ├── ImageLoader.vue │ │ ├── Pricing.vue │ │ ├── Search.vue │ │ ├── SubID.vue │ │ ├── Upload.vue │ │ └── Vote.vue │ └── SignupForm.vue ├── main.js ├── plugins │ └── vuetify.js ├── router.js ├── store │ ├── index.js │ └── modules │ │ └── TheCatAPI.js └── views │ ├── Docs.vue │ ├── Home.vue │ ├── PrivacyPolicy.vue │ ├── ShowCase.vue │ ├── Signup.vue │ ├── TermsConditions.vue │ └── Thanks.vue ├── tests └── e2e │ ├── .eslintrc.js │ ├── plugins │ └── index.js │ ├── specs │ └── test.js │ └── support │ ├── commands.js │ └── index.js └── thedogapi.env /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdenForshaw/theCatAPI-website/21f2559fbd7e3bfc45d2e8f94509b272907ade0e/.DS_Store -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not ie <= 10 -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | VUE_APP_POSTMAN_URL = https://documenter.getpostman.com/view/5578104/RWgqUxxhi 2 | VUE_APP_DOCS_URL = https://developers.thecatapi.com/ 3 | VUE_APP_API_KEY = DEMO-API-KEY 4 | VUE_APP_API_ENDPOINT = https://api.thecatapi.com 5 | VUE_APP_ID = CAT 6 | VUE_APP_NAME = TheCatAPI 7 | VUE_APP_PRIMARY_COLOUR=rgb(210, 69, 21); 8 | VUE_APP_TITLE = The Cat API 9 | VUE_APP_STRAPLINE = Cats as a Service. 10 | VUE_APP_SUB_STRAPLINE = Because everyday is a Caturday. 11 | VUE_APP_INFOLINE = has delivered Billions of requests, to over 80K developers and counting. 12 | VUE_APP_META_IMAGE_URL = https://thecatapi.com/meta-tag-image.png 13 | VUE_APP_LOGO_URL = https://cdn2.thecatapi.com/logos/thecatapi_256xW.png 14 | VUE_APP_URL = https://TheCatAPI.com 15 | VUE_APP_DESCRIPTION = A public service API all about Cats, free to use when making your fancy new App, Website or Service. 16 | VUE_APP_FORUM_URL = https://forum.thatapiguy.com/ 17 | VUE_APP_ABOUT_URL=https://thatapicompany.com 18 | VUE_APP_ROADMAP_URL=https://trello.com/b/ddUlP8lJ/that-api-guy-public 19 | VUE_APP_PRICING_URL=/#pricing 20 | VUE_APP_GTM_ID = GTM-PBQM99G 21 | VUE_APP_GA_ID = UA-119529549-2 22 | VUE_APP_PREMIUM_TEST_URL=https://portal.thatapicompany.com/catalog/prd_fe5nboe34bvquylk 23 | VUE_APP_MORE_APIS_URL=https://portal.thatapicompany.com 24 | VUE_APP_COMMERCIAL_SIGNUP_URL=https://portal.thatapicompany.com/catalog/prd_fe5nboe34bvquylk?utm_source=internal&utm_medium=website&utm_campaign=x-p 25 | #https://docs.google.com/forms/d/e/1FAIpQLSfdn4aHXcq1_7Md45cWEn5JzHoKhPBAMhqEv5X1Zp7dNtsH0Q/viewform?usp=sf_link -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | 'extends': [ 7 | 'plugin:vue/essential', 8 | 'eslint:recommended' 9 | ], 10 | rules: { 11 | 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 12 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 13 | }, 14 | parserOptions: { 15 | parser: 'babel-eslint' 16 | } 17 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | #.env 59 | 60 | # next.js build output 61 | .next 62 | 63 | dist/ -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | autoprefixer: {} 4 | } 5 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "workbench.colorCustomizations": { 3 | "activityBar.background": "#331877", 4 | "titleBar.activeBackground": "#4721A6", 5 | "titleBar.activeForeground": "#FCFCFE" 6 | } 7 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Aden Forshaw 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

TheCatAPI.com Vue.js Website Codebase

2 | 3 | This App is a demonstration of how to use some of the features of theCatAPI. 4 | - Making requests for images of different types 5 | - Voting images up/down 6 | - Favouriting images 7 | - Uploading your own images 8 | - Using a sub_id to tag actions with a custom value. 9 | 10 | #### What can i do with it? 11 | 12 | You can run clone this site and see how it works, extend it and add more functionality. For instance you could: 13 | - Make a full app by adding a login form using OAuth, and use the users id as the sub_id. 14 | - Wrap it in Nativescript-Vue and make a mobile phone app 15 | - Make some improvements and create a pull request to improve the main website.. 16 | 17 | 18 | #### How do i install it? 19 | 20 | - Sign up to [theCatAPI.com](https://theCatAPI.com) for a free API Key 21 | - clone this repo 22 | - change the 'DEMO-API-KEY' in the ./store/modules/TheCatAPI.js' file for the one from the welcome email 23 | - run 'npm install' in the projects root 24 | - run 'npm run serve' 25 | - open 'http://localhost:8080' in your browser 26 | - hack & improve the codebase 27 | 28 | ## Stay In Touch 29 | 30 | Any issues, questions or suggestions: 31 | 32 | - [Twitter](https://twitter.com/adenforshaw) 33 | - [Blog](https://thatapiguy.com/) 34 | - [Forum](https://forum.thatapiguy.com/) 35 | 36 | All the best, Aden Forshaw 37 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "presets": [ 3 | [ 4 | "@vue/app", 5 | { 6 | "useBuiltIns": "entry" 7 | } 8 | ] 9 | ] 10 | } -------------------------------------------------------------------------------- /cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "pluginsFile": "tests/e2e/plugins/index.js" 3 | } 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "thecatapi-website", 3 | "version": "0.1.2", 4 | "private": true, 5 | "scripts": { 6 | "start": "vue-cli-service serve", 7 | "serve": "vue-cli-service serve", 8 | "build": "vue-cli-service build", 9 | "lint": "vue-cli-service lint", 10 | "test:e2e": "vue-cli-service test:e2e" 11 | }, 12 | "dependencies": { 13 | "@babel/polyfill": "^7.2.5", 14 | "axios": "^0.21.1", 15 | "vue": "^2.5.21", 16 | "vue-analytics": "^5.16.1", 17 | "vue-cli-plugin-s3-deploy": "^3.0.0", 18 | "vue-gtag": "^1.11.0", 19 | "vue-gtm": "^2.0.0", 20 | "vue-router": "^3.5.1", 21 | "vuetify": "^1.4.1", 22 | "vuex": "^3.6.2" 23 | }, 24 | "devDependencies": { 25 | "@cypress/webpack-preprocessor": "^3.0.0", 26 | "@mdi/font": "^2.8.94", 27 | "@vue/cli-plugin-babel": "^3.12.1", 28 | "@vue/cli-plugin-e2e-cypress": "^3.12.1", 29 | "@vue/cli-plugin-eslint": "^3.12.1", 30 | "@vue/cli-service": "^3.12.1", 31 | "stylus": "^0.54.8", 32 | "stylus-loader": "^3.0.1", 33 | "vue-cli-plugin-vuetify": "^0.3.0", 34 | "vue-template-compiler": "^2.6.12", 35 | "vuetify-loader": "^1.7.2" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /public/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdenForshaw/theCatAPI-website/21f2559fbd7e3bfc45d2e8f94509b272907ade0e/public/.DS_Store -------------------------------------------------------------------------------- /public/_redirects: -------------------------------------------------------------------------------- 1 | /* /index.html 200 -------------------------------------------------------------------------------- /public/cat-favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdenForshaw/theCatAPI-website/21f2559fbd7e3bfc45d2e8f94509b272907ade0e/public/cat-favicon.ico -------------------------------------------------------------------------------- /public/example-pages/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdenForshaw/theCatAPI-website/21f2559fbd7e3bfc45d2e8f94509b272907ade0e/public/example-pages/.DS_Store -------------------------------------------------------------------------------- /public/example-pages/basic-search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | Another   refresh 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 | 39 | 70 | 71 | -------------------------------------------------------------------------------- /public/example-pages/categories.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 28 | 29 | 30 | 31 | 32 | 33 | 38 | 41 | 46 | 47 | 48 | 49 | 50 |
51 | 52 | 53 | 54 | 55 | 56 |
Page
57 |
58 | 63 |
64 |
65 | 66 | 67 | 71 | 72 | 73 | 74 | 75 | refresh   More 76 | 77 | 78 | 79 | 80 |
81 |
82 |
83 |
84 |
85 | 86 | 180 | 181 | -------------------------------------------------------------------------------- /public/example-pages/dogs/basic-search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | Another   refresh 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
36 | 37 | 67 | 68 | -------------------------------------------------------------------------------- /public/example-pages/dogs/breed-selection.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 41 | 42 | 43 | 44 | 45 | 46 |
47 | 48 | 49 | 50 | 51 | {{selected_breed.origin}} 52 |
53 |
54 |

{{selected_breed.name}}

55 |
{{selected_breed.description}}
56 |
---
57 |
{{selected_breed.temperament}}
58 |
59 |
60 | 61 | 62 | Wikipedia 63 | 64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | 72 | 73 | 139 | 140 | -------------------------------------------------------------------------------- /public/example-pages/dogs/categories.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 36 | 39 | 44 | 45 | 46 | 47 | 48 |
49 | 50 | 51 | 52 | 53 | 54 |
Page
55 |
56 | 61 |
62 |
63 | 64 | 65 | 69 | 70 | 71 | 72 | 73 | refresh   More 74 | 75 | 76 | 77 | 78 |
79 |
80 |
81 |
82 |
83 | 84 | 177 | 178 | -------------------------------------------------------------------------------- /public/example-pages/dogs/favourites.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | refresh   More Kitties 21 | 22 | 23 | 24 | 25 | 26 | 27 | 32 | 33 | 34 | 35 | 41 | 42 | 43 | 44 | Favourite 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 56 | {{error_message}} 57 | 58 | 59 | 60 |

Demo Account Favourites

61 |
62 | 63 | 64 | 69 | 70 | 71 | 72 | 77 | 78 | 79 |
80 |
Fav ID: {{ n.id }}
81 |
Image ID: {{n.image.id}}
82 |
sub_id: {{ n.sub_id }}
83 |
Created: {{ new Date(n.created_at).toLocaleString() }}
84 |
85 |
86 | 87 | 88 | Delete 89 | 90 |
91 |
92 |
93 |
94 |
95 |
96 | 97 | 98 | 99 | 100 | 101 |
Page
102 |
103 | 107 |
108 |
109 | 110 |
111 |
112 |
113 |
114 |
115 | 116 | 217 | 218 | -------------------------------------------------------------------------------- /public/example-pages/dogs/filter-by-type.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | Another   refresh 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
44 | 45 | 82 | 83 | -------------------------------------------------------------------------------- /public/example-pages/dogs/image-analysis.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | > 25 | 26 | 27 | 28 | Another   refresh 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 51 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |
64 | 65 | 133 | 134 | -------------------------------------------------------------------------------- /public/example-pages/dogs/image-upload.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 29 | 30 | 31 | Choose New Image   upload 32 | 33 | 34 | Upload   upload 35 | 36 |
Uploading
37 |
38 |
39 | 40 | 41 | 42 | 43 | 47 | {{error_message}} 48 | 49 | 50 | 51 | 52 | 59 | 63 | 64 | 65 | 66 | 67 | 68 | 69 |
70 |
71 |
72 | 73 | 156 | 157 | -------------------------------------------------------------------------------- /public/example-pages/dogs/pagination.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 34 | 37 | 42 | 43 | 44 | 45 | 46 |
47 | 48 | 49 | 50 | 51 | 52 |
Page
53 |
54 | 59 |
60 |
61 | 62 | 63 | 67 | 68 | 69 | 70 | 71 | refresh   More 72 | 73 | 74 | 75 | 76 |
77 |
78 |
79 |
80 |
81 | 82 | 150 | 151 | -------------------------------------------------------------------------------- /public/example-pages/dogs/voting.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 25 | 26 | 27 | 28 | thumb_up  Love it 29 | 30 | thumb_down  Nope it 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 51 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 |
66 | 67 | 142 | 143 | -------------------------------------------------------------------------------- /public/example-pages/favourites.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | refresh   More Kitties 23 | 24 | 25 | 26 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | 43 | 44 | 45 | 46 | Favourite 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 58 | {{error_message}} 59 | 60 | 61 | 62 |

Demo Account Favourites

63 |
64 | 65 | 66 | 71 | 72 | 73 | 74 | 79 | 80 | 81 |
82 |
Fav ID: {{ n.id }}
83 |
Image ID: {{n.image.id}}
84 |
sub_id: {{ n.sub_id }}
85 |
Created: {{ new Date(n.created_at).toLocaleString() }}
86 |
87 |
88 | 89 | 90 | Delete 91 | 92 |
93 |
94 |
95 |
96 |
97 |
98 | 99 | 100 | 101 | 102 | 103 |
Page
104 |
105 | 109 |
110 |
111 | 112 |
113 |
114 |
115 |
116 |
117 | 118 | 220 | 221 | -------------------------------------------------------------------------------- /public/example-pages/filter-by-type.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | Another   refresh 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 | 47 | 85 | 86 | -------------------------------------------------------------------------------- /public/example-pages/image-analysis.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 26 | > 27 | 28 | 29 | 30 | Another   refresh 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 |
66 | 67 | 136 | 137 | -------------------------------------------------------------------------------- /public/example-pages/image-upload.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 30 | 31 | 32 | 33 | Choose New Image   upload 34 | 35 | 36 | Upload   upload 37 | 38 |
Uploading
39 |
40 |
41 | 42 | 43 | 44 | 45 | 49 | {{error_message}} 50 | 51 | 52 | 53 | 54 | 61 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |
72 |
73 |
74 | 75 | 159 | 160 | -------------------------------------------------------------------------------- /public/example-pages/pagination.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | 30 | 31 | 36 | 39 | 44 | 45 | 46 | 47 | 48 |
49 | 50 | 51 | 52 | 53 | 54 |
Page
55 |
56 | 61 |
62 |
63 | 64 | 65 | 69 | 70 | 71 | 72 | 73 | refresh   More 74 | 75 | 76 | 77 | 78 |
79 |
80 |
81 |
82 |
83 | 84 | 153 | 154 | -------------------------------------------------------------------------------- /public/example-pages/voting.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 27 | 28 | 29 | 30 | thumb_up  Love it 31 | 32 | thumb_down  Nope it 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 53 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |
68 | 69 | 145 | 146 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdenForshaw/theCatAPI-website/21f2559fbd7e3bfc45d2e8f94509b272907ade0e/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%= process.env.VUE_APP_TITLE %> - <%= process.env.VUE_APP_STRAPLINE %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | <%= process.env.VUE_APP_TITLE %> - <%= process.env.VUE_APP_STRAPLINE %> 29 | 30 | 31 | 32 | 40 | 41 | 42 | 45 |
46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /public/l-favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdenForshaw/theCatAPI-website/21f2559fbd7e3bfc45d2e8f94509b272907ade0e/public/l-favicon.ico -------------------------------------------------------------------------------- /public/meta-tag-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdenForshaw/theCatAPI-website/21f2559fbd7e3bfc45d2e8f94509b272907ade0e/public/meta-tag-image.png -------------------------------------------------------------------------------- /src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdenForshaw/theCatAPI-website/21f2559fbd7e3bfc45d2e8f94509b272907ade0e/src/.DS_Store -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/assets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdenForshaw/theCatAPI-website/21f2559fbd7e3bfc45d2e8f94509b272907ade0e/src/assets/.DS_Store -------------------------------------------------------------------------------- /src/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdenForshaw/theCatAPI-website/21f2559fbd7e3bfc45d2e8f94509b272907ade0e/src/assets/favicon.ico -------------------------------------------------------------------------------- /src/assets/images/angular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdenForshaw/theCatAPI-website/21f2559fbd7e3bfc45d2e8f94509b272907ade0e/src/assets/images/angular.png -------------------------------------------------------------------------------- /src/assets/images/jquery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdenForshaw/theCatAPI-website/21f2559fbd7e3bfc45d2e8f94509b272907ade0e/src/assets/images/jquery.png -------------------------------------------------------------------------------- /src/assets/images/node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdenForshaw/theCatAPI-website/21f2559fbd7e3bfc45d2e8f94509b272907ade0e/src/assets/images/node.png -------------------------------------------------------------------------------- /src/assets/images/react.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdenForshaw/theCatAPI-website/21f2559fbd7e3bfc45d2e8f94509b272907ade0e/src/assets/images/react.png -------------------------------------------------------------------------------- /src/assets/images/vue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdenForshaw/theCatAPI-website/21f2559fbd7e3bfc45d2e8f94509b272907ade0e/src/assets/images/vue.png -------------------------------------------------------------------------------- /src/components/CodeExamples.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | -------------------------------------------------------------------------------- /src/components/ExBtn.js: -------------------------------------------------------------------------------- 1 | // src/components/ExBtn.js 2 | import { VBtn } from 'vuetify/lib' 3 | export default { 4 | extends: VBtn, 5 | name: 'ExBtn', 6 | props: { 7 | gacategory: { 8 | type: String, 9 | default: 'Button' 10 | }, 11 | galabel: { 12 | type: String, 13 | default: 'Event label' 14 | }, 15 | gavalue: { 16 | type: [String, Number], 17 | default: '' 18 | } 19 | }, 20 | methods: { 21 | click (e) { 22 | !this.retainFocusOnClick && !this.fab && e.detail && this.$el.blur() 23 | // our new method is added before the basic 'click' event is emitted in the app 24 | this.trackEvent({ category: this.gacategory, label: this.galabel, value: this.gavalue }) 25 | this.$emit('click', e) 26 | this.btnToggle && this.toggle() 27 | }, 28 | // trackEvent is a new method in our extension 29 | trackEvent ({ category, label, value = '' }) { 30 | // check if $gtag is there 31 | if (this.$gtag) { 32 | this.$gtag.event('click', { 33 | event_category: category, 34 | event_label: label, 35 | value: value 36 | }) 37 | } 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/components/Footer.vue: -------------------------------------------------------------------------------- 1 | 127 | 128 | 148 | 177 | -------------------------------------------------------------------------------- /src/components/NavBar.vue: -------------------------------------------------------------------------------- 1 | 47 | 48 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/components/SectionTabs.vue: -------------------------------------------------------------------------------- 1 | 35 | -------------------------------------------------------------------------------- /src/components/Sections/Breeds.vue: -------------------------------------------------------------------------------- 1 | 57 | 58 | -------------------------------------------------------------------------------- /src/components/Sections/Favourites.vue: -------------------------------------------------------------------------------- 1 | 97 | 98 | -------------------------------------------------------------------------------- /src/components/Sections/ImageLoader.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 103 | 104 | -------------------------------------------------------------------------------- /src/components/Sections/Pricing.vue: -------------------------------------------------------------------------------- 1 | 187 | 214 | 239 | -------------------------------------------------------------------------------- /src/components/Sections/Search.vue: -------------------------------------------------------------------------------- 1 | 147 | 296 | -------------------------------------------------------------------------------- /src/components/Sections/SubID.vue: -------------------------------------------------------------------------------- 1 | 36 | 74 | -------------------------------------------------------------------------------- /src/components/Sections/Upload.vue: -------------------------------------------------------------------------------- 1 | 82 | 83 | 158 | -------------------------------------------------------------------------------- /src/components/Sections/Vote.vue: -------------------------------------------------------------------------------- 1 | 83 | 168 | -------------------------------------------------------------------------------- /src/components/SignupForm.vue: -------------------------------------------------------------------------------- 1 | 129 | 130 | 216 | 217 | 228 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import '@babel/polyfill' 2 | import Vue from 'vue' 3 | import './plugins/vuetify' 4 | import App from './App.vue' 5 | import router from './router' 6 | import store from './store/index' 7 | import VueGtag from 'vue-gtag' 8 | 9 | Vue.config.productionTip = false 10 | Vue.use(VueGtag, { 11 | config: { id: process.env.VUE_APP_GA_ID } 12 | }) 13 | 14 | new Vue({ 15 | router, 16 | store, 17 | render: h => h(App) 18 | }).$mount('#app') 19 | 20 | import '@mdi/font/css/materialdesignicons.css' // Ensure you are using css-loader 21 | import Vuetify from 'vuetify' 22 | import 'vuetify/dist/vuetify.min.css' 23 | Vue.use(Vuetify, { 24 | iconfont: 'mdi' 25 | }) 26 | -------------------------------------------------------------------------------- /src/plugins/vuetify.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuetify from 'vuetify/lib' 3 | import 'vuetify/src/stylus/app.styl' 4 | 5 | Vue.use(Vuetify, { 6 | iconfont: 'md', 7 | }) 8 | -------------------------------------------------------------------------------- /src/router.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | import Router from "vue-router"; 3 | import Home from "./views/Home.vue"; 4 | 5 | Vue.use(Router); 6 | 7 | const router = new Router({ 8 | mode: "history", 9 | routes: [ 10 | { 11 | path: "/", 12 | name: "home", 13 | meta: { gtm: "Home" }, 14 | component: Home, 15 | }, 16 | { 17 | path: "/signup", 18 | name: "signup", 19 | meta: { gtm: "Signup" }, 20 | component: () => import("./views/Signup.vue"), 21 | }, 22 | { 23 | path: "/breeds", 24 | name: "breeds", 25 | meta: { gtm: "Breeds" }, 26 | component: () => import("./components/Sections/Breeds.vue"), 27 | }, 28 | { 29 | path: "/thanks", 30 | name: "thanks", 31 | meta: { gtm: "Thanks" }, 32 | component: () => import("./views/Thanks.vue"), 33 | }, 34 | { 35 | path: "/privacy", 36 | name: "privacy", 37 | meta: { gtm: "Privacy" }, 38 | component: () => import("./views/PrivacyPolicy.vue"), 39 | }, 40 | { 41 | path: "/showcase", 42 | name: "showcase", 43 | meta: { gtm: "Showcase" }, 44 | component: () => import("./views/ShowCase.vue"), 45 | }, 46 | { 47 | path: "/terms", 48 | name: "terms", 49 | meta: { gtm: "Terms" }, 50 | component: () => import("./views/TermsConditions.vue"), 51 | }, 52 | { 53 | path: "/docs.html", // Legacy reason, page on old website is still deeplinked from so many other sites it gets a lot of traffic 54 | name: "docs", 55 | meta: { gtm: "Docs" }, 56 | component: () => import("./views/Docs.vue"), 57 | }, 58 | ], 59 | }); 60 | 61 | export default router; 62 | 63 | import VueGtm from "vue-gtm"; 64 | 65 | Vue.use(VueGtm, { 66 | id: process.env.VUE_APP_GTM_ID, // Your GTM ID 67 | enabled: true, 68 | debug: false, 69 | vueRouter: router, 70 | }); 71 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | 2 | import Vue from 'vue' 3 | import Vuex from 'vuex' 4 | 5 | import TheCatAPI from '@/store/modules/TheCatAPI' 6 | 7 | 8 | Vue.use(Vuex) 9 | 10 | const store = new Vuex.Store({ 11 | modules: { 12 | TheCatAPI 13 | } 14 | }) 15 | 16 | export default store -------------------------------------------------------------------------------- /src/store/modules/TheCatAPI.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import axios from 'axios' 4 | 5 | Vue.use(Vuex); 6 | 7 | const SET_IMAGES = 'SET_IMAGES'; 8 | const SET_SUB_ID = 'SET_SUB_ID'; 9 | const SET_CATEGORIES = 'SET_CATEGORIES'; 10 | const SET_BREEDS = 'SET_BREEDS'; 11 | const SET_API_KEY = 'SET_API_KEY'; 12 | const SET_LAST_FAVOURITED = 'SET_LAST_FAVOURITED'; 13 | const SET_FAVOURITES = 'SET_FAVOURITES'; 14 | 15 | axios.defaults.baseURL = process.env.VUE_APP_API_ENDPOINT;// "https://api.thedogapi.com/" 16 | 17 | 18 | //axios.defaults.baseURL = "http://localhost:4009" 19 | 20 | axios.interceptors.response.use(null, function(error) { 21 | console.warn('Error status', error.response.status); 22 | return Promise.reject(error); 23 | }); 24 | 25 | const applySubID = function (sub_id, params) 26 | { 27 | if(!params)params = {} 28 | 29 | if(sub_id)params.sub_id = sub_id 30 | return params; 31 | } 32 | 33 | const createDataForm = function(data) { 34 | let formData = new FormData(); 35 | for(let prop in data){ 36 | formData.append(prop, data[prop]); 37 | } 38 | return formData; 39 | } 40 | 41 | const dataStore = { 42 | namespaced: true, 43 | state: { 44 | sub_id: 'demo-'+((1<<24)*Math.random()|0).toString(16), // Default value 45 | images: null, 46 | api_key: "DEMO-API-KEY", // Swap this out with the one from the email sent after signing up 47 | last_favourited: null, 48 | favourites:null, 49 | categories: [], 50 | breeds:[] 51 | }, 52 | mutations: { 53 | SET_CATEGORIES(state, data){ 54 | state.categories = data 55 | }, 56 | SET_SUB_ID(state, data){ 57 | state.sub_id = data 58 | }, 59 | SET_IMAGES(state, data) { 60 | state.images = data 61 | }, 62 | SET_API_KEY(state, data) { 63 | state.api_key = data 64 | }, 65 | SET_LAST_FAVOURITED(state, data) { 66 | state.last_favourited = data 67 | }, 68 | SET_FAVOURITES(state, data) { 69 | state.favourites = data 70 | }, 71 | SET_BREEDS(state, data) { 72 | state.breeds = data 73 | } 74 | }, 75 | getters: { 76 | images(state) { 77 | return state.images 78 | }, 79 | apiKey(state) { 80 | return state.api_key 81 | }, 82 | subID(state) { 83 | return state.sub_id; 84 | }, 85 | lastFavourited(state) { 86 | return state.last_favourited; 87 | }, 88 | categories(state) { 89 | return state.categories; 90 | } 91 | }, 92 | actions: { 93 | async setAPIKey({ 94 | commit 95 | }, key) { 96 | try { 97 | commit(SET_API_KEY, key) 98 | } catch (error) { 99 | throw new Error(error) 100 | } 101 | }, 102 | async setSubID({ 103 | commit 104 | }, sub_id) { 105 | console.log("SetSubID", sub_id) 106 | try { 107 | commit(SET_SUB_ID, sub_id) 108 | } catch (error) { 109 | throw new Error(error) 110 | } 111 | }, 112 | getSubID({ 113 | rootGetters 114 | }) { 115 | try { 116 | return rootGetters['TheCatAPI/subID'] 117 | } catch (error) { 118 | throw new Error(error) 119 | } 120 | }, 121 | 122 | async searchImages({ 123 | rootGetters, 124 | commit 125 | }, query) { 126 | try { 127 | // add x-api-key as header 128 | axios.defaults.headers.common['x-api-key'] = rootGetters['TheCatAPI/apiKey'] 129 | let response = await axios.get('/v1/images/search',{ 130 | params: applySubID(rootGetters['TheCatAPI/subID'], query) 131 | } 132 | ); 133 | commit(SET_IMAGES,response.data) 134 | return response; 135 | } catch (error) { 136 | throw new Error(error) 137 | } 138 | }, 139 | 140 | async getImage({ 141 | rootGetters 142 | }, query) { 143 | try { 144 | // add x-api-key as header 145 | axios.defaults.headers.common['x-api-key'] = rootGetters['TheCatAPI/apiKey'] 146 | let response = await axios.get('/v1/images/'+query.image_id, { 147 | params: applySubID(rootGetters['TheCatAPI/subID'], query) 148 | }); 149 | 150 | return response; 151 | } catch (error) { 152 | throw new Error(error.response.data.message) 153 | } 154 | }, 155 | async getCategories({ 156 | commit 157 | }) { 158 | try { 159 | let response = await axios.get('/v1/categories/'); 160 | commit(SET_CATEGORIES,response.data) 161 | return response; 162 | } catch (error) { 163 | throw new Error(error.response.data.message) 164 | } 165 | }, 166 | async getUploads({ 167 | rootGetters 168 | }, query) { 169 | try { 170 | // add x-api-key as header 171 | axios.defaults.headers.common['x-api-key'] = rootGetters['TheCatAPI/apiKey'] 172 | let response = await axios.get('/v1/images/', { 173 | params: applySubID(rootGetters['TheCatAPI/subID'], query) 174 | }); 175 | 176 | return response; 177 | } catch (error) { 178 | throw new Error(error.response.data.message) 179 | } 180 | }, 181 | async voteImage({ 182 | rootGetters 183 | }, params) { 184 | try { 185 | // add x-api-key as header 186 | 187 | axios.defaults.headers.common['x-api-key'] = rootGetters['TheCatAPI/apiKey'] 188 | let response = await axios.post('/v1/votes/', 189 | applySubID(rootGetters['TheCatAPI/subID'], params) 190 | ); 191 | 192 | return response; 193 | } catch (error) { 194 | throw new Error(error.response.data.message) 195 | } 196 | }, 197 | async uploadImage({ 198 | rootGetters 199 | }, params) { 200 | try { 201 | // add x-api-key as header 202 | axios.defaults.headers.common['x-api-key'] = rootGetters['TheCatAPI/apiKey'] 203 | params = applySubID(rootGetters['TheCatAPI/subID'], params) 204 | let dataForm = createDataForm(params); 205 | let response = await axios.post('/v1/images/upload',dataForm,{ 206 | headers: { 207 | 'Content-Type':'multipart/form-data' 208 | } 209 | }); 210 | return response; 211 | 212 | } catch (error) { 213 | throw new Error(error.response.data.message) 214 | } 215 | 216 | }, 217 | async getFavourites({ 218 | rootGetters, 219 | commit 220 | }, query) { 221 | try { 222 | // add x-api-key as header 223 | axios.defaults.headers.common['x-api-key'] = rootGetters['TheCatAPI/apiKey'] 224 | let response = await axios.get('/v1/favourites',{ 225 | params: applySubID(rootGetters['TheCatAPI/subID'], query) 226 | } 227 | ); 228 | commit(SET_FAVOURITES,response.data) 229 | return response; 230 | } catch (error) { 231 | throw new Error(error) 232 | } 233 | }, 234 | async favouriteImage({ 235 | rootGetters, 236 | commit 237 | }, params) { 238 | try { 239 | // add x-api-key as header 240 | 241 | axios.defaults.headers.common['x-api-key'] = rootGetters['TheCatAPI/apiKey'] 242 | let response = await axios.post('/v1/favourites/', 243 | applySubID(rootGetters['TheCatAPI/subID'], params) 244 | ); 245 | commit(SET_LAST_FAVOURITED, params.image_id) 246 | 247 | return response; 248 | } catch (error) { 249 | throw new Error(error.response.data.message) 250 | } 251 | }, 252 | async unFavouriteImage({ 253 | rootGetters, 254 | commit 255 | }, params) { 256 | try { 257 | // add x-api-key as header 258 | axios.defaults.headers.common['x-api-key'] = rootGetters['TheCatAPI/apiKey'] 259 | let response = await axios.delete('/v1/favourites/'+params.favourite_id 260 | ); 261 | 262 | commit(SET_LAST_FAVOURITED, params.image_id) 263 | return response; 264 | } catch (error) { 265 | throw new Error(error) 266 | } 267 | }, 268 | // eslint-disable-next-line 269 | async signup({ 270 | }, params) { 271 | try { 272 | // this is rate limited on the server and uses a dynamic env var to prevent being spammed so it probably won't work well/ if at all outisde of theCatAPI.com / theDogAPI.com 273 | let response = await axios.post('/v1/user/passwordlesssignup', params); 274 | 275 | return response; 276 | } catch (error) { 277 | throw new Error(error.response.data.message) 278 | } 279 | }, 280 | 281 | async getBreeds({ 282 | rootGetters, 283 | commit 284 | }, query) { 285 | try { 286 | // add x-api-key as header 287 | axios.defaults.headers.common['x-api-key'] = rootGetters['TheCatAPI/apiKey'] 288 | let response = await axios.get('/v1/breeds', {params: query}); 289 | commit(SET_BREEDS,response.data) 290 | return response; 291 | } catch (error) { 292 | throw new Error(error) 293 | } 294 | }, 295 | 296 | } 297 | } 298 | 299 | export default dataStore -------------------------------------------------------------------------------- /src/views/Docs.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 46 | 47 | 53 | -------------------------------------------------------------------------------- /src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 134 | 135 | 187 | 188 | 221 | -------------------------------------------------------------------------------- /src/views/PrivacyPolicy.vue: -------------------------------------------------------------------------------- 1 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/views/ShowCase.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 27 | 28 | 70 | -------------------------------------------------------------------------------- /src/views/Signup.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 20 | 21 | -------------------------------------------------------------------------------- /src/views/TermsConditions.vue: -------------------------------------------------------------------------------- 1 | 84 | 85 | 91 | 92 | 129 | -------------------------------------------------------------------------------- /src/views/Thanks.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 40 | 41 | 47 | -------------------------------------------------------------------------------- /tests/e2e/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | 'cypress' 4 | ], 5 | env: { 6 | mocha: true, 7 | 'cypress/globals': true 8 | }, 9 | rules: { 10 | strict: 'off' 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tests/e2e/plugins/index.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/guides/guides/plugins-guide.html 2 | /* eslint-disable import/no-extraneous-dependencies global-require */ 3 | const webpack = require('@cypress/webpack-preprocessor') 4 | 5 | module.exports = (on, config) => { 6 | on('file:preprocessor', webpack({ 7 | webpackOptions: require('@vue/cli-service/webpack.config'), 8 | watchOptions: {} 9 | })) 10 | 11 | return Object.assign({}, config, { 12 | fixturesFolder: 'tests/e2e/fixtures', 13 | integrationFolder: 'tests/e2e/specs', 14 | screenshotsFolder: 'tests/e2e/screenshots', 15 | videosFolder: 'tests/e2e/videos', 16 | supportFile: 'tests/e2e/support/index.js' 17 | }) 18 | } 19 | -------------------------------------------------------------------------------- /tests/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('Visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'Welcome to Your Vue.js App') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /tests/e2e/support/commands.js: -------------------------------------------------------------------------------- 1 | // *********************************************** 2 | // This example commands.js shows you how to 3 | // create various custom commands and overwrite 4 | // existing commands. 5 | // 6 | // For more comprehensive examples of custom 7 | // commands please read more here: 8 | // https://on.cypress.io/custom-commands 9 | // *********************************************** 10 | // 11 | // 12 | // -- This is a parent command -- 13 | // Cypress.Commands.add("login", (email, password) => { ... }) 14 | // 15 | // 16 | // -- This is a child command -- 17 | // Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) 18 | // 19 | // 20 | // -- This is a dual command -- 21 | // Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) 22 | // 23 | // 24 | // -- This is will overwrite an existing command -- 25 | // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) 26 | -------------------------------------------------------------------------------- /tests/e2e/support/index.js: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import './commands' 18 | 19 | // Alternatively you can use CommonJS syntax: 20 | // require('./commands') 21 | -------------------------------------------------------------------------------- /thedogapi.env: -------------------------------------------------------------------------------- 1 | VUE_APP_POSTMAN_URL = https://documenter.getpostman.com/view/5578104/RWgqUxxi 2 | VUE_APP_DOCS_URL = https://docs.thedogapi.com/ 3 | VUE_APP_API_KEY = DEMO-API-KEY 4 | VUE_APP_API_ENDPOINT = https://api.thedogapi.com 5 | VUE_APP_ID = DOG 6 | VUE_APP_NAME = TheDogAPI 7 | VUE_APP_PRIMARY_COLOUR=rgb(35, 113, 215); 8 | VUE_APP_TITLE = TheDogAPI 9 | VUE_APP_STRAPLINE = Dogs as a Service 10 | VUE_APP_META_IMAGE_URL = https://cdn2.thedogapi.com/logos/wave-square_256.png 11 | VUE_APP_LOGO_URL = https://cdn2.thedogapi.com/logos/wave-square_256.png 12 | VUE_APP_URL = https://TheDogAPI.com 13 | VUE_APP_DESCRIPTION = A public service API all about Dogs, free to use when making your fancy new App, Website or Service. 14 | VUE_APP_FORUM_URL = https://forum.thatapiguy.com/ 15 | VUE_APP_ABOUT_URL=https://thatapiguy.com/the-dog-api/ 16 | VUE_APP_ROADMAP_URL=https://trello.com/b/ddUlP8lJ/that-api-guy-public 17 | VUE_APP_GTM_ID = GTM-TCFDV69 18 | VUE_APP_PREMIUM_TEST_URL=https://docs.google.com/forms/d/e/1FAIpQLSfDJhttl3jGhcRBAv2VP75IB8C-QbbjY6t32hvKIF-IhULvsg/viewform?usp=sf_link 19 | VUE_APP_PRICING_URL=/#pricing --------------------------------------------------------------------------------