From d5a08adbca1d386625017db00ae67e30bc446083 Mon Sep 17 00:00:00 2001 From: Devin Baeten <71613313+devinbaeten@users.noreply.github.com> Date: Sat, 4 Mar 2023 22:34:46 +0000 Subject: [PATCH] Built v2.0.2 --- docs/index.html | 112 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 106 insertions(+), 6 deletions(-) diff --git a/docs/index.html b/docs/index.html index b601b2d..9930df6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -37,8 +37,8 @@
- Coming Soon: - Introducing the BeReal Time History API. You will be able to request an API key which enables access the full extent of my historical data, on-demand! + NEW: + Introducing the BeReal Time History API. You can now request an API key which enables access the full extent of my historical data, on-demand! Select the "API" tab below to get started.
Today's planned maintenance has been cancelled.
@@ -47,7 +47,7 @@ @@ -474,8 +474,109 @@

Why?

-

BTH API

-

You must have an account before you can access the API. This requirement is in

+
+

BeReal Time History API

+
+
BETA
+
+
+

You can integrate real time and historic moment data into your own project. To get started, you'll need to request an API key. This is unique to your project and should not be shared.

+
+ Request API Key + Report Abuse +
+
+

About

+ +

All requests should be directed towards the following domain. Do not use the endpoints utilized by this web application, as they are rate limited and intended for this site only.

+ https://bereal.devin.rest/ + +

To use the API, you need to supply an API key with each request. Please include the API key as a query parameter with the key name `api_key`, like so:

+ https://bereal.devin.rest/v1/moments/latest?api_key=YOUR_API_KEY +

Both endpoints accept the GET http method.

+ +
+ +

Endpoint 1: /v1/moments/latest

+

This endpoint returns the most recent moments in each region with the following JSON format:

+
+					  	
+{
+	"regions": {
+		"us-central": {
+			"id": "MIB0Amg220yP7m0Te-p9s",
+			"ts": "1677871105",
+			"utc": "2023-03-03 19:18:25"
+		},
+		"europe-west": {
+			"id": "CMDRw4EAAVJbz7LQLt35w",
+			"ts": "1677846583",
+			"utc": "2023-03-03 12:29:43"
+		},
+		"asia-west": {
+			"id": "ZzR8YsOxZ6N-5JIY69UUw",
+			"ts": "1677837621",
+			"utc": "2023-03-03 10:00:21"
+		},
+		"asia-east": {
+			"id": "GSB1g5Ef39pRsdL0VZfPB",
+			"ts": "1677886896",
+			"utc": "2023-03-03 23:41:36"
+		}
+	},
+	"now": {
+		"ts": 1677897828,
+		"utc": "2023-03-04 02:43:48"
+	}
+}
+						  
+						  
+

Example Request:

+ https://bereal.devin.rest/v1/moments/latest?api_key=YOUR_API_KEY + +
+ +

Endpoint 2: /v1/moments/all

+

This endpoint returns current and previous moments in each region with the following JSON format. While the default limit for returned moments is 90 for each region, you can alter this behavior with the limit GET parameter; For the value, you can provide an integer to limit the moment count for each region, or "none", which removes the limit and will return all moments I have captured in each region.

+
+						  
+{
+	"regions": {
+		"us-central": [
+			{
+				"id": "MIB0Amg220yP7m0Te-p9s",
+				"ts": "1677871105",
+				"utc": "2023-03-03 19:18:25"
+			},
+			...
+		],
+		"europe-west": [
+			{
+				"id": "CMDRw4EAAVJbz7LQLt35w",
+				"ts": "1677846583",
+				"utc": "2023-03-03 12:29:43"
+			},
+			...
+		],
+		"asia-west": [
+			{
+				"id": "ZzR8YsOxZ6N-5JIY69UUw",
+				"ts": "1677837621",
+				"utc": "2023-03-03 10:00:21"
+			},
+			...
+		],
+		"asia-east": [
+			{
+				"id": "GSB1g5Ef39pRsdL0VZfPB",
+				"ts": "1677886896",
+				"utc": "2023-03-03 23:41:36"
+			},
+			...
+		]
+	}
+}
+						  
@@ -492,7 +593,6 @@

Contact The Developer

-