Skip to content

Commit

Permalink
BREAKING: API endpoint change (#65)
Browse files Browse the repository at this point in the history
* BREAKING: API endpoint change

* Change images
  • Loading branch information
goliney authored Feb 21, 2023
1 parent 4a653d6 commit ce8c127
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 21 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.0.0 (February 21, 2023)

BREAKING CHANGE:
- Change API endpoint after migration to the DigitalOcean serverless functions


## 0.4.0 (January 8, 2017)

- Use https instead of http
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Compare these QR codes that lead to the same [long address](https://www.amazon.c

| Regular QR code :hankey: | QR code you get with qrize :+1: |
|-------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|
| ![Regular QR code](https://raw.githubusercontent.com/qrize/qrize/assets/big_qr.gif) | ![QR code you get with qrize](https://raw.githubusercontent.com/qrize/qrize/assets/qrized1.gif) |
| ![Regular QR code](https://raw.githubusercontent.com/qrize/qrize/assets/big.png) | ![QR code you get with qrize](https://raw.githubusercontent.com/qrize/qrize/assets/small.png) |

Having QR codes smaller makes it more reader-friendly, saves space on page and is awesome. Visit [qrize.me](https://qrize.me) for general information.

Expand Down
10 changes: 6 additions & 4 deletions dist/qrize.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau

var qrcode = _interopDefault(require('qrcode-generator'));

var version = "0.4.0";
var version = "1.0.0";

//

Expand Down Expand Up @@ -61,10 +61,12 @@ function getJSON(_ref3) {

//

var API_ROOT = "https://qrize.me/f/p/r";

var ENDPOINTS = {
getHash: "https://qrize.me/get-hash/<url>",
getUrl: "https://qrize.me/get-url/<hash>",
redirector: "https://qrize.me/<hash>"
getHash: API_ROOT + "/?url=<url>",
getUrl: API_ROOT + "/?hash=<hash>",
redirector: API_ROOT + "/<hash>"
};

var ERROR_CORRECTION_LEVELS = {
Expand Down
10 changes: 6 additions & 4 deletions dist/qrize.esm.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import qrcode from 'qrcode-generator';

var version = "0.4.0";
var version = "1.0.0";

//

Expand Down Expand Up @@ -57,10 +57,12 @@ function getJSON(_ref3) {

//

var API_ROOT = "https://qrize.me/f/p/r";

var ENDPOINTS = {
getHash: "https://qrize.me/get-hash/<url>",
getUrl: "https://qrize.me/get-url/<hash>",
redirector: "https://qrize.me/<hash>"
getHash: API_ROOT + "/?url=<url>",
getUrl: API_ROOT + "/?hash=<hash>",
redirector: API_ROOT + "/<hash>"
};

var ERROR_CORRECTION_LEVELS = {
Expand Down
2 changes: 1 addition & 1 deletion dist/qrize.umd.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qrize",
"version": "0.4.0",
"version": "1.0.0",
"description": "JavaScript library for generating tiny QR codes of your web pages",
"engines": {
"npm": ">=4"
Expand All @@ -12,7 +12,7 @@
"url": "https://github.com/qrize/qrize",
"type": "git"
},
"homepage": "http://qrize.me",
"homepage": "https://qrize.me",
"keywords": [
"qr",
"code",
Expand All @@ -22,7 +22,7 @@
"tiny",
"small"
],
"author": "Sergey Goliney <sergey@goliney.com>",
"author": "Serhii Holinei <serhii@holinei.com>",
"license": "MIT",
"files": [
"dist"
Expand Down
8 changes: 5 additions & 3 deletions src/constants.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// @flow

export const API_ROOT = "https://qrize.me/f/p/r";

export const ENDPOINTS = {
getHash: "https://qrize.me/get-hash/<url>",
getUrl: "https://qrize.me/get-url/<hash>",
redirector: "https://qrize.me/<hash>",
getHash: `${API_ROOT}/?url=<url>`,
getUrl: `${API_ROOT}/?hash=<hash>`,
redirector: `${API_ROOT}/<hash>`,
};

export const ERROR_CORRECTION_LEVELS = {
Expand Down
10 changes: 5 additions & 5 deletions test/unit/__snapshots__/qrize.test.js.snap

Large diffs are not rendered by default.

0 comments on commit ce8c127

Please sign in to comment.