655 строки
22 KiB
JSON
655 строки
22 KiB
JSON
{
|
||
"swagger": "2.0",
|
||
"info": {
|
||
"title": "Calculate Working Day",
|
||
"description": "The Calculate Working Day connector is a tool for developers to easily compute a valid working day, accommodating a range of requirements from basic to complex scenarios.",
|
||
"version": "1.0",
|
||
"contact": {
|
||
"name": "Mightora.io",
|
||
"url": "https://mightora.io/calculate-working-day/",
|
||
"email": "support@mightora.io"
|
||
}
|
||
},
|
||
"host": "api.mightora.io",
|
||
"x-ms-connector-metadata": [
|
||
{
|
||
"propertyName": "Website",
|
||
"propertyValue": "https://mightora.io"
|
||
},
|
||
{
|
||
"propertyName": "Privacy policy",
|
||
"propertyValue": "https://mightora.io/privacy/"
|
||
},
|
||
{
|
||
"propertyName": "Categories",
|
||
"propertyValue": "Marketing;Data"
|
||
}
|
||
],
|
||
"basePath": "/calculate-working-day/",
|
||
"schemes": [
|
||
"https"
|
||
],
|
||
"consumes": [],
|
||
"produces": [],
|
||
"paths": {
|
||
"/combined/": {
|
||
"get": {
|
||
"responses": {
|
||
"200": {
|
||
"description": "default",
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"input_date": {
|
||
"type": "string",
|
||
"description": "input_date",
|
||
"title": "Input Date",
|
||
"x-ms-summary": "Input Date"
|
||
},
|
||
"is_input_date_a_working_day": {
|
||
"type": "boolean",
|
||
"description": "is_input_date_a_working_day",
|
||
"title": "Is input date a working day",
|
||
"x-ms-summary": "Is input date a working day"
|
||
},
|
||
"working_days": {
|
||
"type": "array",
|
||
"description": "working_days",
|
||
"title": "Working Days",
|
||
"x-ms-summary": "Working Days",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"working_days_in_words": {
|
||
"type": "array",
|
||
"description": "working_days_in_words",
|
||
"title": "Working Days in Words",
|
||
"x-ms-summary": "Working Days in Words",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"non_working_days": {
|
||
"type": "array",
|
||
"description": "non_working_days",
|
||
"title": "Working Days in Words",
|
||
"x-ms-summary": "Working Days in Words",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"next_working_day": {
|
||
"type": "string",
|
||
"description": "next_working_day",
|
||
"title": "Next working day",
|
||
"x-ms-summary": "Next working day"
|
||
},
|
||
"x_days": {
|
||
"type": "integer",
|
||
"description": "x_days",
|
||
"title": "Next working day",
|
||
"x-ms-summary": "Next working day",
|
||
"format": "int32"
|
||
},
|
||
"working_day_in_x_days": {
|
||
"type": "string",
|
||
"description": "working_day_in_x_days",
|
||
"title": "Working day in x days",
|
||
"x-ms-summary": "Working day in x days"
|
||
},
|
||
"first_working_day_of_month": {
|
||
"type": "string",
|
||
"description": "first_working_day_of_month",
|
||
"title": "First Working day of month",
|
||
"x-ms-summary": "First Working day of month"
|
||
},
|
||
"last_working_day_of_month": {
|
||
"type": "string",
|
||
"description": "last_working_day_of_month",
|
||
"title": "Last working day of month",
|
||
"x-ms-summary": "Last working day of month"
|
||
},
|
||
"more_info": {
|
||
"type": "string",
|
||
"description": "more_info",
|
||
"title": "More info",
|
||
"x-ms-summary": "More info"
|
||
},
|
||
"message_from_developer": {
|
||
"type": "string",
|
||
"description": "message_from_developer",
|
||
"title": "Message from developer",
|
||
"x-ms-summary": "Message from developer"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"summary": "Combination of all Calculate Working Day Endpoints",
|
||
"operationId": "Combined",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/parameters/cf"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/endpoint"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/date"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/workingDays"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/nonWorkingDays"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/xWorkingDays"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/country"
|
||
}
|
||
],
|
||
"description": "Performs a combination of all of the endpoints in one response. For more information please see https://mightora.io/calculate-working-day"
|
||
}
|
||
},
|
||
"/basicNextWorkingDay/": {
|
||
"get": {
|
||
"responses": {
|
||
"200": {
|
||
"description": "default",
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"input_date": {
|
||
"type": "string",
|
||
"description": "input_date",
|
||
"title": "Input Date",
|
||
"x-ms-summary": "Input Date"
|
||
},
|
||
"next_working_day": {
|
||
"type": "string",
|
||
"description": "next_working_day",
|
||
"title": "Next working day",
|
||
"x-ms-summary": "Next working day"
|
||
},
|
||
"more_info": {
|
||
"type": "string",
|
||
"description": "more_info",
|
||
"title": "More info",
|
||
"x-ms-summary": "More info"
|
||
},
|
||
"message_from_developer": {
|
||
"type": "string",
|
||
"description": "message_from_developer",
|
||
"title": "Message from developer",
|
||
"x-ms-summary": "Message from developer"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"summary": "Basic Next Working Day",
|
||
"description": "Finds the next working day based on a working week of Monday to Friday.",
|
||
"operationId": "BasicNextWorkingDay",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/parameters/cf"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/endpoint"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/date"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"/nextWorkingDay/": {
|
||
"get": {
|
||
"responses": {
|
||
"200": {
|
||
"description": "default",
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"input_date": {
|
||
"type": "string",
|
||
"description": "input_date",
|
||
"title": "Input Date",
|
||
"x-ms-summary": "Input Date"
|
||
},
|
||
"working_days": {
|
||
"type": "array",
|
||
"description": "working_days",
|
||
"title": "Working Days",
|
||
"x-ms-summary": "Working Days",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"working_days_in_words": {
|
||
"type": "array",
|
||
"description": "working_days_in_words",
|
||
"title": "Working Days in Words",
|
||
"x-ms-summary": "Working Days in Words",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"non_working_days": {
|
||
"type": "array",
|
||
"description": "non_working_days",
|
||
"title": "Working Days in Words",
|
||
"x-ms-summary": "Working Days in Words",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"next_working_day": {
|
||
"type": "string",
|
||
"description": "next_working_day",
|
||
"title": "Next working day",
|
||
"x-ms-summary": "Next working day"
|
||
},
|
||
"more_info": {
|
||
"type": "string",
|
||
"description": "more_info",
|
||
"title": "More info",
|
||
"x-ms-summary": "More info"
|
||
},
|
||
"message_from_developer": {
|
||
"type": "string",
|
||
"description": "message_from_developer",
|
||
"title": "Message from developer",
|
||
"x-ms-summary": "Message from developer"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"summary": "Next Working Day",
|
||
"operationId": "NextWorkingDay",
|
||
"description": "This action uses multiple variables to determine what your working days are in order to return the correct Next Working Day after the date you provide. ",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/parameters/cf"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/endpoint"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/date"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/workingDays"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/nonWorkingDays"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/xWorkingDays"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"/firstAndLastWorkingDayOfMonth/": {
|
||
"get": {
|
||
"responses": {
|
||
"200": {
|
||
"description": "default",
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"input_date": {
|
||
"type": "string",
|
||
"description": "input_date",
|
||
"title": "Input Date",
|
||
"x-ms-summary": "Input Date"
|
||
},
|
||
"working_days": {
|
||
"type": "array",
|
||
"description": "working_days",
|
||
"title": "Working Days",
|
||
"x-ms-summary": "Working Days",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"working_days_in_words": {
|
||
"type": "array",
|
||
"description": "working_days_in_words",
|
||
"title": "Working Days in Words",
|
||
"x-ms-summary": "Working Days in Words",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"non_working_days": {
|
||
"type": "array",
|
||
"description": "non_working_days",
|
||
"title": "Working Days in Words",
|
||
"x-ms-summary": "Working Days in Words",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"first_working_day_of_month": {
|
||
"type": "string",
|
||
"description": "first_working_day_of_month",
|
||
"title": "First Working day of month",
|
||
"x-ms-summary": "First Working day of month"
|
||
},
|
||
"last_working_day_of_month": {
|
||
"type": "string",
|
||
"description": "last_working_day_of_month",
|
||
"title": "Last working day of month",
|
||
"x-ms-summary": "Last working day of month"
|
||
},
|
||
"more_info": {
|
||
"type": "string",
|
||
"description": "more_info",
|
||
"title": "More info",
|
||
"x-ms-summary": "More info"
|
||
},
|
||
"message_from_developer": {
|
||
"type": "string",
|
||
"description": "message_from_developer",
|
||
"title": "Message from developer",
|
||
"x-ms-summary": "Message from developer"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"summary": "First And Last Working Day Of Month",
|
||
"operationId": "FirstAndLastWorkingDayOfMonth",
|
||
"description": "This action uses multiple variables to determine what your First and Last working days of a given month are. ",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/parameters/cf"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/endpoint"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/date"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/workingDays"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"/isTodayAWorkingDay/": {
|
||
"get": {
|
||
"responses": {
|
||
"200": {
|
||
"description": "default",
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"input_date": {
|
||
"type": "string",
|
||
"description": "input_date",
|
||
"title": "Input Date",
|
||
"x-ms-summary": "Input Date"
|
||
},
|
||
"is_input_date_a_working_day": {
|
||
"type": "boolean",
|
||
"description": "is_input_date_a_working_day",
|
||
"title": "Is input date a working day",
|
||
"x-ms-summary": "Is input date a working day"
|
||
},
|
||
"working_days": {
|
||
"type": "array",
|
||
"description": "working_days",
|
||
"title": "Working Days",
|
||
"x-ms-summary": "Working Days",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"working_days_in_words": {
|
||
"type": "array",
|
||
"description": "working_days_in_words",
|
||
"title": "Working Days in Words",
|
||
"x-ms-summary": "Working Days in Words",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"non_working_days": {
|
||
"type": "array",
|
||
"description": "non_working_days",
|
||
"title": "Working Days in Words",
|
||
"x-ms-summary": "Working Days in Words",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"more_info": {
|
||
"type": "string",
|
||
"description": "more_info",
|
||
"title": "More info",
|
||
"x-ms-summary": "More info"
|
||
},
|
||
"message_from_developer": {
|
||
"type": "string",
|
||
"description": "message_from_developer",
|
||
"title": "Message from developer",
|
||
"x-ms-summary": "Message from developer"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"summary": "Is Today A Working Day",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/parameters/cf"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/endpoint"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/date"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/workingDays"
|
||
}
|
||
],
|
||
"description": "This action uses multiple variables to determine if today is a working day for you.",
|
||
"operationId": "IsTodayAWorkingDay"
|
||
}
|
||
},
|
||
"/dateInXWorkingDays/": {
|
||
"get": {
|
||
"responses": {
|
||
"200": {
|
||
"description": "default",
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"input_date": {
|
||
"type": "string",
|
||
"description": "input_date",
|
||
"title": "Input Date",
|
||
"x-ms-summary": "Input Date"
|
||
},
|
||
"working_days": {
|
||
"type": "array",
|
||
"description": "working_days",
|
||
"title": "Working Days",
|
||
"x-ms-summary": "Working Days",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"working_days_in_words": {
|
||
"type": "array",
|
||
"description": "working_days_in_words",
|
||
"title": "Working Days in Words",
|
||
"x-ms-summary": "Working Days in Words",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"non_working_days": {
|
||
"type": "array",
|
||
"description": "non_working_days",
|
||
"title": "Working Days in Words",
|
||
"x-ms-summary": "Working Days in Words",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"x_days": {
|
||
"type": "integer",
|
||
"description": "x_days",
|
||
"title": "Next working day",
|
||
"x-ms-summary": "Next working day",
|
||
"format": "int32"
|
||
},
|
||
"working_day_in_x_days": {
|
||
"type": "string",
|
||
"description": "working_day_in_x_days",
|
||
"title": "Working day in x days",
|
||
"x-ms-summary": "Working day in x days"
|
||
},
|
||
"more_info": {
|
||
"type": "string",
|
||
"description": "more_info",
|
||
"title": "More info",
|
||
"x-ms-summary": "More info"
|
||
},
|
||
"message_from_developer": {
|
||
"type": "string",
|
||
"description": "message_from_developer",
|
||
"title": "Message from developer",
|
||
"x-ms-summary": "Message from developer"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"summary": "Date In X Working Days",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/parameters/cf"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/endpoint"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/date"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/workingDays"
|
||
},
|
||
{
|
||
"$ref": "#/parameters/xWorkingDays"
|
||
}
|
||
],
|
||
"description": "This action uses multiple variables to determine what the working day will be in X working days’ time.",
|
||
"operationId": "DateInXWorkingDays"
|
||
}
|
||
}
|
||
},
|
||
"definitions": {},
|
||
"parameters": {
|
||
"endpoint": {
|
||
"name": "endpoint",
|
||
"in": "query",
|
||
"required": true,
|
||
"type": "string",
|
||
"default": "RapidAPI",
|
||
"x-ms-summary": "API Endpoint Host",
|
||
"x-ms-visibility": "important",
|
||
"description": "The API Endpoint Host you wish to use",
|
||
"enum": [
|
||
"RapidAPI",
|
||
"Blobr"
|
||
]
|
||
},
|
||
"cf": {
|
||
"name": "cf",
|
||
"in": "header",
|
||
"required": true,
|
||
"type": "string",
|
||
"default": "sk",
|
||
"x-ms-visibility": "internal",
|
||
"description": "Traffic might be blocked if not used"
|
||
},
|
||
"date": {
|
||
"name": "date",
|
||
"in": "query",
|
||
"required": true,
|
||
"type": "string",
|
||
"default": "2022-12-23",
|
||
"x-ms-summary": "Date",
|
||
"x-ms-visibility": "important",
|
||
"description": "This is the input date in YYYY-MM-DD format. e.g. 2022-12-23"
|
||
},
|
||
"workingDays": {
|
||
"name": "working_days",
|
||
"in": "query",
|
||
"required": true,
|
||
"type": "string",
|
||
"default": "1,2,3,4,5",
|
||
"description": "This parameter expects a comma-separated list of working days, where Monday is 1, Tuesday is 2, and so on. In the default, we\u0027re using all weekdays from Monday to Friday, so the value is \u00221,2,3,4,5\u0022.",
|
||
"x-ms-summary": "Working Days",
|
||
"x-ms-visibility": "important"
|
||
},
|
||
"nonWorkingDays": {
|
||
"name": "non_working_days",
|
||
"in": "query",
|
||
"required": false,
|
||
"type": "string",
|
||
"description": "A custom list of non working days, this could be a list of days where service is not available. In a string as a list, format YYYY-MM-DD,YYYY-MM-DD e.g. 2022-12-28,2022-12-29,2022-12-30",
|
||
"x-ms-summary": "Non working days",
|
||
"x-ms-visibility": "important"
|
||
},
|
||
"xWorkingDays": {
|
||
"name": "x_working_days",
|
||
"in": "query",
|
||
"required": true,
|
||
"type": "integer",
|
||
"default": 4,
|
||
"description": "Find working day in X days e.g. 4",
|
||
"x-ms-summary": "In X working days",
|
||
"x-ms-visibility": "important"
|
||
},
|
||
"country": {
|
||
"name": "country",
|
||
"in": "query",
|
||
"required": false,
|
||
"type": "string",
|
||
"default": "scotland",
|
||
"x-ms-summary": "Filter bank holidays for Country",
|
||
"x-ms-visibility": "important",
|
||
"description": "Currently only the United Kindom is supported",
|
||
"enum": [
|
||
"england-and-wales",
|
||
"scotland",
|
||
"northern-ireland"
|
||
]
|
||
}
|
||
},
|
||
"responses": {},
|
||
"securityDefinitions": {
|
||
"api_key": {
|
||
"type": "apiKey",
|
||
"in": "header",
|
||
"name": "x-mightora-key"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"API Key": []
|
||
}
|
||
],
|
||
"tags": []
|
||
}
|