diff --git a/EXTRAS.md b/EXTRAS.md new file mode 100644 index 0000000..1e9a3c2 --- /dev/null +++ b/EXTRAS.md @@ -0,0 +1,12 @@ +# Extras + +## Todo + ++ Caching : Daily Challenge (why request repeatedly if question remains same for entire day!!!?) + +## .env.json + ++ Its where secrets are stored 😉 + (event the api route) + + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..333bc2f --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Prashantha T P + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index b9de468..e5520b7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ -# Leetcode API Client +![Leetcode Api Client](./docs/images/leetcode_client_banner_v3.png) +> > Node JS client to consume Leetcode Proxy API +> diff --git a/docs/images/leetcode_client_banner_v1.png b/docs/images/leetcode_client_banner_v1.png new file mode 100644 index 0000000..a4915da Binary files /dev/null and b/docs/images/leetcode_client_banner_v1.png differ diff --git a/docs/images/leetcode_client_banner_v2.png b/docs/images/leetcode_client_banner_v2.png new file mode 100644 index 0000000..0de7075 Binary files /dev/null and b/docs/images/leetcode_client_banner_v2.png differ diff --git a/docs/images/leetcode_client_banner_v3.png b/docs/images/leetcode_client_banner_v3.png new file mode 100644 index 0000000..2e2dd3a Binary files /dev/null and b/docs/images/leetcode_client_banner_v3.png differ diff --git a/lib/requests.js b/lib/requests.js index 2d18933..6748ca1 100644 --- a/lib/requests.js +++ b/lib/requests.js @@ -3,7 +3,7 @@ import config from "../config/config"; export const fetchQuery = async (query) => { const data = await axios({ - url: "http://localhost:8000/api/v1/query", + url: config.queryPostUrl, method: "POST", data: { LEETCODE_SESSION: config.env.LEETCODE_SESSION,