yandex360 1.1.1 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +7 -5
- data/.github/workflows/ci.yml +1 -1
- data/Gemfile.lock +1 -2
- data/README.md +4 -3
- data/lib/yandex360/resources/users.rb +4 -0
- data/lib/yandex360/version.rb +1 -1
- data/lib/yandex360.rb +0 -1
- data/yandex360.gemspec +1 -2
- metadata +2 -57
- data/spec/antispam_spec.rb +0 -46
- data/spec/client_spec.rb +0 -24
- data/spec/departments_spec.rb +0 -131
- data/spec/groups_spec.rb +0 -133
- data/spec/spec_helper.rb +0 -59
- data/spec/users_spec.rb +0 -203
- data/spec/vcr/anispam/create.yml +0 -43
- data/spec/vcr/anispam/delete.yml +0 -41
- data/spec/vcr/anispam/list.yml +0 -41
- data/spec/vcr/departments/add_alias.yml +0 -43
- data/spec/vcr/departments/create.yml +0 -43
- data/spec/vcr/departments/delete.yml +0 -41
- data/spec/vcr/departments/delete_alias.yml +0 -41
- data/spec/vcr/departments/delete_error.yml +0 -37
- data/spec/vcr/departments/info.yml +0 -41
- data/spec/vcr/departments/list.yml +0 -41
- data/spec/vcr/departments/update.yml +0 -44
- data/spec/vcr/groups/add_user.yml +0 -43
- data/spec/vcr/groups/create.yml +0 -43
- data/spec/vcr/groups/delete.yml +0 -41
- data/spec/vcr/groups/delete_user.yml +0 -41
- data/spec/vcr/groups/list.yml +0 -48
- data/spec/vcr/groups/params.yml +0 -41
- data/spec/vcr/groups/update.yml +0 -43
- data/spec/vcr/groups/users.yml +0 -41
- data/spec/vcr/users/add.yml +0 -43
- data/spec/vcr/users/add_alias.yml +0 -43
- data/spec/vcr/users/delete_alias.yml +0 -41
- data/spec/vcr/users/get2FA.yml +0 -41
- data/spec/vcr/users/get2FA_error.yml +0 -37
- data/spec/vcr/users/has2FA.yml +0 -41
- data/spec/vcr/users/info.yml +0 -41
- data/spec/vcr/users/list.yml +0 -41
- data/spec/vcr/users/list_error.yml +0 -37
- data/spec/vcr/users/update.yml +0 -44
data/spec/users_spec.rb
DELETED
@@ -1,203 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "spec_helper"
|
4
|
-
require "yandex360"
|
5
|
-
|
6
|
-
RSpec.describe "#users.list" do
|
7
|
-
let(:org_id) { "1234567" }
|
8
|
-
|
9
|
-
context "with params" do
|
10
|
-
subject(:resp) do
|
11
|
-
VCR.use_cassette("users/list") do
|
12
|
-
@yandex360.users.list(org_id: org_id)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
it { expect(resp).to be_an(Yandex360::Collection) }
|
17
|
-
it { expect(resp.data.first).to be_an(Yandex360::User) }
|
18
|
-
end
|
19
|
-
|
20
|
-
context "with error" do
|
21
|
-
let(:org_id) { "3287461283" }
|
22
|
-
subject(:resp) do
|
23
|
-
VCR.use_cassette("users/list_error") do
|
24
|
-
@yandex360.users.list(org_id: org_id)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
it { expect { resp }.to raise_error(Yandex360::Error, /not allowed/) }
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
RSpec.describe "#users.add" do
|
33
|
-
let(:org_id) { "1234567" }
|
34
|
-
|
35
|
-
context "with params" do
|
36
|
-
subject(:resp) do
|
37
|
-
VCR.use_cassette("users/add") do
|
38
|
-
@yandex360.users.add(
|
39
|
-
org_id: org_id,
|
40
|
-
dep_id: 1,
|
41
|
-
about: "Yandex360",
|
42
|
-
name: {
|
43
|
-
first: "Ivan",
|
44
|
-
last: "Ivanov",
|
45
|
-
middle: "Ruby"
|
46
|
-
},
|
47
|
-
nickname: "yandex360",
|
48
|
-
password: "W!846f456678"
|
49
|
-
)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
it { expect(resp).to be_an(Yandex360::User) }
|
53
|
-
it { expect(resp.name.first).to eq "Ivan" }
|
54
|
-
it { expect(resp.about).to eq "Yandex360" }
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
RSpec.describe "#users.update" do
|
59
|
-
let(:user_id) { "1130000061922106" }
|
60
|
-
let(:org_id) { "1234567" }
|
61
|
-
|
62
|
-
context "with params" do
|
63
|
-
subject(:resp) do
|
64
|
-
VCR.use_cassette("users/update") do
|
65
|
-
@yandex360.users.update(
|
66
|
-
org_id: org_id,
|
67
|
-
user_id: user_id,
|
68
|
-
about: "Yandex360 - Ruby API gem",
|
69
|
-
name: {
|
70
|
-
first: "Ruby",
|
71
|
-
last: "gem",
|
72
|
-
middle: "API"
|
73
|
-
},
|
74
|
-
nickname: "yandex360-ruby-api-client",
|
75
|
-
password: "passswrrdwithstrrngscrrty"
|
76
|
-
)
|
77
|
-
end
|
78
|
-
end
|
79
|
-
it { expect(resp).to be_an(Yandex360::User) }
|
80
|
-
it { expect(resp.id).to eq user_id }
|
81
|
-
it { expect(resp.name.first).to eq "Ruby" }
|
82
|
-
it { expect(resp.about).to eq "Yandex360 - Ruby API gem" }
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
RSpec.describe "#users.add_alias" do
|
87
|
-
let(:org_id) { "1234567" }
|
88
|
-
let(:user_id) { "1130000018743049" }
|
89
|
-
let(:user_alias) { "ruby_gem_api" }
|
90
|
-
|
91
|
-
context "with params" do
|
92
|
-
subject(:resp) do
|
93
|
-
VCR.use_cassette("users/add_alias") do
|
94
|
-
@yandex360.users.add_alias org_id: org_id, user_id: user_id, user_alias: user_alias
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
it { expect(resp).to be_an(Yandex360::User) }
|
99
|
-
it { expect(resp.aliases.first).to eq user_alias }
|
100
|
-
end
|
101
|
-
end
|
102
|
-
|
103
|
-
RSpec.describe "#users.delete_alias" do
|
104
|
-
let(:org_id) { "1234567" }
|
105
|
-
let(:user_id) { "1130000018743049" }
|
106
|
-
let(:user_alias) { "ruby_gem_api" }
|
107
|
-
|
108
|
-
context "with params" do
|
109
|
-
subject(:resp) do
|
110
|
-
VCR.use_cassette("users/delete_alias") do
|
111
|
-
@yandex360.users.delete_alias org_id: org_id, user_id: user_id, user_alias: user_alias
|
112
|
-
end
|
113
|
-
end
|
114
|
-
|
115
|
-
it { expect(resp).to be_an(Yandex360::Alias) }
|
116
|
-
it { expect(resp.alias).to eq user_alias }
|
117
|
-
it { expect(resp.removed).to be(true) }
|
118
|
-
end
|
119
|
-
end
|
120
|
-
|
121
|
-
RSpec.describe "#users.has2FA" do
|
122
|
-
let(:org_id) { "1234567" }
|
123
|
-
let(:user_id) { "1130000018743049" }
|
124
|
-
|
125
|
-
context "with params" do
|
126
|
-
subject(:resp) do
|
127
|
-
VCR.use_cassette("users/has2FA") do
|
128
|
-
@yandex360.users.has2FA? org_id: org_id, user_id: user_id
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
|
-
it { expect(resp).to be(true).or be(false) }
|
133
|
-
end
|
134
|
-
end
|
135
|
-
|
136
|
-
RSpec.describe "#users.get2FA" do
|
137
|
-
let(:org_id) { "1234567" }
|
138
|
-
let(:user_id) { "1130000018743049" }
|
139
|
-
|
140
|
-
context "with params" do
|
141
|
-
subject(:resp) do
|
142
|
-
VCR.use_cassette("users/get2FA") do
|
143
|
-
@yandex360.users.get2FA(org_id: org_id, user_id: user_id)
|
144
|
-
end
|
145
|
-
end
|
146
|
-
|
147
|
-
it { expect(resp).to be_an(Yandex360::Object) }
|
148
|
-
it { expect(resp.userId).to eq(user_id) }
|
149
|
-
it { expect(resp.has2fa).to be(true).or be(false) }
|
150
|
-
end
|
151
|
-
|
152
|
-
context "with error" do
|
153
|
-
subject(:resp) do
|
154
|
-
VCR.use_cassette("users/get2FA_error") do
|
155
|
-
@yandex360.users.get2FA(org_id: 123, user_id: 123)
|
156
|
-
end
|
157
|
-
end
|
158
|
-
|
159
|
-
it { expect { resp }.to raise_error(Yandex360::Error, /not allowed/) }
|
160
|
-
end
|
161
|
-
end
|
162
|
-
|
163
|
-
RSpec.describe "#users.has2FA" do
|
164
|
-
let(:org_id) { "1234567" }
|
165
|
-
let(:user_id) { "1130000018743049" }
|
166
|
-
|
167
|
-
context "with params" do
|
168
|
-
subject(:resp) do
|
169
|
-
VCR.use_cassette("users/has2FA") do
|
170
|
-
@yandex360.users.has2FA? org_id: org_id, user_id: user_id
|
171
|
-
end
|
172
|
-
end
|
173
|
-
|
174
|
-
it { expect(resp).to be(true).or be(false) }
|
175
|
-
end
|
176
|
-
end
|
177
|
-
|
178
|
-
RSpec.describe "#users.info" do
|
179
|
-
let(:org_id) { "1234567" }
|
180
|
-
let(:user_id) { "987654321" }
|
181
|
-
|
182
|
-
context "with params" do
|
183
|
-
subject(:resp) do
|
184
|
-
VCR.use_cassette("users/info") do
|
185
|
-
@yandex360.users.info(org_id: org_id, user_id: user_id)
|
186
|
-
end
|
187
|
-
end
|
188
|
-
|
189
|
-
it { expect(resp).to be_an(Yandex360::User) }
|
190
|
-
it { expect(resp.name).to be_an(OpenStruct) }
|
191
|
-
it { expect(resp.contacts).to be_an(Array) }
|
192
|
-
end
|
193
|
-
|
194
|
-
context "without params" do
|
195
|
-
subject(:resp) do
|
196
|
-
VCR.use_cassette("users_info") do
|
197
|
-
@yandex360.users.info
|
198
|
-
end
|
199
|
-
end
|
200
|
-
|
201
|
-
it { expect { resp }.to raise_error(ArgumentError) }
|
202
|
-
end
|
203
|
-
end
|
data/spec/vcr/anispam/create.yml
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://api360.yandex.net/admin/v1/org/1234567/mail/antispam/allowlist/ips
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"allowList":["127.0.0.1","172.0.1.10"]}'
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v1.10.2
|
12
|
-
Authorization:
|
13
|
-
- TOKEN
|
14
|
-
Content-Type:
|
15
|
-
- application/json
|
16
|
-
Accept-Encoding:
|
17
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
-
Accept:
|
19
|
-
- "*/*"
|
20
|
-
response:
|
21
|
-
status:
|
22
|
-
code: 200
|
23
|
-
message: OK
|
24
|
-
headers:
|
25
|
-
Content-Type:
|
26
|
-
- application/json
|
27
|
-
Date:
|
28
|
-
- Sat, 15 Oct 2022 11:29:15 GMT
|
29
|
-
Grpc-Status:
|
30
|
-
- '0'
|
31
|
-
Grpc-Message:
|
32
|
-
- OK
|
33
|
-
Content-Length:
|
34
|
-
- '2'
|
35
|
-
Server:
|
36
|
-
- api360
|
37
|
-
X-Request-Id:
|
38
|
-
- '09887e4f-02dc-4fc0-aac9-4cfdb5ccf8e6'
|
39
|
-
body:
|
40
|
-
encoding: UTF-8
|
41
|
-
string: "{}"
|
42
|
-
recorded_at: Sat, 15 Oct 2022 11:29:15 GMT
|
43
|
-
recorded_with: VCR 6.1.0
|
data/spec/vcr/anispam/delete.yml
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: delete
|
5
|
-
uri: https://api360.yandex.net/admin/v1/org/1234567/mail/antispam/allowlist/ips
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v1.10.2
|
12
|
-
Authorization:
|
13
|
-
- TOKEN
|
14
|
-
Accept-Encoding:
|
15
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
-
Accept:
|
17
|
-
- "*/*"
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 200
|
21
|
-
message: OK
|
22
|
-
headers:
|
23
|
-
Content-Type:
|
24
|
-
- application/json
|
25
|
-
Date:
|
26
|
-
- Sat, 15 Oct 2022 11:30:51 GMT
|
27
|
-
Grpc-Status:
|
28
|
-
- '0'
|
29
|
-
Grpc-Message:
|
30
|
-
- OK
|
31
|
-
Content-Length:
|
32
|
-
- '2'
|
33
|
-
Server:
|
34
|
-
- api360
|
35
|
-
X-Request-Id:
|
36
|
-
- 56193e69-ff82-42e7-8770-d24c1fddd07f
|
37
|
-
body:
|
38
|
-
encoding: UTF-8
|
39
|
-
string: "{}"
|
40
|
-
recorded_at: Sat, 15 Oct 2022 11:30:51 GMT
|
41
|
-
recorded_with: VCR 6.1.0
|
data/spec/vcr/anispam/list.yml
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://api360.yandex.net/admin/v1/org/1234567/mail/antispam/allowlist/ips
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v1.10.2
|
12
|
-
Authorization:
|
13
|
-
- TOKEN
|
14
|
-
Accept-Encoding:
|
15
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
-
Accept:
|
17
|
-
- "*/*"
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 200
|
21
|
-
message: OK
|
22
|
-
headers:
|
23
|
-
Content-Type:
|
24
|
-
- application/json
|
25
|
-
Date:
|
26
|
-
- Sat, 15 Oct 2022 11:29:15 GMT
|
27
|
-
Grpc-Status:
|
28
|
-
- '0'
|
29
|
-
Grpc-Message:
|
30
|
-
- OK
|
31
|
-
Content-Length:
|
32
|
-
- '40'
|
33
|
-
Server:
|
34
|
-
- api360
|
35
|
-
X-Request-Id:
|
36
|
-
- d51ba76c-429d-4e9b-920c-0e34ba77f461
|
37
|
-
body:
|
38
|
-
encoding: UTF-8
|
39
|
-
string: '{"allowList":["127.0.0.1","172.0.1.10"]}'
|
40
|
-
recorded_at: Sat, 15 Oct 2022 11:29:15 GMT
|
41
|
-
recorded_with: VCR 6.1.0
|
@@ -1,43 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://api360.yandex.net/directory/v1/org/1234567/departments/13/aliases
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"alias":"support-team"}'
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v1.10.2
|
12
|
-
Authorization:
|
13
|
-
- TOKEN
|
14
|
-
Content-Type:
|
15
|
-
- application/json
|
16
|
-
Accept-Encoding:
|
17
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
-
Accept:
|
19
|
-
- "*/*"
|
20
|
-
response:
|
21
|
-
status:
|
22
|
-
code: 200
|
23
|
-
message: OK
|
24
|
-
headers:
|
25
|
-
Content-Type:
|
26
|
-
- application/json
|
27
|
-
Date:
|
28
|
-
- Fri, 14 Oct 2022 12:23:15 GMT
|
29
|
-
Grpc-Status:
|
30
|
-
- '0'
|
31
|
-
Grpc-Message:
|
32
|
-
- OK
|
33
|
-
Content-Length:
|
34
|
-
- '240'
|
35
|
-
Server:
|
36
|
-
- api360
|
37
|
-
X-Request-Id:
|
38
|
-
- 78978203-a92f-4b6c-9c30-f8a60f4bdad9
|
39
|
-
body:
|
40
|
-
encoding: UTF-8
|
41
|
-
string: '{"id":13,"name":"Support Team","parentId":1,"description":"Yandex360","externalId":"","label":"support-team","email":"support-team@example.ru","headId":"0","membersCount":0,"aliases":["support-team"],"createdAt":"2022-10-14T12:23:13.909Z"}'
|
42
|
-
recorded_at: Fri, 14 Oct 2022 12:23:16 GMT
|
43
|
-
recorded_with: VCR 6.1.0
|
@@ -1,43 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://api360.yandex.net/directory/v1/org/1234567/departments
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"parentId":1,"name":"Support"}'
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v1.10.2
|
12
|
-
Authorization:
|
13
|
-
- TOKEN
|
14
|
-
Content-Type:
|
15
|
-
- application/json
|
16
|
-
Accept-Encoding:
|
17
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
-
Accept:
|
19
|
-
- "*/*"
|
20
|
-
response:
|
21
|
-
status:
|
22
|
-
code: 200
|
23
|
-
message: OK
|
24
|
-
headers:
|
25
|
-
Content-Type:
|
26
|
-
- application/json
|
27
|
-
Date:
|
28
|
-
- Fri, 14 Oct 2022 12:23:14 GMT
|
29
|
-
Grpc-Status:
|
30
|
-
- '0'
|
31
|
-
Grpc-Message:
|
32
|
-
- OK
|
33
|
-
Content-Length:
|
34
|
-
- '176'
|
35
|
-
Server:
|
36
|
-
- api360
|
37
|
-
X-Request-Id:
|
38
|
-
- 84738e03-3b04-4459-ac42-20ae8e3814bb
|
39
|
-
body:
|
40
|
-
encoding: UTF-8
|
41
|
-
string: '{"id":13,"name":"Support","parentId":1,"description":"","externalId":"","label":"","email":"","headId":"0","membersCount":0,"aliases":[],"createdAt":"2022-10-14T12:23:13.909Z"}'
|
42
|
-
recorded_at: Fri, 14 Oct 2022 12:23:14 GMT
|
43
|
-
recorded_with: VCR 6.1.0
|
@@ -1,41 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: delete
|
5
|
-
uri: https://api360.yandex.net/directory/v1/org/1234567/departments/13
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v1.10.2
|
12
|
-
Authorization:
|
13
|
-
- TOKEN
|
14
|
-
Accept-Encoding:
|
15
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
-
Accept:
|
17
|
-
- "*/*"
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 200
|
21
|
-
message: OK
|
22
|
-
headers:
|
23
|
-
Content-Type:
|
24
|
-
- application/json
|
25
|
-
Date:
|
26
|
-
- Fri, 14 Oct 2022 12:23:17 GMT
|
27
|
-
Grpc-Status:
|
28
|
-
- '0'
|
29
|
-
Grpc-Message:
|
30
|
-
- OK
|
31
|
-
Content-Length:
|
32
|
-
- '24'
|
33
|
-
Server:
|
34
|
-
- api360
|
35
|
-
X-Request-Id:
|
36
|
-
- c178cb13-7678-4eb2-8ba4-d79b6c310008
|
37
|
-
body:
|
38
|
-
encoding: UTF-8
|
39
|
-
string: '{"id":13,"removed":true}'
|
40
|
-
recorded_at: Fri, 14 Oct 2022 12:23:17 GMT
|
41
|
-
recorded_with: VCR 6.1.0
|
@@ -1,41 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: delete
|
5
|
-
uri: https://api360.yandex.net/directory/v1/org/1234567/departments/13/aliases/support-team
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v1.10.2
|
12
|
-
Authorization:
|
13
|
-
- TOKEN
|
14
|
-
Accept-Encoding:
|
15
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
-
Accept:
|
17
|
-
- "*/*"
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 200
|
21
|
-
message: OK
|
22
|
-
headers:
|
23
|
-
Content-Type:
|
24
|
-
- application/json
|
25
|
-
Date:
|
26
|
-
- Fri, 14 Oct 2022 12:23:16 GMT
|
27
|
-
Grpc-Status:
|
28
|
-
- '0'
|
29
|
-
Grpc-Message:
|
30
|
-
- OK
|
31
|
-
Content-Length:
|
32
|
-
- '39'
|
33
|
-
Server:
|
34
|
-
- api360
|
35
|
-
X-Request-Id:
|
36
|
-
- 41abba20-602a-4a9e-94fe-ced93fd801cb
|
37
|
-
body:
|
38
|
-
encoding: UTF-8
|
39
|
-
string: '{"alias":"support-team","removed":true}'
|
40
|
-
recorded_at: Fri, 14 Oct 2022 12:23:16 GMT
|
41
|
-
recorded_with: VCR 6.1.0
|
@@ -1,37 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: delete
|
5
|
-
uri: https://api360.yandex.net/directory/v1/org/1234567/departments/13
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v1.10.2
|
12
|
-
Authorization:
|
13
|
-
- TOKEN
|
14
|
-
Accept-Encoding:
|
15
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
-
Accept:
|
17
|
-
- "*/*"
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 404
|
21
|
-
message: Not Found
|
22
|
-
headers:
|
23
|
-
Content-Type:
|
24
|
-
- application/json
|
25
|
-
Date:
|
26
|
-
- Fri, 14 Oct 2022 12:23:17 GMT
|
27
|
-
Content-Length:
|
28
|
-
- '45'
|
29
|
-
Server:
|
30
|
-
- api360
|
31
|
-
X-Request-Id:
|
32
|
-
- 51eda7ab-299f-4846-90b5-19c94a63b405
|
33
|
-
body:
|
34
|
-
encoding: UTF-8
|
35
|
-
string: '{"code":5,"message":"not_found","details":[]}'
|
36
|
-
recorded_at: Fri, 14 Oct 2022 12:23:17 GMT
|
37
|
-
recorded_with: VCR 6.1.0
|
@@ -1,41 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://api360.yandex.net/directory/v1/org/1234567/departments/13
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v1.10.2
|
12
|
-
Authorization:
|
13
|
-
- TOKEN
|
14
|
-
Accept-Encoding:
|
15
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
-
Accept:
|
17
|
-
- "*/*"
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 200
|
21
|
-
message: OK
|
22
|
-
headers:
|
23
|
-
Content-Type:
|
24
|
-
- application/json
|
25
|
-
Date:
|
26
|
-
- Fri, 14 Oct 2022 12:23:15 GMT
|
27
|
-
Grpc-Status:
|
28
|
-
- '0'
|
29
|
-
Grpc-Message:
|
30
|
-
- OK
|
31
|
-
Content-Length:
|
32
|
-
- '226'
|
33
|
-
Server:
|
34
|
-
- api360
|
35
|
-
X-Request-Id:
|
36
|
-
- 2257ab6f-92d9-4356-bb13-6a97b0a23812
|
37
|
-
body:
|
38
|
-
encoding: UTF-8
|
39
|
-
string: '{"id":13,"name":"Support Team","parentId":1,"description":"Yandex360","externalId":"","label":"support-team","email":"support-team@example.ru","headId":"0","membersCount":0,"aliases":[],"createdAt":"2022-10-14T12:23:13.909Z"}'
|
40
|
-
recorded_at: Fri, 14 Oct 2022 12:23:15 GMT
|
41
|
-
recorded_with: VCR 6.1.0
|
@@ -1,41 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://api360.yandex.net/directory/v1/org/1234567/departments?orderBy=id&page=1&parentId=0&perPage=10
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v1.10.2
|
12
|
-
Authorization:
|
13
|
-
- TOKEN
|
14
|
-
Accept-Encoding:
|
15
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
-
Accept:
|
17
|
-
- "*/*"
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 200
|
21
|
-
message: OK
|
22
|
-
headers:
|
23
|
-
Content-Type:
|
24
|
-
- application/json
|
25
|
-
Date:
|
26
|
-
- Fri, 14 Oct 2022 12:23:13 GMT
|
27
|
-
Grpc-Status:
|
28
|
-
- '0'
|
29
|
-
Grpc-Message:
|
30
|
-
- OK
|
31
|
-
Content-Length:
|
32
|
-
- '1008'
|
33
|
-
Server:
|
34
|
-
- api360
|
35
|
-
X-Request-Id:
|
36
|
-
- 7b5805d9-c678-4c64-b1eb-941ccd26fb7a
|
37
|
-
body:
|
38
|
-
encoding: UTF-8
|
39
|
-
string: '{"departments":[{"id":1,"name":"Все сотрудники","parentId":0,"description":"","externalId":"","label":"","email":"","headId":"0","membersCount":28,"aliases":[],"createdAt":"2018-08-13T09:28:29.434Z"},{"id":3,"name":"Golang developers","parentId":1,"description":"гоферы","externalId":"","label":"go-devs","email":"go-devs@example.ru","headId":"0","membersCount":0,"aliases":[],"createdAt":"2022-10-07T16:00:02.931Z"},{"id":6,"name":"juniors","parentId":3,"description":"","externalId":"","label":"","email":"","headId":"0","membersCount":0,"aliases":[],"createdAt":"2022-10-07T16:01:51.472Z"},{"id":7,"name":"middles","parentId":3,"description":"","externalId":"","label":"","email":"","headId":"0","membersCount":0,"aliases":[],"createdAt":"2022-10-07T16:01:58.985Z"},{"id":8,"name":"seniors","parentId":3,"description":"","externalId":"","label":"","email":"","headId":"0","membersCount":0,"aliases":[],"createdAt":"2022-10-07T16:02:06.572Z"}],"page":1,"pages":1,"perPage":10,"total":5}'
|
40
|
-
recorded_at: Fri, 14 Oct 2022 12:23:13 GMT
|
41
|
-
recorded_with: VCR 6.1.0
|
@@ -1,44 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: patch
|
5
|
-
uri: https://api360.yandex.net/directory/v1/org/1234567/departments/13
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"orgId":"1234567","departmentId":"13","parentId":"1","description":"Yandex360","name":"Support
|
9
|
-
Team","label":"support-team"}'
|
10
|
-
headers:
|
11
|
-
User-Agent:
|
12
|
-
- Faraday v1.10.2
|
13
|
-
Authorization:
|
14
|
-
- TOKEN
|
15
|
-
Content-Type:
|
16
|
-
- application/json
|
17
|
-
Accept-Encoding:
|
18
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
19
|
-
Accept:
|
20
|
-
- "*/*"
|
21
|
-
response:
|
22
|
-
status:
|
23
|
-
code: 200
|
24
|
-
message: OK
|
25
|
-
headers:
|
26
|
-
Content-Type:
|
27
|
-
- application/json
|
28
|
-
Date:
|
29
|
-
- Fri, 14 Oct 2022 12:23:15 GMT
|
30
|
-
Grpc-Status:
|
31
|
-
- '0'
|
32
|
-
Grpc-Message:
|
33
|
-
- OK
|
34
|
-
Content-Length:
|
35
|
-
- '226'
|
36
|
-
Server:
|
37
|
-
- api360
|
38
|
-
X-Request-Id:
|
39
|
-
- 1e84178e-c771-4f85-b6ea-02a2411056e3
|
40
|
-
body:
|
41
|
-
encoding: UTF-8
|
42
|
-
string: '{"id":13,"name":"Support Team","parentId":1,"description":"Yandex360","externalId":"","label":"support-team","email":"support-team@example.ru","headId":"0","membersCount":0,"aliases":[],"createdAt":"2022-10-14T12:23:13.909Z"}'
|
43
|
-
recorded_at: Fri, 14 Oct 2022 12:23:15 GMT
|
44
|
-
recorded_with: VCR 6.1.0
|