From c0a159e3cd85e060bafe3d60a317c192e6ab405f Mon Sep 17 00:00:00 2001 From: Andras Fordos Date: Wed, 28 Feb 2024 17:08:01 +0100 Subject: [PATCH] init abstract time (#3169) --- .../apiDefinition.swagger.json | 279 ++++++++++++++++++ .../Abstract Timezones/apiProperties.json | 22 ++ .../Abstract Timezones/readme.md | 25 ++ 3 files changed, 326 insertions(+) create mode 100644 independent-publisher-connectors/Abstract Timezones/apiDefinition.swagger.json create mode 100644 independent-publisher-connectors/Abstract Timezones/apiProperties.json create mode 100644 independent-publisher-connectors/Abstract Timezones/readme.md diff --git a/independent-publisher-connectors/Abstract Timezones/apiDefinition.swagger.json b/independent-publisher-connectors/Abstract Timezones/apiDefinition.swagger.json new file mode 100644 index 0000000000..475e93df14 --- /dev/null +++ b/independent-publisher-connectors/Abstract Timezones/apiDefinition.swagger.json @@ -0,0 +1,279 @@ +{ + "swagger": "2.0", + "info": { + "title": "Abstract Timezones", + "contact": { + "name": "Fördős András", + "email": "fordosa90+ipc_abstrtimezone@gmail.com" + }, + "description": "The Abstract Time, Date, and Timezone service is the easiest way to find, convert, and manage time and timezone data across the world.", + "version": "1.0" + }, + "host": "timezone.abstractapi.com", + "basePath": "/", + "schemes": [ + "https" + ], + "consumes": [], + "produces": [], + "paths": { + "/v1/current_time": { + "get": { + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "properties": { + "datetime": { + "type": "string", + "description": "The current date and time of the requested location.", + "title": "Datetime" + }, + "timezone_name": { + "type": "string", + "description": "Timezone's name from the IANA Time Zone Database.", + "title": "Timezone name" + }, + "timezone_location": { + "type": "string", + "description": "Timezone's location.", + "title": "Timezone location" + }, + "timezone_abbreviation": { + "type": "string", + "description": "Timezone's abbreviation, also from the IANA Time Zone Database.", + "title": "Timezone abbreviation" + }, + "gmt_offset": { + "type": "integer", + "format": "int32", + "description": "Timezone's offset from Greenwich Mean Time (GMT).", + "title": "GMT offset" + }, + "is_dst": { + "type": "boolean", + "description": "True if the location is currently in Daylight Savings Time (DST).", + "title": "Is DST" + }, + "requested_location": { + "type": "string", + "description": "The location from the request.", + "title": "Requested location" + }, + "latitude": { + "type": "number", + "format": "float", + "description": "Decimal of the longitude found for the requested location.", + "title": "Latitude" + }, + "longitude": { + "type": "number", + "format": "float", + "description": "Decimal of the longitude found for the requested location.", + "title": "Longitude" + } + } + } + } + }, + "summary": "Current time", + "operationId": "GetCurrentTime", + "description": "The current_time endpoint take a location in the form of a location name, latitude and longitude, or IP address and returns the current time, date, and timezone of that location.", + "parameters": [ + { + "name": "location", + "in": "query", + "required": true, + "type": "string", + "x-ms-summary": "Location", + "description": "The location to determine the current time and timezone of. This parameter accepts the location as a string (e.g., Los Angeles, CA), a longitude and latitude (e.g., -31.4173391,-64.183319) , or an IP address (e.g., 82.111.111.111)" + } + ] + } + }, + "/v1/convert_time": { + "get": { + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "properties": { + "base_location": { + "type": "object", + "properties": { + "datetime": { + "type": "string", + "description": "The current date and time of the requested location.", + "title": "Datetime" + }, + "timezone_name": { + "type": "string", + "description": "Timezone's name from the IANA Time Zone Database.", + "title": "Timezone name" + }, + "timezone_location": { + "type": "string", + "description": "Timezone's location.", + "title": "Timezone location" + }, + "timezone_abbreviation": { + "type": "string", + "description": "Timezone's abbreviation, also from the IANA Time Zone Database.", + "title": "Timezone abbreviation" + }, + "gmt_offset": { + "type": "integer", + "format": "int32", + "description": "Timezone's offset from Greenwich Mean Time (GMT).", + "title": "GMT offset" + }, + "is_dst": { + "type": "boolean", + "description": "True if the location is currently in Daylight Savings Time (DST).", + "title": "Is DST" + }, + "requested_location": { + "type": "string", + "description": "The location from the request.", + "title": "Requested location" + }, + "latitude": { + "type": "number", + "format": "float", + "description": "Decimal of the longitude found for the requested location.", + "title": "Latitude" + }, + "longitude": { + "type": "number", + "format": "float", + "description": "Decimal of the longitude found for the requested location.", + "title": "Longitude" + } + }, + "description": "The JSON Object containing the time and timezone details of the base location from the request.", + "title": "Base location" + }, + "target_location": { + "type": "object", + "properties": { + "datetime": { + "type": "string", + "description": "The current date and time of the requested location.", + "title": "Datetime" + }, + "timezone_name": { + "type": "string", + "description": "Timezone's name from the IANA Time Zone Database.", + "title": "Timezone name" + }, + "timezone_location": { + "type": "string", + "description": "Timezone's location.", + "title": "Timezone location" + }, + "timezone_abbreviation": { + "type": "string", + "description": "Timezone's abbreviation, also from the IANA Time Zone Database.", + "title": "Timezone abbreviation" + }, + "gmt_offset": { + "type": "integer", + "format": "int32", + "description": "Timezone's offset from Greenwich Mean Time (GMT).", + "title": "GMT offset" + }, + "is_dst": { + "type": "boolean", + "description": "True if the location is currently in Daylight Savings Time (DST).", + "title": "Is DST" + }, + "requested_location": { + "type": "string", + "description": "The location from the request.", + "title": "Requested location" + }, + "latitude": { + "type": "number", + "format": "float", + "description": "Decimal of the longitude found for the requested location.", + "title": "Latitude" + }, + "longitude": { + "type": "number", + "format": "float", + "description": "Decimal of the longitude found for the requested location.", + "title": "Longitude" + } + }, + "description": "The JSON Object containing the time and timezone details of the target location from the request.", + "title": "Target location" + } + } + } + } + }, + "summary": "Convert time", + "operationId": "ConvertTime", + "description": "Convert the time and date of a given location to the time and date of another location. By default it converts the current time, but the conversion can take place in either the past or future with a simple parameter.", + "parameters": [ + { + "name": "base_location", + "in": "query", + "required": true, + "type": "string", + "x-ms-summary": "Base location", + "description": "The location you use as a base to convert the datetime for. This parameter accepts the location as a string (e.g., Los Angeles, CA), a longitude and latitude (e.g., -31.4173391,-64.183319) , or an IP address (e.g., 82.111.111.111)" + }, + { + "name": "target_location", + "in": "query", + "required": true, + "type": "string", + "x-ms-summary": "Target location", + "description": "The location you want to get the datetime for. This parameter accepts the location as a string (e.g., Los Angeles, CA), a longitude and latitude (e.g., -31.4173391,-64.183319) , or an IP address (e.g., 82.111.111.111)" + }, + { + "name": "base_datetime", + "in": "query", + "required": false, + "type": "string", + "x-ms-summary": "Base datetime", + "description": "The current datetime you\u2019re converting, expected format 'YYYY-MM-DD HH:MI:SS'. If empty, defaulted to 'now'." + } + ] + } + } + }, + "definitions": {}, + "parameters": {}, + "responses": {}, + "securityDefinitions": { + "API Key": { + "type": "apiKey", + "in": "query", + "name": "api_key" + } + }, + "security": [ + { + "API Key": [] + } + ], + "tags": [], + "x-ms-connector-metadata": [ + { + "propertyName": "Website", + "propertyValue": "https://docs.abstractapi.com/timezones" + }, + { + "propertyName": "Privacy policy", + "propertyValue": "https://www.abstractapi.com/legal/dpa" + }, + { + "propertyName": "Categories", + "propertyValue": "Data;Business Intelligence" + } + ] +} \ No newline at end of file diff --git a/independent-publisher-connectors/Abstract Timezones/apiProperties.json b/independent-publisher-connectors/Abstract Timezones/apiProperties.json new file mode 100644 index 0000000000..02a314b320 --- /dev/null +++ b/independent-publisher-connectors/Abstract Timezones/apiProperties.json @@ -0,0 +1,22 @@ +{ + "properties": { + "connectionParameters": { + "api_key": { + "type": "securestring", + "uiDefinition": { + "displayName": "API Key", + "description": "The API Key for this api", + "tooltip": "Provide your API Key", + "constraints": { + "tabIndex": 2, + "clearText": false, + "required": "true" + } + } + } + }, + "iconBrandColor": "#da3b01", + "capabilities": [], + "publisher": "System Administrator" + } +} \ No newline at end of file diff --git a/independent-publisher-connectors/Abstract Timezones/readme.md b/independent-publisher-connectors/Abstract Timezones/readme.md new file mode 100644 index 0000000000..72a4c5021c --- /dev/null +++ b/independent-publisher-connectors/Abstract Timezones/readme.md @@ -0,0 +1,25 @@ +# Abstract's Timezones +The Abstract Time, Date, and Timezone service is the easiest way to find, convert, and manage time and timezone data across the world. + +## Publisher: Fördős András + +## Prerequisites +An AbstractAPI account is required. You can sign up for a free plan or select from the paid memberships: [https://app.abstractapi.com/api/timezone/pricing](https://app.abstractapi.com/api/timezone/pricing) + +## Obtaining Credentials +This connector uses API-Key authentication. Once signed up, visit your profile home page to get your API-Key: [https://app.abstractapi.com/api/timezone/tester](https://app.abstractapi.com/api/timezone/tester) + +## Supported Operations + +### Convert time +Convert the time and date of a given location to the time and date of another location. By default it converts the current time, but the conversion can take place in either the past or future with a simple parameter. + +### Current time +The current_time endpoint take a location in the form of a location name, latitude and longitude, or IP address and returns the current time, date, and timezone of that location. + +## Known Issues and Limitations + +There are no known issues or limitations regarding the connector. +Please reach out and connect me when you see the need for any additional extension and let us collaborate! + +Important note, that the underlying service has various limitations applied (rates and data) based on your membership. \ No newline at end of file