Skip to content

Commit

Permalink
init abstract time (#3169)
Browse files Browse the repository at this point in the history
  • Loading branch information
fordosa90 authored Feb 28, 2024
1 parent 41a480e commit c0a159e
Show file tree
Hide file tree
Showing 3 changed files with 326 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,279 @@
{
"swagger": "2.0",
"info": {
"title": "Abstract Timezones",
"contact": {
"name": "Fördős András",
"email": "[email protected]"
},
"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"
}
]
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
25 changes: 25 additions & 0 deletions independent-publisher-connectors/Abstract Timezones/readme.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit c0a159e

Please sign in to comment.