You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2026-05-22 10:05:29 +02:00
Main build (Jenkins)
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||||
Region = "BTC";
|
Region = "BTC";
|
||||||
|
|
||||||
Authorization = OPI_S3.GetAuthStructure(URL, AccessKey, SecretKey, Region);
|
Authorization = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||||
|
|
||||||
Name = "newbucket2";
|
Name = "newbucket2";
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||||
Region = "BTC";
|
Region = "BTC";
|
||||||
|
|
||||||
Authorization = OPI_S3.GetAuthStructure(URL, AccessKey, SecretKey, Region);
|
Authorization = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||||
|
|
||||||
Name = "newbucket2";
|
Name = "newbucket2";
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import TabItem from '@theme/TabItem';
|
|||||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||||
Region = "BTC";
|
Region = "BTC";
|
||||||
|
|
||||||
Authorization = OPI_S3.GetAuthStructure(URL, AccessKey, SecretKey, Region);
|
Authorization = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||||
|
|
||||||
Name = "newbucket2";
|
Name = "newbucket2";
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import TabItem from '@theme/TabItem';
|
|||||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||||
Region = "BTC";
|
Region = "BTC";
|
||||||
|
|
||||||
Authorization = OPI_S3.GetAuthStructure(URL, AccessKey, SecretKey, Region);
|
Authorization = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||||
|
|
||||||
Name = "newbucket2";
|
Name = "newbucket2";
|
||||||
|
|
||||||
|
|||||||
@@ -80,4 +80,86 @@ Method at API documentation: [Creating a counter](https://yandex.ru/dev/metrika/
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```json title="Result"
|
||||||
|
{
|
||||||
|
"counter": {
|
||||||
|
"id": 98905589,
|
||||||
|
"status": "Active",
|
||||||
|
"owner_login": "bayselonarrend",
|
||||||
|
"code_status": "CS_ERR_UNKNOWN",
|
||||||
|
"activity_status": "low",
|
||||||
|
"type": "simple",
|
||||||
|
"favorite": 0,
|
||||||
|
"hide_address": 0,
|
||||||
|
"pro": 0,
|
||||||
|
"permission": "own",
|
||||||
|
"webvisor": {
|
||||||
|
"arch_enabled": 0,
|
||||||
|
"arch_type": "none",
|
||||||
|
"load_player_type": "proxy",
|
||||||
|
"wv_version": 2,
|
||||||
|
"allow_wv2": true,
|
||||||
|
"wv_forms": 1
|
||||||
|
},
|
||||||
|
"code_options": {
|
||||||
|
"async": 0,
|
||||||
|
"informer": {
|
||||||
|
"enabled": 1,
|
||||||
|
"type": "ext",
|
||||||
|
"size": 2,
|
||||||
|
"indicator": "uniques",
|
||||||
|
"color_start": "EEEEEEEE",
|
||||||
|
"color_end": "EFEFEFFE",
|
||||||
|
"color_text": 0,
|
||||||
|
"color_arrow": 1
|
||||||
|
},
|
||||||
|
"visor": 1,
|
||||||
|
"track_hash": 1,
|
||||||
|
"xml_site": 0,
|
||||||
|
"clickmap": 1,
|
||||||
|
"in_one_line": 0,
|
||||||
|
"ecommerce": 1,
|
||||||
|
"alternative_cdn": 1,
|
||||||
|
"ecommerce_object": "dataLayer",
|
||||||
|
"ytm": false
|
||||||
|
},
|
||||||
|
"create_time": "2024-11-13T10:44:59+03:00",
|
||||||
|
"time_zone_name": "Europe/Moscow",
|
||||||
|
"time_zone_offset": 180,
|
||||||
|
"partner_id": 0,
|
||||||
|
"update_time": "2024-11-13 10:45:00",
|
||||||
|
"code": "<!-- Yandex.Metrika informer -->\n<a href=\"https://metrica.yandex.com/stat/?id=98905589&from=informer\" target=\"_blank\" rel=\"nofollow\">\n <img src=\"//bs.yandex.ru/informer/98905589/2_1_EEEEEEEE_EFEFEFFE_0_uniques\"\n style=\"width:80px; height:31px; border:0;\"\n alt=\"Yandex.Metrica\"\n title=\"Yandex.Metrica: data for today (unique users)\"\n onclick=\"try{Ya.Metrika.informer({i:this,id:98905589,lang:'en'});return false}catch(e){}\"/>\n</a>\n<!-- /Yandex.Metrika informer -->\n\n<!-- Yandex.Metrika counter -->\n<script type=\"text/javascript\">\n (function(m,e,t,r,i,k,a){\n m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};\n m[i].l=1*new Date();\n k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)\n })(window, document,'script','//mc.webvisor.org/metrika/tag_ww.js', 'ym');\n\n ym(98905589, 'init', {accurateTrackBounce:true, trackLinks:true, webvisor:true, trackHash:true, clickmap:true, ecommerce:\"dataLayer\", params: {__ym: {isFromApi: 'yesIsFromApi'}}});\n</script>\n<noscript><div><img src=\"https://mc.yandex.ru/watch/98905589\" style=\"position:absolute; left:-9999px;\" alt=\"\" /></div></noscript>\n<!-- /Yandex.Metrika counter -->\n\n\n",
|
||||||
|
"monitoring": {
|
||||||
|
"enable_monitoring": 0,
|
||||||
|
"emails": [],
|
||||||
|
"sms_allowed": 1,
|
||||||
|
"enable_sms": 0,
|
||||||
|
"phones": [],
|
||||||
|
"phone_ids": [],
|
||||||
|
"possible_phones": [
|
||||||
|
"+37544*****91"
|
||||||
|
],
|
||||||
|
"possible_phone_ids": [
|
||||||
|
598854008
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"filter_robots": 2,
|
||||||
|
"currency": 643,
|
||||||
|
"currency_code": "RUB",
|
||||||
|
"visit_threshold": 1800,
|
||||||
|
"max_goals": 200,
|
||||||
|
"max_operations": 30,
|
||||||
|
"max_filters": 30,
|
||||||
|
"features": [
|
||||||
|
"webvisor2"
|
||||||
|
],
|
||||||
|
"site": "openintegrations.dev",
|
||||||
|
"site2": {
|
||||||
|
"site": "openintegrations.dev",
|
||||||
|
"domain": "openintegrations.dev"
|
||||||
|
},
|
||||||
|
"gdpr_agreement_accepted": 1,
|
||||||
|
"autogoals_enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
@@ -38,4 +38,8 @@ Method at API documentation: [Deleting a counter](https://yandex.ru/dev/metrika/
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```json title="Result"
|
||||||
|
{
|
||||||
|
"success": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
@@ -38,4 +38,86 @@ Method at API documentation: [Counter information](https://yandex.ru/dev/metrika
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```json title="Result"
|
||||||
|
{
|
||||||
|
"counter": {
|
||||||
|
"id": 98905589,
|
||||||
|
"status": "Active",
|
||||||
|
"owner_login": "bayselonarrend",
|
||||||
|
"code_status": "CS_ERR_UNKNOWN",
|
||||||
|
"activity_status": "low",
|
||||||
|
"type": "simple",
|
||||||
|
"favorite": 0,
|
||||||
|
"hide_address": 0,
|
||||||
|
"pro": 0,
|
||||||
|
"permission": "own",
|
||||||
|
"webvisor": {
|
||||||
|
"arch_enabled": 0,
|
||||||
|
"arch_type": "none",
|
||||||
|
"load_player_type": "proxy",
|
||||||
|
"wv_version": 2,
|
||||||
|
"allow_wv2": true,
|
||||||
|
"wv_forms": 1
|
||||||
|
},
|
||||||
|
"code_options": {
|
||||||
|
"async": 0,
|
||||||
|
"informer": {
|
||||||
|
"enabled": 1,
|
||||||
|
"type": "ext",
|
||||||
|
"size": 2,
|
||||||
|
"indicator": "uniques",
|
||||||
|
"color_start": "EEEEEEEE",
|
||||||
|
"color_end": "EFEFEFFE",
|
||||||
|
"color_text": 0,
|
||||||
|
"color_arrow": 1
|
||||||
|
},
|
||||||
|
"visor": 1,
|
||||||
|
"track_hash": 1,
|
||||||
|
"xml_site": 0,
|
||||||
|
"clickmap": 1,
|
||||||
|
"in_one_line": 0,
|
||||||
|
"ecommerce": 1,
|
||||||
|
"alternative_cdn": 1,
|
||||||
|
"ecommerce_object": "dataLayer",
|
||||||
|
"ytm": false
|
||||||
|
},
|
||||||
|
"create_time": "2024-11-13T10:44:59+03:00",
|
||||||
|
"time_zone_name": "Europe/Moscow",
|
||||||
|
"time_zone_offset": 180,
|
||||||
|
"partner_id": 0,
|
||||||
|
"update_time": "2024-11-13 10:45:00",
|
||||||
|
"code": "<!-- Yandex.Metrika informer -->\n<a href=\"https://metrica.yandex.com/stat/?id=98905589&from=informer\" target=\"_blank\" rel=\"nofollow\">\n <img src=\"//bs.yandex.ru/informer/98905589/2_1_EEEEEEEE_EFEFEFFE_0_uniques\"\n style=\"width:80px; height:31px; border:0;\"\n alt=\"Yandex.Metrica\"\n title=\"Yandex.Metrica: data for today (unique users)\"\n onclick=\"try{Ya.Metrika.informer({i:this,id:98905589,lang:'en'});return false}catch(e){}\"/>\n</a>\n<!-- /Yandex.Metrika informer -->\n\n<!-- Yandex.Metrika counter -->\n<script type=\"text/javascript\">\n (function(m,e,t,r,i,k,a){\n m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};\n m[i].l=1*new Date();\n k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)\n })(window, document,'script','//mc.webvisor.org/metrika/tag_ww.js', 'ym');\n\n ym(98905589, 'init', {accurateTrackBounce:true, trackLinks:true, webvisor:true, trackHash:true, clickmap:true, ecommerce:\"dataLayer\", params: {__ym: {isFromApi: 'yesIsFromApi'}}});\n</script>\n<noscript><div><img src=\"https://mc.yandex.ru/watch/98905589\" style=\"position:absolute; left:-9999px;\" alt=\"\" /></div></noscript>\n<!-- /Yandex.Metrika counter -->\n\n\n",
|
||||||
|
"monitoring": {
|
||||||
|
"enable_monitoring": 0,
|
||||||
|
"emails": [],
|
||||||
|
"sms_allowed": 1,
|
||||||
|
"enable_sms": 0,
|
||||||
|
"phones": [],
|
||||||
|
"phone_ids": [],
|
||||||
|
"possible_phones": [
|
||||||
|
"+37544*****91"
|
||||||
|
],
|
||||||
|
"possible_phone_ids": [
|
||||||
|
598854008
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"filter_robots": 2,
|
||||||
|
"currency": 643,
|
||||||
|
"currency_code": "RUB",
|
||||||
|
"visit_threshold": 1800,
|
||||||
|
"max_goals": 200,
|
||||||
|
"max_operations": 30,
|
||||||
|
"max_filters": 30,
|
||||||
|
"features": [
|
||||||
|
"webvisor2"
|
||||||
|
],
|
||||||
|
"site": "openintegrations.dev",
|
||||||
|
"site2": {
|
||||||
|
"site": "openintegrations.dev",
|
||||||
|
"domain": "openintegrations.dev"
|
||||||
|
},
|
||||||
|
"gdpr_agreement_accepted": 1,
|
||||||
|
"autogoals_enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
@@ -49,4 +49,156 @@ Method at API documentation: [List of available counters](https://yandex.ru/dev/
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```json title="Result"
|
||||||
|
{
|
||||||
|
"rows": 4,
|
||||||
|
"counters": [
|
||||||
|
{
|
||||||
|
"id": 98905589,
|
||||||
|
"status": "Active",
|
||||||
|
"owner_login": "bayselonarrend",
|
||||||
|
"code_status": "CS_ERR_UNKNOWN",
|
||||||
|
"activity_status": "low",
|
||||||
|
"type": "simple",
|
||||||
|
"favorite": 0,
|
||||||
|
"hide_address": 0,
|
||||||
|
"pro": 0,
|
||||||
|
"permission": "own",
|
||||||
|
"webvisor": {
|
||||||
|
"arch_enabled": 0,
|
||||||
|
"arch_type": "none",
|
||||||
|
"load_player_type": "proxy",
|
||||||
|
"wv_version": 2,
|
||||||
|
"allow_wv2": true,
|
||||||
|
"wv_forms": 1
|
||||||
|
},
|
||||||
|
"code_options": {
|
||||||
|
"async": 0,
|
||||||
|
"informer": {
|
||||||
|
"enabled": 1,
|
||||||
|
"type": "ext",
|
||||||
|
"size": 2,
|
||||||
|
"indicator": "uniques",
|
||||||
|
"color_start": "EEEEEEEE",
|
||||||
|
"color_end": "EFEFEFFE",
|
||||||
|
"color_text": 0,
|
||||||
|
"color_arrow": 1
|
||||||
|
},
|
||||||
|
"visor": 1,
|
||||||
|
"track_hash": 1,
|
||||||
|
"xml_site": 0,
|
||||||
|
"clickmap": 1,
|
||||||
|
"in_one_line": 0,
|
||||||
|
"ecommerce": 1,
|
||||||
|
"alternative_cdn": 1,
|
||||||
|
"ecommerce_object": "dataLayer",
|
||||||
|
"ytm": false
|
||||||
|
},
|
||||||
|
"create_time": "2024-11-13T10:44:59+03:00",
|
||||||
|
"time_zone_name": "Europe/Moscow",
|
||||||
|
"time_zone_offset": 180,
|
||||||
|
"partner_id": 0,
|
||||||
|
"site": "openintegrations.dev",
|
||||||
|
"site2": {
|
||||||
|
"site": "openintegrations.dev",
|
||||||
|
"domain": "openintegrations.dev"
|
||||||
|
},
|
||||||
|
"gdpr_agreement_accepted": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 97292922,
|
||||||
|
"status": "Active",
|
||||||
|
"owner_login": "bayselonarrend",
|
||||||
|
"code_status": "CS_ERR_UNKNOWN",
|
||||||
|
"activity_status": "low",
|
||||||
|
"name": "OpenIntegrations",
|
||||||
|
"type": "simple",
|
||||||
|
"favorite": 0,
|
||||||
|
"hide_address": 0,
|
||||||
|
"pro": 0,
|
||||||
|
"permission": "own",
|
||||||
|
"webvisor": {
|
||||||
|
"arch_enabled": 0,
|
||||||
|
"arch_type": "none",
|
||||||
|
"load_player_type": "proxy",
|
||||||
|
"wv_version": 2,
|
||||||
|
"allow_wv2": true,
|
||||||
|
"wv_forms": 1
|
||||||
|
},
|
||||||
|
"code_options": {
|
||||||
|
"async": 1,
|
||||||
|
"informer": {
|
||||||
|
"enabled": 0,
|
||||||
|
"type": "ext",
|
||||||
|
"size": 3,
|
||||||
|
"indicator": "pageviews",
|
||||||
|
"color_start": "FFFFFFFF",
|
||||||
|
"color_end": "EFEFEFFF",
|
||||||
|
"color_text": 0,
|
||||||
|
"color_arrow": 1
|
||||||
|
},
|
||||||
|
"visor": 0,
|
||||||
|
"track_hash": 0,
|
||||||
|
"xml_site": 0,
|
||||||
|
"clickmap": 1,
|
||||||
|
"in_one_line": 0,
|
||||||
|
"ecommerce": 0,
|
||||||
|
"alternative_cdn": 0,
|
||||||
|
"ecommerce_object": "dataLayer",
|
||||||
|
"ytm": false
|
||||||
|
},
|
||||||
|
"create_time": "2024-05-15T16:55:09+03:00",
|
||||||
|
"time_zone_name": "Europe/Minsk",
|
||||||
|
"time_zone_offset": 180,
|
||||||
|
"partner_id": 0,
|
||||||
|
"site": "openintegrations.dev",
|
||||||
|
"site2": {
|
||||||
|
"site": "openintegrations.dev",
|
||||||
|
"domain": "openintegrations.dev"
|
||||||
|
},
|
||||||
|
"gdpr_agreement_accepted": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 98234044,
|
||||||
|
"status": "Active",
|
||||||
|
"owner_login": "bayselonarrend",
|
||||||
|
"code_status": "CS_ERR_UNKNOWN",
|
||||||
|
"activity_status": "low",
|
||||||
|
"name": "OpenYellow",
|
||||||
|
"type": "simple",
|
||||||
|
"favorite": 0,
|
||||||
|
"hide_address": 0,
|
||||||
|
"pro": 0,
|
||||||
|
"permission": "own",
|
||||||
|
"webvisor": {
|
||||||
|
"arch_enabled": 0,
|
||||||
|
"arch_type": "none",
|
||||||
|
"load_player_type": "proxy",
|
||||||
|
"wv_version": 2,
|
||||||
|
"allow_wv2": true,
|
||||||
|
"wv_forms": 1
|
||||||
|
},
|
||||||
|
"code_options": {
|
||||||
|
"async": 1,
|
||||||
|
"informer": {
|
||||||
|
"enabled": 0,
|
||||||
|
"type": "ext",
|
||||||
|
"size": 3,
|
||||||
|
"indicator": "pageviews",
|
||||||
|
"color_start": "FFFFFFFF",
|
||||||
|
"color_end": "EFEFEFFF",
|
||||||
|
"color_text": 0,
|
||||||
|
"color_arrow": 1
|
||||||
|
},
|
||||||
|
"visor": 0,
|
||||||
|
"track_hash": 0,
|
||||||
|
"xml_site": 0,
|
||||||
|
"clickmap": 1,
|
||||||
|
"in_one_line": 0,
|
||||||
|
"ecommerce": 0,
|
||||||
|
"alternative_cdn": 0,
|
||||||
|
"ecommerce_object": "dataLayer",
|
||||||
|
"ytm": false
|
||||||
|
},
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|||||||
@@ -38,4 +38,8 @@ Method at API documentation: [Restoring a counter](https://yandex.ru/dev/metrika
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```json title="Result"
|
||||||
|
{
|
||||||
|
"success": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
@@ -52,4 +52,86 @@ Method at API documentation: [Changing a counter](https://yandex.ru/dev/metrika/
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```json title="Result"
|
||||||
|
{
|
||||||
|
"counter": {
|
||||||
|
"id": 98905589,
|
||||||
|
"status": "Active",
|
||||||
|
"owner_login": "bayselonarrend",
|
||||||
|
"code_status": "CS_ERR_UNKNOWN",
|
||||||
|
"activity_status": "low",
|
||||||
|
"type": "simple",
|
||||||
|
"favorite": 0,
|
||||||
|
"hide_address": 0,
|
||||||
|
"pro": 0,
|
||||||
|
"permission": "own",
|
||||||
|
"webvisor": {
|
||||||
|
"arch_enabled": 0,
|
||||||
|
"arch_type": "none",
|
||||||
|
"load_player_type": "proxy",
|
||||||
|
"wv_version": 2,
|
||||||
|
"allow_wv2": true,
|
||||||
|
"wv_forms": 1
|
||||||
|
},
|
||||||
|
"code_options": {
|
||||||
|
"async": 0,
|
||||||
|
"informer": {
|
||||||
|
"enabled": 1,
|
||||||
|
"type": "ext",
|
||||||
|
"size": 2,
|
||||||
|
"indicator": "uniques",
|
||||||
|
"color_start": "EEEEEEEE",
|
||||||
|
"color_end": "EFEFEFFE",
|
||||||
|
"color_text": 0,
|
||||||
|
"color_arrow": 1
|
||||||
|
},
|
||||||
|
"visor": 1,
|
||||||
|
"track_hash": 1,
|
||||||
|
"xml_site": 0,
|
||||||
|
"clickmap": 1,
|
||||||
|
"in_one_line": 0,
|
||||||
|
"ecommerce": 1,
|
||||||
|
"alternative_cdn": 1,
|
||||||
|
"ecommerce_object": "dataLayer",
|
||||||
|
"ytm": false
|
||||||
|
},
|
||||||
|
"create_time": "2024-11-13T10:44:59+03:00",
|
||||||
|
"time_zone_name": "Europe/Moscow",
|
||||||
|
"time_zone_offset": 180,
|
||||||
|
"partner_id": 0,
|
||||||
|
"update_time": "2024-11-13 10:45:00",
|
||||||
|
"code": "<!-- Yandex.Metrika informer -->\n<a href=\"https://metrica.yandex.com/stat/?id=98905589&from=informer\" target=\"_blank\" rel=\"nofollow\">\n <img src=\"//bs.yandex.ru/informer/98905589/2_1_EEEEEEEE_EFEFEFFE_0_uniques\"\n style=\"width:80px; height:31px; border:0;\"\n alt=\"Yandex.Metrica\"\n title=\"Yandex.Metrica: data for today (unique users)\"\n onclick=\"try{Ya.Metrika.informer({i:this,id:98905589,lang:'en'});return false}catch(e){}\"/>\n</a>\n<!-- /Yandex.Metrika informer -->\n\n<!-- Yandex.Metrika counter -->\n<script type=\"text/javascript\">\n (function(m,e,t,r,i,k,a){\n m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};\n m[i].l=1*new Date();\n k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)\n })(window, document,'script','//mc.webvisor.org/metrika/tag_ww.js', 'ym');\n\n ym(98905589, 'init', {accurateTrackBounce:true, trackLinks:true, webvisor:true, trackHash:true, clickmap:true, ecommerce:\"dataLayer\", params: {__ym: {isFromApi: 'yesIsFromApi'}}});\n</script>\n<noscript><div><img src=\"https://mc.yandex.ru/watch/98905589\" style=\"position:absolute; left:-9999px;\" alt=\"\" /></div></noscript>\n<!-- /Yandex.Metrika counter -->\n\n\n",
|
||||||
|
"monitoring": {
|
||||||
|
"enable_monitoring": 0,
|
||||||
|
"emails": [],
|
||||||
|
"sms_allowed": 1,
|
||||||
|
"enable_sms": 0,
|
||||||
|
"phones": [],
|
||||||
|
"phone_ids": [],
|
||||||
|
"possible_phones": [
|
||||||
|
"+37544*****91"
|
||||||
|
],
|
||||||
|
"possible_phone_ids": [
|
||||||
|
598854008
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"filter_robots": 1,
|
||||||
|
"currency": 643,
|
||||||
|
"currency_code": "RUB",
|
||||||
|
"visit_threshold": 1800,
|
||||||
|
"max_goals": 200,
|
||||||
|
"max_operations": 30,
|
||||||
|
"max_filters": 30,
|
||||||
|
"features": [
|
||||||
|
"webvisor2"
|
||||||
|
],
|
||||||
|
"site": "openintegrations.dev",
|
||||||
|
"site2": {
|
||||||
|
"site": "openintegrations.dev",
|
||||||
|
"domain": "openintegrations.dev"
|
||||||
|
},
|
||||||
|
"gdpr_agreement_accepted": 1,
|
||||||
|
"autogoals_enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||||
Region = "BTC";
|
Region = "BTC";
|
||||||
|
|
||||||
Авторизация = OPI_S3.ПолучитьСтруктуруАвторизации(URL, AccessKey, SecretKey, Region);
|
Авторизация = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||||
|
|
||||||
Имя = "newbucket2";
|
Имя = "newbucket2";
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||||
Region = "BTC";
|
Region = "BTC";
|
||||||
|
|
||||||
Авторизация = OPI_S3.ПолучитьСтруктуруАвторизации(URL, AccessKey, SecretKey, Region);
|
Авторизация = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||||
|
|
||||||
Имя = "newbucket2";
|
Имя = "newbucket2";
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import TabItem from '@theme/TabItem';
|
|||||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||||
Region = "BTC";
|
Region = "BTC";
|
||||||
|
|
||||||
Авторизация = OPI_S3.ПолучитьСтруктуруАвторизации(URL, AccessKey, SecretKey, Region);
|
Авторизация = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||||
|
|
||||||
Имя = "newbucket2";
|
Имя = "newbucket2";
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import TabItem from '@theme/TabItem';
|
|||||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||||
Region = "BTC";
|
Region = "BTC";
|
||||||
|
|
||||||
Авторизация = OPI_S3.ПолучитьСтруктуруАвторизации(URL, AccessKey, SecretKey, Region);
|
Авторизация = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||||
|
|
||||||
Имя = "newbucket2";
|
Имя = "newbucket2";
|
||||||
|
|
||||||
|
|||||||
+5507
-5507
File diff suppressed because it is too large
Load Diff
@@ -81,7 +81,7 @@ Function GetToken(Val AppKey, Val AppSecret, Val Code) Export
|
|||||||
Address = URLStructure["Address"];
|
Address = URLStructure["Address"];
|
||||||
|
|
||||||
Request = OPI_Tools.CreateRequest(Address, , DataType);
|
Request = OPI_Tools.CreateRequest(Address, , DataType);
|
||||||
Connection = OPI_Tools.CreateConnection(Server, AppKey, AppSecret);
|
Connection = OPI_Tools.CreateConnection(Server, True, AppKey, AppSecret);
|
||||||
|
|
||||||
ParameterString = OPI_Tools.RequestParametersToString(Parameters);
|
ParameterString = OPI_Tools.RequestParametersToString(Parameters);
|
||||||
Data = Right(ParameterString, StrLen(ParameterString) - 1);
|
Data = Right(ParameterString, StrLen(ParameterString) - 1);
|
||||||
|
|||||||
@@ -88,9 +88,10 @@ Function SendRequestWithoutBody(Val Method, Val BasicData) Export
|
|||||||
URLStructure = OPI_Tools.SplitURL(URL);
|
URLStructure = OPI_Tools.SplitURL(URL);
|
||||||
Server = URLStructure["Server"];
|
Server = URLStructure["Server"];
|
||||||
Address = URLStructure["Address"];
|
Address = URLStructure["Address"];
|
||||||
|
Safe = URLStructure["Safe"];
|
||||||
|
|
||||||
Request = OPI_Tools.CreateRequest(Address);
|
Request = OPI_Tools.CreateRequest(Address);
|
||||||
Connection = OPI_Tools.CreateConnection(Server);
|
Connection = OPI_Tools.CreateConnection(Server, Safe);
|
||||||
|
|
||||||
AuthorizationHeader = CreateAuthorizationHeader(BasicData, Request, Connection, Method);
|
AuthorizationHeader = CreateAuthorizationHeader(BasicData, Request, Connection, Method);
|
||||||
Request.Headers.Insert("Authorization", AuthorizationHeader);
|
Request.Headers.Insert("Authorization", AuthorizationHeader);
|
||||||
@@ -362,6 +363,8 @@ Function GetServiceURL(Val Authorization)
|
|||||||
|
|
||||||
URL = Authorization["URL"];
|
URL = Authorization["URL"];
|
||||||
|
|
||||||
|
OPI_TypeConversion.GetLine(URL);
|
||||||
|
|
||||||
If Not StrEndsWith(URL, "/") Then
|
If Not StrEndsWith(URL, "/") Then
|
||||||
URL = URL + "/";
|
URL = URL + "/";
|
||||||
EndIf;
|
EndIf;
|
||||||
@@ -387,14 +390,21 @@ EndFunction
|
|||||||
|
|
||||||
#Region Miscellaneous
|
#Region Miscellaneous
|
||||||
|
|
||||||
Function BucketManagment(Val Name, Val Authorization, Val Method)
|
Function BucketManagment(Val Name, Val BasicData, Val Method)
|
||||||
|
|
||||||
OPI_TypeConversion.GetLine(Name);
|
OPI_TypeConversion.GetLine(Name);
|
||||||
|
OPI_TypeConversion.GetCollection(BasicData);
|
||||||
|
|
||||||
URL = GetServiceURL(Authorization);
|
If TypeOf(BasicData) = Type("Array") Then
|
||||||
|
Raise "Error of obtaining authorization data from the structure";
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
URL = GetServiceURL(BasicData);
|
||||||
URL = URL + Name;
|
URL = URL + Name;
|
||||||
|
|
||||||
Response = SendRequestWithoutBody(Method, Authorization);
|
BasicData.Insert("URL", URL);
|
||||||
|
|
||||||
|
Response = SendRequestWithoutBody(Method, BasicData);
|
||||||
|
|
||||||
Return Response;
|
Return Response;
|
||||||
|
|
||||||
|
|||||||
@@ -14615,7 +14615,7 @@ Procedure S3_CreateBucket(FunctionParameters)
|
|||||||
SecretKey = FunctionParameters["S3_SecretKey"];
|
SecretKey = FunctionParameters["S3_SecretKey"];
|
||||||
Region = "BTC";
|
Region = "BTC";
|
||||||
|
|
||||||
Authorization = OPI_S3.GetAuthStructure(URL, AccessKey, SecretKey, Region);
|
Authorization = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||||
|
|
||||||
Name = "newbucket2";
|
Name = "newbucket2";
|
||||||
|
|
||||||
@@ -14635,7 +14635,7 @@ Procedure S3_DeleteBucket(FunctionParameters)
|
|||||||
SecretKey = FunctionParameters["S3_SecretKey"];
|
SecretKey = FunctionParameters["S3_SecretKey"];
|
||||||
Region = "BTC";
|
Region = "BTC";
|
||||||
|
|
||||||
Authorization = OPI_S3.GetAuthStructure(URL, AccessKey, SecretKey, Region);
|
Authorization = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||||
|
|
||||||
Name = "newbucket2";
|
Name = "newbucket2";
|
||||||
|
|
||||||
|
|||||||
@@ -391,29 +391,6 @@ Function GetFilePath(Val Path) Export
|
|||||||
|
|
||||||
EndFunction
|
EndFunction
|
||||||
|
|
||||||
Function IsOneScript() Export
|
|
||||||
|
|
||||||
Try
|
|
||||||
|
|
||||||
Response = False;
|
|
||||||
|
|
||||||
// BSLLS:UnusedLocalVariable-off
|
|
||||||
|
|
||||||
//@skip-check module-unused-local-variable
|
|
||||||
Check = New OpenSSLSecureConnection();
|
|
||||||
|
|
||||||
// BSLLS:UnusedLocalVariable-on
|
|
||||||
|
|
||||||
Except
|
|
||||||
|
|
||||||
Response = True;
|
|
||||||
|
|
||||||
EndTry;
|
|
||||||
|
|
||||||
Return Response;
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
Procedure ParameterToCollection(Parameter, Collection) Export
|
Procedure ParameterToCollection(Parameter, Collection) Export
|
||||||
|
|
||||||
Value = GetParameter(Parameter);
|
Value = GetParameter(Parameter);
|
||||||
@@ -2199,7 +2176,7 @@ EndProcedure
|
|||||||
|
|
||||||
Procedure WriteCLICall(Val Library, Val Method, Val Options)
|
Procedure WriteCLICall(Val Library, Val Method, Val Options)
|
||||||
|
|
||||||
If Not IsOneScript() Then
|
If Not OPI_Tools.IsOneScript() Then
|
||||||
Return;
|
Return;
|
||||||
EndIf;
|
EndIf;
|
||||||
|
|
||||||
|
|||||||
@@ -210,14 +210,24 @@ Function CreateRequest(Val Address, Val AdditionalHeaders = "", Val DataType = "
|
|||||||
|
|
||||||
EndFunction
|
EndFunction
|
||||||
|
|
||||||
Function CreateConnection(Val Server, Val User = "", Val Password = "") Export
|
Function CreateConnection(Val Server, Val Safe = True, Val User = "", Val Password = "") Export
|
||||||
|
|
||||||
Try
|
If Safe Then
|
||||||
SSL = New OpenSSLSecureConnection;
|
|
||||||
Return New HTTPConnection(Server, 443, User, Password, , 3000, SSL);
|
If IsOneScript() Then
|
||||||
Except
|
Connection = New HTTPConnection(Server, 443, User, Password, , 3000);
|
||||||
Return New HTTPConnection(Server, 443, User, Password, , 3000);
|
Else
|
||||||
EndTry;
|
SSL = New OpenSSLSecureConnection;
|
||||||
|
Connection = New HTTPConnection(Server, 443, User, Password, , 3000, SSL);
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
Connection = New HTTPConnection(Server, 80, User, Password, , 3000, SSL);
|
||||||
|
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
Return Connection;
|
||||||
|
|
||||||
EndFunction
|
EndFunction
|
||||||
|
|
||||||
@@ -236,8 +246,9 @@ Function ExecuteRequest(Val Request, Val Connection, Val View, Val ResponseFile
|
|||||||
URLStructure = SplitURL(URL);
|
URLStructure = SplitURL(URL);
|
||||||
Server = URLStructure["Server"];
|
Server = URLStructure["Server"];
|
||||||
Address = URLStructure["Address"];
|
Address = URLStructure["Address"];
|
||||||
|
Safe = URLStructure["Safe"];
|
||||||
|
|
||||||
Connection = CreateConnection(Server);
|
Connection = CreateConnection(Server, Safe);
|
||||||
Request.ResourceAddress = Address;
|
Request.ResourceAddress = Address;
|
||||||
|
|
||||||
Response = ExecuteRequest(Request, Connection, View, ResponseFile, FullResponse);
|
Response = ExecuteRequest(Request, Connection, View, ResponseFile, FullResponse);
|
||||||
@@ -369,22 +380,28 @@ EndFunction
|
|||||||
|
|
||||||
Function SplitURL(Val URL) Export
|
Function SplitURL(Val URL) Export
|
||||||
|
|
||||||
|
SecureConnection = Not StrStartsWith(URL, "http://");
|
||||||
|
|
||||||
URL = StrReplace(URL, "https://", "");
|
URL = StrReplace(URL, "https://", "");
|
||||||
URL = StrReplace(URL, "http://" , "");
|
URL = StrReplace(URL, "http://" , "");
|
||||||
URL = StrReplace(URL, ":443" , "");
|
URL = StrReplace(URL, ":443" , "");
|
||||||
|
|
||||||
Address = Right(URL, StrLen(URL) - StrFind(URL, "/", SearchDirection.FromBegin) + 1);
|
If StrFind(URL, "/") = 0 Then
|
||||||
Server = Left(URL, StrFind(URL, "/", SearchDirection.FromBegin) - 1);
|
Address = "";
|
||||||
|
Server = URL;
|
||||||
|
Else
|
||||||
|
Address = Right(URL, StrLen(URL) - StrFind(URL, "/", SearchDirection.FromBegin) + 1);
|
||||||
|
Server = Left(URL, StrFind(URL, "/", SearchDirection.FromBegin) - 1);
|
||||||
|
EndIf;
|
||||||
|
|
||||||
Try
|
If IsOneScript() And SecureConnection Then
|
||||||
SSL = New OpenSSLSecureConnection;
|
|
||||||
Except
|
|
||||||
Server = "https://" + Server;
|
Server = "https://" + Server;
|
||||||
EndTry;
|
EndIf;
|
||||||
|
|
||||||
ReturnStructure = New Structure;
|
ReturnStructure = New Structure;
|
||||||
ReturnStructure.Insert("Server" , Server);
|
ReturnStructure.Insert("Server" , Server);
|
||||||
ReturnStructure.Insert("Address" , Address);
|
ReturnStructure.Insert("Address" , Address);
|
||||||
|
ReturnStructure.Insert("Safe" , SecureConnection);
|
||||||
|
|
||||||
Return ReturnStructure;
|
Return ReturnStructure;
|
||||||
|
|
||||||
@@ -644,6 +661,29 @@ Function ISOTimestamp(Val Date) Export
|
|||||||
|
|
||||||
EndFunction
|
EndFunction
|
||||||
|
|
||||||
|
Function IsOneScript() Export
|
||||||
|
|
||||||
|
Try
|
||||||
|
|
||||||
|
Response = False;
|
||||||
|
|
||||||
|
// BSLLS:UnusedLocalVariable-off
|
||||||
|
|
||||||
|
//@skip-check module-unused-local-variable
|
||||||
|
Check = New OpenSSLSecureConnection();
|
||||||
|
|
||||||
|
// BSLLS:UnusedLocalVariable-on
|
||||||
|
|
||||||
|
Except
|
||||||
|
|
||||||
|
Response = True;
|
||||||
|
|
||||||
|
EndTry;
|
||||||
|
|
||||||
|
Return Response;
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
Procedure ValueToArray(Value) Export
|
Procedure ValueToArray(Value) Export
|
||||||
|
|
||||||
Value_ = New Array;
|
Value_ = New Array;
|
||||||
@@ -794,9 +834,10 @@ Function ExecuteRequestWithBody(Val URL
|
|||||||
URLStructure = SplitURL(URL);
|
URLStructure = SplitURL(URL);
|
||||||
Server = URLStructure["Server"];
|
Server = URLStructure["Server"];
|
||||||
Address = URLStructure["Address"];
|
Address = URLStructure["Address"];
|
||||||
|
Safe = URLStructure["Safe"];
|
||||||
|
|
||||||
Request = CreateRequestWithBody(Address, Parameters, AdditionalHeaders, JSON);
|
Request = CreateRequestWithBody(Address, Parameters, AdditionalHeaders, JSON);
|
||||||
Connection = CreateConnection(Server);
|
Connection = CreateConnection(Server, Safe);
|
||||||
Response = ExecuteRequest(Request, Connection, View, ResponseFile, FullResponse);
|
Response = ExecuteRequest(Request, Connection, View, ResponseFile, FullResponse);
|
||||||
|
|
||||||
Return Response;
|
Return Response;
|
||||||
@@ -813,9 +854,10 @@ Function ExecuteRequestWithBinaryData(Val URL
|
|||||||
URLStructure = SplitURL(URL);
|
URLStructure = SplitURL(URL);
|
||||||
Server = URLStructure["Server"];
|
Server = URLStructure["Server"];
|
||||||
Address = URLStructure["Address"];
|
Address = URLStructure["Address"];
|
||||||
|
Safe = URLStructure["Safe"];
|
||||||
|
|
||||||
Request = CreateRequest(Address, AdditionalHeaders, DataType);
|
Request = CreateRequest(Address, AdditionalHeaders, DataType);
|
||||||
Connection = CreateConnection(Server);
|
Connection = CreateConnection(Server, Safe);
|
||||||
|
|
||||||
If Not Data.Size() = 0 Then
|
If Not Data.Size() = 0 Then
|
||||||
Request.SetBodyFromBinary(Data);
|
Request.SetBodyFromBinary(Data);
|
||||||
@@ -840,9 +882,10 @@ Function ExecuteRequestWithoutBody(Val URL
|
|||||||
URLStructure = SplitURL(URL);
|
URLStructure = SplitURL(URL);
|
||||||
Server = URLStructure["Server"];
|
Server = URLStructure["Server"];
|
||||||
Address = URLStructure["Address"] + RequestParametersToString(Parameters);
|
Address = URLStructure["Address"] + RequestParametersToString(Parameters);
|
||||||
|
Safe = URLStructure["Safe"];
|
||||||
|
|
||||||
Request = CreateRequest(Address, AdditionalHeaders);
|
Request = CreateRequest(Address, AdditionalHeaders);
|
||||||
Connection = CreateConnection(Server);
|
Connection = CreateConnection(Server, Safe);
|
||||||
|
|
||||||
Response = ExecuteRequest(Request, Connection, View, ResponseFile);
|
Response = ExecuteRequest(Request, Connection, View, ResponseFile);
|
||||||
|
|
||||||
@@ -869,10 +912,12 @@ Function ExecuteMultipartRequest(Val URL
|
|||||||
URLStructure = SplitURL(URL);
|
URLStructure = SplitURL(URL);
|
||||||
Server = URLStructure["Server"];
|
Server = URLStructure["Server"];
|
||||||
Address = URLStructure["Address"];
|
Address = URLStructure["Address"];
|
||||||
RequestBody = GetTempFileName();
|
Safe = URLStructure["Safe"];
|
||||||
|
|
||||||
|
RequestBody = GetTempFileName();
|
||||||
|
|
||||||
Request = CreateMultipartRequest(Address, Parameters, Files, AdditionalHeaders, RequestBody, ContentType);
|
Request = CreateMultipartRequest(Address, Parameters, Files, AdditionalHeaders, RequestBody, ContentType);
|
||||||
Connection = CreateConnection(Server);
|
Connection = CreateConnection(Server, Safe);
|
||||||
Response = ExecuteRequest(Request, Connection, View, ResponseFile);
|
Response = ExecuteRequest(Request, Connection, View, ResponseFile);
|
||||||
|
|
||||||
Request = Undefined;
|
Request = Undefined;
|
||||||
@@ -893,10 +938,12 @@ Function ExecuteMultipartRelatedRequest(Val URL
|
|||||||
URLStructure = SplitURL(URL);
|
URLStructure = SplitURL(URL);
|
||||||
Server = URLStructure["Server"];
|
Server = URLStructure["Server"];
|
||||||
Address = URLStructure["Address"];
|
Address = URLStructure["Address"];
|
||||||
RequestBody = GetTempFileName();
|
Safe = URLStructure["Safe"];
|
||||||
|
|
||||||
|
RequestBody = GetTempFileName();
|
||||||
|
|
||||||
Request = CreateMultipartRelatedRequest(Address, Files, JSON, AdditionalHeaders, RequestBody);
|
Request = CreateMultipartRelatedRequest(Address, Files, JSON, AdditionalHeaders, RequestBody);
|
||||||
Connection = CreateConnection(Server);
|
Connection = CreateConnection(Server, Safe);
|
||||||
|
|
||||||
Response = ExecuteRequest(Request, Connection, View, ResponseFile);
|
Response = ExecuteRequest(Request, Connection, View, ResponseFile);
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ Function GetToken(Val AppKey, Val AppSecret, Val Code) Export
|
|||||||
Address = URLStructure["Address"];
|
Address = URLStructure["Address"];
|
||||||
|
|
||||||
Request = OPI_Tools.CreateRequest(Address, , DataType);
|
Request = OPI_Tools.CreateRequest(Address, , DataType);
|
||||||
Connection = OPI_Tools.CreateConnection(Server, AppKey, AppSecret);
|
Connection = OPI_Tools.CreateConnection(Server, True, AppKey, AppSecret);
|
||||||
|
|
||||||
ParameterString = OPI_Tools.RequestParametersToString(Parameters);
|
ParameterString = OPI_Tools.RequestParametersToString(Parameters);
|
||||||
Data = Right(ParameterString, StrLen(ParameterString) - 1);
|
Data = Right(ParameterString, StrLen(ParameterString) - 1);
|
||||||
|
|||||||
@@ -88,9 +88,10 @@ Function SendRequestWithoutBody(Val Method, Val BasicData) Export
|
|||||||
URLStructure = OPI_Tools.SplitURL(URL);
|
URLStructure = OPI_Tools.SplitURL(URL);
|
||||||
Server = URLStructure["Server"];
|
Server = URLStructure["Server"];
|
||||||
Address = URLStructure["Address"];
|
Address = URLStructure["Address"];
|
||||||
|
Safe = URLStructure["Safe"];
|
||||||
|
|
||||||
Request = OPI_Tools.CreateRequest(Address);
|
Request = OPI_Tools.CreateRequest(Address);
|
||||||
Connection = OPI_Tools.CreateConnection(Server);
|
Connection = OPI_Tools.CreateConnection(Server, Safe);
|
||||||
|
|
||||||
AuthorizationHeader = CreateAuthorizationHeader(BasicData, Request, Connection, Method);
|
AuthorizationHeader = CreateAuthorizationHeader(BasicData, Request, Connection, Method);
|
||||||
Request.Headers.Insert("Authorization", AuthorizationHeader);
|
Request.Headers.Insert("Authorization", AuthorizationHeader);
|
||||||
@@ -362,6 +363,8 @@ Function GetServiceURL(Val Authorization)
|
|||||||
|
|
||||||
URL = Authorization["URL"];
|
URL = Authorization["URL"];
|
||||||
|
|
||||||
|
OPI_TypeConversion.GetLine(URL);
|
||||||
|
|
||||||
If Not StrEndsWith(URL, "/") Then
|
If Not StrEndsWith(URL, "/") Then
|
||||||
URL = URL + "/";
|
URL = URL + "/";
|
||||||
EndIf;
|
EndIf;
|
||||||
@@ -387,14 +390,21 @@ EndFunction
|
|||||||
|
|
||||||
#Region Miscellaneous
|
#Region Miscellaneous
|
||||||
|
|
||||||
Function BucketManagment(Val Name, Val Authorization, Val Method)
|
Function BucketManagment(Val Name, Val BasicData, Val Method)
|
||||||
|
|
||||||
OPI_TypeConversion.GetLine(Name);
|
OPI_TypeConversion.GetLine(Name);
|
||||||
|
OPI_TypeConversion.GetCollection(BasicData);
|
||||||
|
|
||||||
URL = GetServiceURL(Authorization);
|
If TypeOf(BasicData) = Type("Array") Then
|
||||||
|
Raise "Error of obtaining authorization data from the structure";
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
URL = GetServiceURL(BasicData);
|
||||||
URL = URL + Name;
|
URL = URL + Name;
|
||||||
|
|
||||||
Response = SendRequestWithoutBody(Method, Authorization);
|
BasicData.Insert("URL", URL);
|
||||||
|
|
||||||
|
Response = SendRequestWithoutBody(Method, BasicData);
|
||||||
|
|
||||||
Return Response;
|
Return Response;
|
||||||
|
|
||||||
|
|||||||
@@ -391,29 +391,6 @@ Function GetFilePath(Val Path) Export
|
|||||||
|
|
||||||
EndFunction
|
EndFunction
|
||||||
|
|
||||||
Function IsOneScript() Export
|
|
||||||
|
|
||||||
Try
|
|
||||||
|
|
||||||
Response = False;
|
|
||||||
|
|
||||||
// BSLLS:UnusedLocalVariable-off
|
|
||||||
|
|
||||||
//@skip-check module-unused-local-variable
|
|
||||||
Check = New OpenSSLSecureConnection();
|
|
||||||
|
|
||||||
// BSLLS:UnusedLocalVariable-on
|
|
||||||
|
|
||||||
Except
|
|
||||||
|
|
||||||
Response = True;
|
|
||||||
|
|
||||||
EndTry;
|
|
||||||
|
|
||||||
Return Response;
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
Procedure ParameterToCollection(Parameter, Collection) Export
|
Procedure ParameterToCollection(Parameter, Collection) Export
|
||||||
|
|
||||||
Value = GetParameter(Parameter);
|
Value = GetParameter(Parameter);
|
||||||
@@ -2199,7 +2176,7 @@ EndProcedure
|
|||||||
|
|
||||||
Procedure WriteCLICall(Val Library, Val Method, Val Options)
|
Procedure WriteCLICall(Val Library, Val Method, Val Options)
|
||||||
|
|
||||||
If Not IsOneScript() Then
|
If Not OPI_Tools.IsOneScript() Then
|
||||||
Return;
|
Return;
|
||||||
EndIf;
|
EndIf;
|
||||||
|
|
||||||
|
|||||||
@@ -14615,7 +14615,7 @@ Procedure S3_CreateBucket(FunctionParameters)
|
|||||||
SecretKey = FunctionParameters["S3_SecretKey"];
|
SecretKey = FunctionParameters["S3_SecretKey"];
|
||||||
Region = "BTC";
|
Region = "BTC";
|
||||||
|
|
||||||
Authorization = OPI_S3.GetAuthStructure(URL, AccessKey, SecretKey, Region);
|
Authorization = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||||
|
|
||||||
Name = "newbucket2";
|
Name = "newbucket2";
|
||||||
|
|
||||||
@@ -14635,7 +14635,7 @@ Procedure S3_DeleteBucket(FunctionParameters)
|
|||||||
SecretKey = FunctionParameters["S3_SecretKey"];
|
SecretKey = FunctionParameters["S3_SecretKey"];
|
||||||
Region = "BTC";
|
Region = "BTC";
|
||||||
|
|
||||||
Authorization = OPI_S3.GetAuthStructure(URL, AccessKey, SecretKey, Region);
|
Authorization = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||||
|
|
||||||
Name = "newbucket2";
|
Name = "newbucket2";
|
||||||
|
|
||||||
|
|||||||
@@ -210,14 +210,24 @@ Function CreateRequest(Val Address, Val AdditionalHeaders = "", Val DataType = "
|
|||||||
|
|
||||||
EndFunction
|
EndFunction
|
||||||
|
|
||||||
Function CreateConnection(Val Server, Val User = "", Val Password = "") Export
|
Function CreateConnection(Val Server, Val Safe = True, Val User = "", Val Password = "") Export
|
||||||
|
|
||||||
Try
|
If Safe Then
|
||||||
SSL = New OpenSSLSecureConnection;
|
|
||||||
Return New HTTPConnection(Server, 443, User, Password, , 3000, SSL);
|
If IsOneScript() Then
|
||||||
Except
|
Connection = New HTTPConnection(Server, 443, User, Password, , 3000);
|
||||||
Return New HTTPConnection(Server, 443, User, Password, , 3000);
|
Else
|
||||||
EndTry;
|
SSL = New OpenSSLSecureConnection;
|
||||||
|
Connection = New HTTPConnection(Server, 443, User, Password, , 3000, SSL);
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
Connection = New HTTPConnection(Server, 80, User, Password, , 3000, SSL);
|
||||||
|
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
Return Connection;
|
||||||
|
|
||||||
EndFunction
|
EndFunction
|
||||||
|
|
||||||
@@ -236,8 +246,9 @@ Function ExecuteRequest(Val Request, Val Connection, Val View, Val ResponseFile
|
|||||||
URLStructure = SplitURL(URL);
|
URLStructure = SplitURL(URL);
|
||||||
Server = URLStructure["Server"];
|
Server = URLStructure["Server"];
|
||||||
Address = URLStructure["Address"];
|
Address = URLStructure["Address"];
|
||||||
|
Safe = URLStructure["Safe"];
|
||||||
|
|
||||||
Connection = CreateConnection(Server);
|
Connection = CreateConnection(Server, Safe);
|
||||||
Request.ResourceAddress = Address;
|
Request.ResourceAddress = Address;
|
||||||
|
|
||||||
Response = ExecuteRequest(Request, Connection, View, ResponseFile, FullResponse);
|
Response = ExecuteRequest(Request, Connection, View, ResponseFile, FullResponse);
|
||||||
@@ -369,22 +380,28 @@ EndFunction
|
|||||||
|
|
||||||
Function SplitURL(Val URL) Export
|
Function SplitURL(Val URL) Export
|
||||||
|
|
||||||
|
SecureConnection = Not StrStartsWith(URL, "http://");
|
||||||
|
|
||||||
URL = StrReplace(URL, "https://", "");
|
URL = StrReplace(URL, "https://", "");
|
||||||
URL = StrReplace(URL, "http://" , "");
|
URL = StrReplace(URL, "http://" , "");
|
||||||
URL = StrReplace(URL, ":443" , "");
|
URL = StrReplace(URL, ":443" , "");
|
||||||
|
|
||||||
Address = Right(URL, StrLen(URL) - StrFind(URL, "/", SearchDirection.FromBegin) + 1);
|
If StrFind(URL, "/") = 0 Then
|
||||||
Server = Left(URL, StrFind(URL, "/", SearchDirection.FromBegin) - 1);
|
Address = "";
|
||||||
|
Server = URL;
|
||||||
|
Else
|
||||||
|
Address = Right(URL, StrLen(URL) - StrFind(URL, "/", SearchDirection.FromBegin) + 1);
|
||||||
|
Server = Left(URL, StrFind(URL, "/", SearchDirection.FromBegin) - 1);
|
||||||
|
EndIf;
|
||||||
|
|
||||||
Try
|
If IsOneScript() And SecureConnection Then
|
||||||
SSL = New OpenSSLSecureConnection;
|
|
||||||
Except
|
|
||||||
Server = "https://" + Server;
|
Server = "https://" + Server;
|
||||||
EndTry;
|
EndIf;
|
||||||
|
|
||||||
ReturnStructure = New Structure;
|
ReturnStructure = New Structure;
|
||||||
ReturnStructure.Insert("Server" , Server);
|
ReturnStructure.Insert("Server" , Server);
|
||||||
ReturnStructure.Insert("Address" , Address);
|
ReturnStructure.Insert("Address" , Address);
|
||||||
|
ReturnStructure.Insert("Safe" , SecureConnection);
|
||||||
|
|
||||||
Return ReturnStructure;
|
Return ReturnStructure;
|
||||||
|
|
||||||
@@ -644,6 +661,29 @@ Function ISOTimestamp(Val Date) Export
|
|||||||
|
|
||||||
EndFunction
|
EndFunction
|
||||||
|
|
||||||
|
Function IsOneScript() Export
|
||||||
|
|
||||||
|
Try
|
||||||
|
|
||||||
|
Response = False;
|
||||||
|
|
||||||
|
// BSLLS:UnusedLocalVariable-off
|
||||||
|
|
||||||
|
//@skip-check module-unused-local-variable
|
||||||
|
Check = New OpenSSLSecureConnection();
|
||||||
|
|
||||||
|
// BSLLS:UnusedLocalVariable-on
|
||||||
|
|
||||||
|
Except
|
||||||
|
|
||||||
|
Response = True;
|
||||||
|
|
||||||
|
EndTry;
|
||||||
|
|
||||||
|
Return Response;
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
Procedure ValueToArray(Value) Export
|
Procedure ValueToArray(Value) Export
|
||||||
|
|
||||||
Value_ = New Array;
|
Value_ = New Array;
|
||||||
@@ -794,9 +834,10 @@ Function ExecuteRequestWithBody(Val URL
|
|||||||
URLStructure = SplitURL(URL);
|
URLStructure = SplitURL(URL);
|
||||||
Server = URLStructure["Server"];
|
Server = URLStructure["Server"];
|
||||||
Address = URLStructure["Address"];
|
Address = URLStructure["Address"];
|
||||||
|
Safe = URLStructure["Safe"];
|
||||||
|
|
||||||
Request = CreateRequestWithBody(Address, Parameters, AdditionalHeaders, JSON);
|
Request = CreateRequestWithBody(Address, Parameters, AdditionalHeaders, JSON);
|
||||||
Connection = CreateConnection(Server);
|
Connection = CreateConnection(Server, Safe);
|
||||||
Response = ExecuteRequest(Request, Connection, View, ResponseFile, FullResponse);
|
Response = ExecuteRequest(Request, Connection, View, ResponseFile, FullResponse);
|
||||||
|
|
||||||
Return Response;
|
Return Response;
|
||||||
@@ -813,9 +854,10 @@ Function ExecuteRequestWithBinaryData(Val URL
|
|||||||
URLStructure = SplitURL(URL);
|
URLStructure = SplitURL(URL);
|
||||||
Server = URLStructure["Server"];
|
Server = URLStructure["Server"];
|
||||||
Address = URLStructure["Address"];
|
Address = URLStructure["Address"];
|
||||||
|
Safe = URLStructure["Safe"];
|
||||||
|
|
||||||
Request = CreateRequest(Address, AdditionalHeaders, DataType);
|
Request = CreateRequest(Address, AdditionalHeaders, DataType);
|
||||||
Connection = CreateConnection(Server);
|
Connection = CreateConnection(Server, Safe);
|
||||||
|
|
||||||
If Not Data.Size() = 0 Then
|
If Not Data.Size() = 0 Then
|
||||||
Request.SetBodyFromBinaryData(Data);
|
Request.SetBodyFromBinaryData(Data);
|
||||||
@@ -840,9 +882,10 @@ Function ExecuteRequestWithoutBody(Val URL
|
|||||||
URLStructure = SplitURL(URL);
|
URLStructure = SplitURL(URL);
|
||||||
Server = URLStructure["Server"];
|
Server = URLStructure["Server"];
|
||||||
Address = URLStructure["Address"] + RequestParametersToString(Parameters);
|
Address = URLStructure["Address"] + RequestParametersToString(Parameters);
|
||||||
|
Safe = URLStructure["Safe"];
|
||||||
|
|
||||||
Request = CreateRequest(Address, AdditionalHeaders);
|
Request = CreateRequest(Address, AdditionalHeaders);
|
||||||
Connection = CreateConnection(Server);
|
Connection = CreateConnection(Server, Safe);
|
||||||
|
|
||||||
Response = ExecuteRequest(Request, Connection, View, ResponseFile);
|
Response = ExecuteRequest(Request, Connection, View, ResponseFile);
|
||||||
|
|
||||||
@@ -869,10 +912,12 @@ Function ExecuteMultipartRequest(Val URL
|
|||||||
URLStructure = SplitURL(URL);
|
URLStructure = SplitURL(URL);
|
||||||
Server = URLStructure["Server"];
|
Server = URLStructure["Server"];
|
||||||
Address = URLStructure["Address"];
|
Address = URLStructure["Address"];
|
||||||
RequestBody = GetTempFileName();
|
Safe = URLStructure["Safe"];
|
||||||
|
|
||||||
|
RequestBody = GetTempFileName();
|
||||||
|
|
||||||
Request = CreateMultipartRequest(Address, Parameters, Files, AdditionalHeaders, RequestBody, ContentType);
|
Request = CreateMultipartRequest(Address, Parameters, Files, AdditionalHeaders, RequestBody, ContentType);
|
||||||
Connection = CreateConnection(Server);
|
Connection = CreateConnection(Server, Safe);
|
||||||
Response = ExecuteRequest(Request, Connection, View, ResponseFile);
|
Response = ExecuteRequest(Request, Connection, View, ResponseFile);
|
||||||
|
|
||||||
Request = Undefined;
|
Request = Undefined;
|
||||||
@@ -893,10 +938,12 @@ Function ExecuteMultipartRelatedRequest(Val URL
|
|||||||
URLStructure = SplitURL(URL);
|
URLStructure = SplitURL(URL);
|
||||||
Server = URLStructure["Server"];
|
Server = URLStructure["Server"];
|
||||||
Address = URLStructure["Address"];
|
Address = URLStructure["Address"];
|
||||||
RequestBody = GetTempFileName();
|
Safe = URLStructure["Safe"];
|
||||||
|
|
||||||
|
RequestBody = GetTempFileName();
|
||||||
|
|
||||||
Request = CreateMultipartRelatedRequest(Address, Files, JSON, AdditionalHeaders, RequestBody);
|
Request = CreateMultipartRelatedRequest(Address, Files, JSON, AdditionalHeaders, RequestBody);
|
||||||
Connection = CreateConnection(Server);
|
Connection = CreateConnection(Server, Safe);
|
||||||
|
|
||||||
Response = ExecuteRequest(Request, Connection, View, ResponseFile);
|
Response = ExecuteRequest(Request, Connection, View, ResponseFile);
|
||||||
|
|
||||||
|
|||||||
@@ -362,7 +362,7 @@
|
|||||||
Функция ПолучитьURLСервиса(Знач Авторизация)
|
Функция ПолучитьURLСервиса(Знач Авторизация)
|
||||||
|
|
||||||
URL = Авторизация["URL"];
|
URL = Авторизация["URL"];
|
||||||
|
|
||||||
OPI_ПреобразованиеТипов.ПолучитьСтроку(URL);
|
OPI_ПреобразованиеТипов.ПолучитьСтроку(URL);
|
||||||
|
|
||||||
Если Не СтрЗаканчиваетсяНа(URL, "/") Тогда
|
Если Не СтрЗаканчиваетсяНа(URL, "/") Тогда
|
||||||
@@ -394,7 +394,7 @@
|
|||||||
|
|
||||||
OPI_ПреобразованиеТипов.ПолучитьСтроку(Имя);
|
OPI_ПреобразованиеТипов.ПолучитьСтроку(Имя);
|
||||||
OPI_ПреобразованиеТипов.ПолучитьКоллекцию(ОсновныеДанные);
|
OPI_ПреобразованиеТипов.ПолучитьКоллекцию(ОсновныеДанные);
|
||||||
|
|
||||||
Если ТипЗнч(ОсновныеДанные) = Тип("Массив") Тогда
|
Если ТипЗнч(ОсновныеДанные) = Тип("Массив") Тогда
|
||||||
ВызватьИсключение "Ошибка получения авторизационных данных из структуры";
|
ВызватьИсключение "Ошибка получения авторизационных данных из структуры";
|
||||||
КонецЕсли;
|
КонецЕсли;
|
||||||
@@ -403,7 +403,7 @@
|
|||||||
URL = URL + Имя;
|
URL = URL + Имя;
|
||||||
|
|
||||||
ОсновныеДанные.Вставить("URL", URL);
|
ОсновныеДанные.Вставить("URL", URL);
|
||||||
|
|
||||||
Ответ = ОтправитьЗапросБезТела(Метод, ОсновныеДанные);
|
Ответ = ОтправитьЗапросБезТела(Метод, ОсновныеДанные);
|
||||||
|
|
||||||
Возврат Ответ;
|
Возврат Ответ;
|
||||||
|
|||||||
@@ -1990,9 +1990,9 @@
|
|||||||
КонецФункции
|
КонецФункции
|
||||||
|
|
||||||
Функция ПолучитьОбщийМодуль(Знач Имя)
|
Функция ПолучитьОбщийМодуль(Знач Имя)
|
||||||
|
|
||||||
Модуль = Вычислить(Имя);
|
Модуль = Вычислить(Имя);
|
||||||
|
|
||||||
Возврат Модуль;
|
Возврат Модуль;
|
||||||
КонецФункции
|
КонецФункции
|
||||||
|
|
||||||
|
|||||||
@@ -212,22 +212,22 @@
|
|||||||
|
|
||||||
Функция СоздатьСоединение(Знач Сервер, Знач Защищенное = Истина, Знач Пользователь = "", Знач Пароль = "") Экспорт
|
Функция СоздатьСоединение(Знач Сервер, Знач Защищенное = Истина, Знач Пользователь = "", Знач Пароль = "") Экспорт
|
||||||
|
|
||||||
Если Защищенное Тогда
|
Если Защищенное Тогда
|
||||||
|
|
||||||
Если ЭтоOneScript() Тогда
|
Если ЭтоOneScript() Тогда
|
||||||
Соединение = Новый HTTPСоединение(Сервер, 443, Пользователь, Пароль, , 3000);
|
Соединение = Новый HTTPСоединение(Сервер, 443, Пользователь, Пароль, , 3000);
|
||||||
Иначе
|
Иначе
|
||||||
SSL = Новый ЗащищенноеСоединениеOpenSSL;
|
SSL = Новый ЗащищенноеСоединениеOpenSSL;
|
||||||
Соединение = Новый HTTPСоединение(Сервер, 443, Пользователь, Пароль, , 3000, SSL);
|
Соединение = Новый HTTPСоединение(Сервер, 443, Пользователь, Пароль, , 3000, SSL);
|
||||||
КонецЕсли;
|
КонецЕсли;
|
||||||
|
|
||||||
Иначе
|
Иначе
|
||||||
|
|
||||||
Соединение = Новый HTTPСоединение(Сервер, 80, Пользователь, Пароль, , 3000, SSL);
|
Соединение = Новый HTTPСоединение(Сервер, 80, Пользователь, Пароль, , 3000, SSL);
|
||||||
|
|
||||||
КонецЕсли;
|
КонецЕсли;
|
||||||
|
|
||||||
Возврат Соединение;
|
Возврат Соединение;
|
||||||
|
|
||||||
КонецФункции
|
КонецФункции
|
||||||
|
|
||||||
@@ -380,8 +380,8 @@
|
|||||||
|
|
||||||
Функция РазбитьURL(Знач URL) Экспорт
|
Функция РазбитьURL(Знач URL) Экспорт
|
||||||
|
|
||||||
ЗащищенноеСоединение = Не СтрНачинаетсяС(URL, "http://");
|
ЗащищенноеСоединение = Не СтрНачинаетсяС(URL, "http://");
|
||||||
|
|
||||||
URL = СтрЗаменить(URL, "https://", "");
|
URL = СтрЗаменить(URL, "https://", "");
|
||||||
URL = СтрЗаменить(URL, "http://" , "");
|
URL = СтрЗаменить(URL, "http://" , "");
|
||||||
URL = СтрЗаменить(URL, ":443" , "");
|
URL = СтрЗаменить(URL, ":443" , "");
|
||||||
@@ -394,7 +394,7 @@
|
|||||||
Сервер = Лев(URL, СтрНайти(URL, "/", НаправлениеПоиска.СНачала) - 1);
|
Сервер = Лев(URL, СтрНайти(URL, "/", НаправлениеПоиска.СНачала) - 1);
|
||||||
КонецЕсли;
|
КонецЕсли;
|
||||||
|
|
||||||
Если ЭтоOneScript() И ЗащищенноеСоединение Тогда
|
Если ЭтоOneScript() И ЗащищенноеСоединение Тогда
|
||||||
Сервер = "https://" + Сервер;
|
Сервер = "https://" + Сервер;
|
||||||
КонецЕсли;
|
КонецЕсли;
|
||||||
|
|
||||||
@@ -913,7 +913,7 @@
|
|||||||
Сервер = СтруктураURL["Сервер"];
|
Сервер = СтруктураURL["Сервер"];
|
||||||
Адрес = СтруктураURL["Адрес"];
|
Адрес = СтруктураURL["Адрес"];
|
||||||
Защищенное = СтруктураURL["Защищенное"];
|
Защищенное = СтруктураURL["Защищенное"];
|
||||||
|
|
||||||
ТелоЗапроса = ПолучитьИмяВременногоФайла();
|
ТелоЗапроса = ПолучитьИмяВременногоФайла();
|
||||||
|
|
||||||
Запрос = СоздатьЗапросМультипарт(Адрес, Параметры, Файлы, ДопЗаголовки, ТелоЗапроса, ТипКонтента);
|
Запрос = СоздатьЗапросМультипарт(Адрес, Параметры, Файлы, ДопЗаголовки, ТелоЗапроса, ТипКонтента);
|
||||||
@@ -939,7 +939,7 @@
|
|||||||
Сервер = СтруктураURL["Сервер"];
|
Сервер = СтруктураURL["Сервер"];
|
||||||
Адрес = СтруктураURL["Адрес"];
|
Адрес = СтруктураURL["Адрес"];
|
||||||
Защищенное = СтруктураURL["Защищенное"];
|
Защищенное = СтруктураURL["Защищенное"];
|
||||||
|
|
||||||
ТелоЗапроса = ПолучитьИмяВременногоФайла();
|
ТелоЗапроса = ПолучитьИмяВременногоФайла();
|
||||||
|
|
||||||
Запрос = СоздатьЗапросМультипартРелэйтед(Адрес, Файлы, JSON, ДопЗаголовки, ТелоЗапроса);
|
Запрос = СоздатьЗапросМультипартРелэйтед(Адрес, Файлы, JSON, ДопЗаголовки, ТелоЗапроса);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// OneScript: ./OInt/core/Modules/OPI_S3.os
|
// OneScript: ./OInt/core/Modules/OPI_S3.os
|
||||||
// Lib: S3
|
// Lib: S3
|
||||||
// CLI: s3
|
// CLI: s3
|
||||||
|
|
||||||
@@ -362,7 +362,7 @@
|
|||||||
Функция ПолучитьURLСервиса(Знач Авторизация)
|
Функция ПолучитьURLСервиса(Знач Авторизация)
|
||||||
|
|
||||||
URL = Авторизация["URL"];
|
URL = Авторизация["URL"];
|
||||||
|
|
||||||
OPI_ПреобразованиеТипов.ПолучитьСтроку(URL);
|
OPI_ПреобразованиеТипов.ПолучитьСтроку(URL);
|
||||||
|
|
||||||
Если Не СтрЗаканчиваетсяНа(URL, "/") Тогда
|
Если Не СтрЗаканчиваетсяНа(URL, "/") Тогда
|
||||||
@@ -394,7 +394,7 @@
|
|||||||
|
|
||||||
OPI_ПреобразованиеТипов.ПолучитьСтроку(Имя);
|
OPI_ПреобразованиеТипов.ПолучитьСтроку(Имя);
|
||||||
OPI_ПреобразованиеТипов.ПолучитьКоллекцию(ОсновныеДанные);
|
OPI_ПреобразованиеТипов.ПолучитьКоллекцию(ОсновныеДанные);
|
||||||
|
|
||||||
Если ТипЗнч(ОсновныеДанные) = Тип("Массив") Тогда
|
Если ТипЗнч(ОсновныеДанные) = Тип("Массив") Тогда
|
||||||
ВызватьИсключение "Ошибка получения авторизационных данных из структуры";
|
ВызватьИсключение "Ошибка получения авторизационных данных из структуры";
|
||||||
КонецЕсли;
|
КонецЕсли;
|
||||||
@@ -403,7 +403,7 @@
|
|||||||
URL = URL + Имя;
|
URL = URL + Имя;
|
||||||
|
|
||||||
ОсновныеДанные.Вставить("URL", URL);
|
ОсновныеДанные.Вставить("URL", URL);
|
||||||
|
|
||||||
Ответ = ОтправитьЗапросБезТела(Метод, ОсновныеДанные);
|
Ответ = ОтправитьЗапросБезТела(Метод, ОсновныеДанные);
|
||||||
|
|
||||||
Возврат Ответ;
|
Возврат Ответ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// OneScript: ./OInt/tools/Modules/internal/Modules/OPI_Инструменты.os
|
// OneScript: ./OInt/tools/Modules/internal/Modules/OPI_Инструменты.os
|
||||||
|
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
@@ -212,22 +212,22 @@
|
|||||||
|
|
||||||
Функция СоздатьСоединение(Знач Сервер, Знач Защищенное = Истина, Знач Пользователь = "", Знач Пароль = "") Экспорт
|
Функция СоздатьСоединение(Знач Сервер, Знач Защищенное = Истина, Знач Пользователь = "", Знач Пароль = "") Экспорт
|
||||||
|
|
||||||
Если Защищенное Тогда
|
Если Защищенное Тогда
|
||||||
|
|
||||||
Если ЭтоOneScript() Тогда
|
Если ЭтоOneScript() Тогда
|
||||||
Соединение = Новый HTTPСоединение(Сервер, 443, Пользователь, Пароль, , 3000);
|
Соединение = Новый HTTPСоединение(Сервер, 443, Пользователь, Пароль, , 3000);
|
||||||
Иначе
|
Иначе
|
||||||
SSL = Новый ЗащищенноеСоединениеOpenSSL;
|
SSL = Новый ЗащищенноеСоединениеOpenSSL;
|
||||||
Соединение = Новый HTTPСоединение(Сервер, 443, Пользователь, Пароль, , 3000, SSL);
|
Соединение = Новый HTTPСоединение(Сервер, 443, Пользователь, Пароль, , 3000, SSL);
|
||||||
КонецЕсли;
|
КонецЕсли;
|
||||||
|
|
||||||
Иначе
|
Иначе
|
||||||
|
|
||||||
Соединение = Новый HTTPСоединение(Сервер, 80, Пользователь, Пароль, , 3000, SSL);
|
Соединение = Новый HTTPСоединение(Сервер, 80, Пользователь, Пароль, , 3000, SSL);
|
||||||
|
|
||||||
КонецЕсли;
|
КонецЕсли;
|
||||||
|
|
||||||
Возврат Соединение;
|
Возврат Соединение;
|
||||||
|
|
||||||
КонецФункции
|
КонецФункции
|
||||||
|
|
||||||
@@ -380,8 +380,8 @@
|
|||||||
|
|
||||||
Функция РазбитьURL(Знач URL) Экспорт
|
Функция РазбитьURL(Знач URL) Экспорт
|
||||||
|
|
||||||
ЗащищенноеСоединение = Не СтрНачинаетсяС(URL, "http://");
|
ЗащищенноеСоединение = Не СтрНачинаетсяС(URL, "http://");
|
||||||
|
|
||||||
URL = СтрЗаменить(URL, "https://", "");
|
URL = СтрЗаменить(URL, "https://", "");
|
||||||
URL = СтрЗаменить(URL, "http://" , "");
|
URL = СтрЗаменить(URL, "http://" , "");
|
||||||
URL = СтрЗаменить(URL, ":443" , "");
|
URL = СтрЗаменить(URL, ":443" , "");
|
||||||
@@ -394,7 +394,7 @@
|
|||||||
Сервер = Лев(URL, СтрНайти(URL, "/", НаправлениеПоиска.СНачала) - 1);
|
Сервер = Лев(URL, СтрНайти(URL, "/", НаправлениеПоиска.СНачала) - 1);
|
||||||
КонецЕсли;
|
КонецЕсли;
|
||||||
|
|
||||||
Если ЭтоOneScript() И ЗащищенноеСоединение Тогда
|
Если ЭтоOneScript() И ЗащищенноеСоединение Тогда
|
||||||
Сервер = "https://" + Сервер;
|
Сервер = "https://" + Сервер;
|
||||||
КонецЕсли;
|
КонецЕсли;
|
||||||
|
|
||||||
@@ -913,7 +913,7 @@
|
|||||||
Сервер = СтруктураURL["Сервер"];
|
Сервер = СтруктураURL["Сервер"];
|
||||||
Адрес = СтруктураURL["Адрес"];
|
Адрес = СтруктураURL["Адрес"];
|
||||||
Защищенное = СтруктураURL["Защищенное"];
|
Защищенное = СтруктураURL["Защищенное"];
|
||||||
|
|
||||||
ТелоЗапроса = ПолучитьИмяВременногоФайла();
|
ТелоЗапроса = ПолучитьИмяВременногоФайла();
|
||||||
|
|
||||||
Запрос = СоздатьЗапросМультипарт(Адрес, Параметры, Файлы, ДопЗаголовки, ТелоЗапроса, ТипКонтента);
|
Запрос = СоздатьЗапросМультипарт(Адрес, Параметры, Файлы, ДопЗаголовки, ТелоЗапроса, ТипКонтента);
|
||||||
@@ -939,7 +939,7 @@
|
|||||||
Сервер = СтруктураURL["Сервер"];
|
Сервер = СтруктураURL["Сервер"];
|
||||||
Адрес = СтруктураURL["Адрес"];
|
Адрес = СтруктураURL["Адрес"];
|
||||||
Защищенное = СтруктураURL["Защищенное"];
|
Защищенное = СтруктураURL["Защищенное"];
|
||||||
|
|
||||||
ТелоЗапроса = ПолучитьИмяВременногоФайла();
|
ТелоЗапроса = ПолучитьИмяВременногоФайла();
|
||||||
|
|
||||||
Запрос = СоздатьЗапросМультипартРелэйтед(Адрес, Файлы, JSON, ДопЗаголовки, ТелоЗапроса);
|
Запрос = СоздатьЗапросМультипартРелэйтед(Адрес, Файлы, JSON, ДопЗаголовки, ТелоЗапроса);
|
||||||
|
|||||||
Reference in New Issue
Block a user