-
-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from electerious/develop
v1.5.0
- Loading branch information
Showing
43 changed files
with
2,491 additions
and
2,599 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
# Sizes | ||
|
||
- [Get browser width](#get-browser-width) | ||
- [Get browser height](#get-browser-height) | ||
- [Get screen width](#get-screen-width) | ||
- [Get screen height](#get-screen-height) | ||
|
||
## Get browser width | ||
|
||
Get the top 25 browser widths of the last 7 days. | ||
|
||
### Request | ||
|
||
``` | ||
GET /domains/:domainId/sizes?type=browser_width | ||
``` | ||
|
||
### Headers | ||
|
||
| Name | Example | | ||
|:-----------|:------------| | ||
| Authorization | `Authorization: Bearer :tokenId` | | ||
|
||
### Response | ||
|
||
``` | ||
Status: 200 OK | ||
``` | ||
|
||
```json | ||
{ | ||
"type": "sizes", | ||
"data": [ | ||
{ | ||
"type": "size", | ||
"data": { | ||
"id": "1920", | ||
"count": 1 | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Get browser height | ||
|
||
Get the top 25 browser heights of the last 7 days. | ||
|
||
### Request | ||
|
||
``` | ||
GET /domains/:domainId/sizes?type=browser_height | ||
``` | ||
|
||
### Headers | ||
|
||
| Name | Example | | ||
|:-----------|:------------| | ||
| Authorization | `Authorization: Bearer :tokenId` | | ||
|
||
### Response | ||
|
||
``` | ||
Status: 200 OK | ||
``` | ||
|
||
```json | ||
{ | ||
"type": "sizes", | ||
"data": [ | ||
{ | ||
"type": "size", | ||
"data": { | ||
"id": "1080", | ||
"count": 1 | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Get screen width | ||
|
||
Get the top 25 screen widths of the last 7 days. | ||
|
||
### Request | ||
|
||
``` | ||
GET /domains/:domainId/sizes?type=screen_width | ||
``` | ||
|
||
### Headers | ||
|
||
| Name | Example | | ||
|:-----------|:------------| | ||
| Authorization | `Authorization: Bearer :tokenId` | | ||
|
||
### Response | ||
|
||
``` | ||
Status: 200 OK | ||
``` | ||
|
||
```json | ||
{ | ||
"type": "sizes", | ||
"data": [ | ||
{ | ||
"type": "size", | ||
"data": { | ||
"id": "1920", | ||
"count": 1 | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Get screen height | ||
|
||
Get the top 25 screen heights of the last 7 days. | ||
|
||
### Request | ||
|
||
``` | ||
GET /domains/:domainId/sizes?type=height | ||
``` | ||
|
||
### Headers | ||
|
||
| Name | Example | | ||
|:-----------|:------------| | ||
| Authorization | `Authorization: Bearer :tokenId` | | ||
|
||
### Response | ||
|
||
``` | ||
Status: 200 OK | ||
``` | ||
|
||
```json | ||
{ | ||
"type": "sizes", | ||
"data": [ | ||
{ | ||
"type": "size", | ||
"data": { | ||
"id": "1080", | ||
"count": 1 | ||
} | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Constants will be shared between client and server. | ||
// They will be used as values in the DOM and in the URL of the referrer calls. | ||
const SIZES_TYPE_BROWSER_WIDTH = 'browser_width' | ||
const SIZES_TYPE_BROWSER_HEIGHT = 'browser_height' | ||
const SIZES_TYPE_SCREEN_WIDTH = 'screen_width' | ||
const SIZES_TYPE_SCREEN_HEIGHT = 'screen_height' | ||
|
||
module.exports = { | ||
SIZES_TYPE_BROWSER_WIDTH, | ||
SIZES_TYPE_BROWSER_HEIGHT, | ||
SIZES_TYPE_SCREEN_WIDTH, | ||
SIZES_TYPE_SCREEN_HEIGHT | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.