rail-locator-api 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.markdown +39 -1
- data/lib/rail-locator-api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: da757da5a995acefce054caa13481192c75e90601232a8d91f60da72d76fbae9
|
|
4
|
+
data.tar.gz: 8873e45d2446b3b5704691c9fed01a38c9be37e9bfa320952840957d3c6188cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2cccb68cee0ae41504f7f1e0c9fab054fd182eaebe43f86815c36c5f35b0b6f575ddccbaac0dfdff0bde1e35488bfe024edbdb7e010662352fca541fe4753da2
|
|
7
|
+
data.tar.gz: 99489e413ed24932c1fe7a82fac11a201abecf47474b7e8ccbad2c4a3290f7509b19c82cb6621cf640e35b5dfa776a9682740c706fad7706955057d15ed93f68
|
data/README.markdown
CHANGED
|
@@ -43,6 +43,8 @@ API wrapper для RailLocator API v2
|
|
|
43
43
|
8. [Справочники](#references)
|
|
44
44
|
1. [Получение Координат Станции](#references_station_get)
|
|
45
45
|
2. [Получение Списка Станций С Краткой Информацией](#references_stations_get)
|
|
46
|
+
9. [Рассылки](#emailings)
|
|
47
|
+
1. [Создание Рассылки](#emailings_post)
|
|
46
48
|
|
|
47
49
|
# <a name="install"></a> Установка
|
|
48
50
|
|
|
@@ -499,4 +501,40 @@ p response.body
|
|
|
499
501
|
```ruby
|
|
500
502
|
response = RailLocatorApi::Request.references.stations.retrieve(params: {station_code: "111"})
|
|
501
503
|
p response.body
|
|
502
|
-
```
|
|
504
|
+
```
|
|
505
|
+
## <a name="emailings"></a> Рассылки
|
|
506
|
+
### <a name="emailings_post"></a> [Создание Рассылки](http://soap.ctm.ru:8112/api/v2.0/redoc#tag/Rassylki/operation/__________________emailings_post)
|
|
507
|
+
|
|
508
|
+
```ruby
|
|
509
|
+
request = {
|
|
510
|
+
"title": "Название рассылки",
|
|
511
|
+
"data_source": "groups",
|
|
512
|
+
"data_ids": [
|
|
513
|
+
"1234",
|
|
514
|
+
"12345"
|
|
515
|
+
],
|
|
516
|
+
"recipients": [
|
|
517
|
+
"example@mail.ru"
|
|
518
|
+
],
|
|
519
|
+
"sending_days": [
|
|
520
|
+
"Sun",
|
|
521
|
+
"Mon",
|
|
522
|
+
"Tue",
|
|
523
|
+
"Wed",
|
|
524
|
+
"Thu",
|
|
525
|
+
"Fri",
|
|
526
|
+
"Sat"
|
|
527
|
+
],
|
|
528
|
+
"sending_times": [
|
|
529
|
+
"08:00:00",
|
|
530
|
+
"17:00:00"
|
|
531
|
+
],
|
|
532
|
+
"template_title": "Тема письма",
|
|
533
|
+
"template_content": "Текст письма",
|
|
534
|
+
"active_objects": true,
|
|
535
|
+
"language": "ru",
|
|
536
|
+
"user_note": "Примечание"
|
|
537
|
+
}
|
|
538
|
+
response = RailLocatorApi::Request.emailings.create(body: request)
|
|
539
|
+
p response.body
|
|
540
|
+
```
|