fabricio 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.codeclimate.yml +12 -0
- data/.idea/runConfigurations/IRB_console__fabricio.xml +23 -0
- data/.rspec +2 -0
- data/.rubocop.yml +1156 -0
- data/.travis.yml +10 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +149 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/docs/api_reference.md +611 -0
- data/docs/swagger-api.json +553 -0
- data/fabricio.gemspec +29 -0
- data/lib/fabricio.rb +2 -0
- data/lib/fabricio/authorization/abstract_session_storage.rb +26 -0
- data/lib/fabricio/authorization/authorization_client.rb +122 -0
- data/lib/fabricio/authorization/memory_session_storage.rb +35 -0
- data/lib/fabricio/authorization/session.rb +21 -0
- data/lib/fabricio/client/client.rb +92 -0
- data/lib/fabricio/models/abstract_model.rb +17 -0
- data/lib/fabricio/models/app.rb +24 -0
- data/lib/fabricio/models/build.rb +23 -0
- data/lib/fabricio/models/organization.rb +22 -0
- data/lib/fabricio/models/point.rb +17 -0
- data/lib/fabricio/networking/app_request_model_factory.rb +229 -0
- data/lib/fabricio/networking/build_request_model_factory.rb +103 -0
- data/lib/fabricio/networking/network_client.rb +101 -0
- data/lib/fabricio/networking/organization_request_model_factory.rb +27 -0
- data/lib/fabricio/networking/request_model.rb +39 -0
- data/lib/fabricio/services/app_service.rb +146 -0
- data/lib/fabricio/services/build_service.rb +59 -0
- data/lib/fabricio/services/organization_service.rb +33 -0
- data/lib/fabricio/version.rb +3 -0
- metadata +163 -0
@@ -0,0 +1,553 @@
|
|
1
|
+
{
|
2
|
+
"swagger": "2.0",
|
3
|
+
"info": {
|
4
|
+
"title": "API-Flow Swagger Conversion",
|
5
|
+
"version": "0.0.0"
|
6
|
+
},
|
7
|
+
"host": "fabric.io",
|
8
|
+
"paths": {
|
9
|
+
"/oauth/token": {
|
10
|
+
"post": {
|
11
|
+
"summary": "OAuth",
|
12
|
+
"operationId": "927daca5-3c3c-4f67-91ed-f7a5253075d6",
|
13
|
+
"consumes": [
|
14
|
+
"application/json"
|
15
|
+
],
|
16
|
+
"parameters": [
|
17
|
+
{
|
18
|
+
"name": "body",
|
19
|
+
"in": "body",
|
20
|
+
"schema": {
|
21
|
+
"type": "string",
|
22
|
+
"default": "{\"grant_type\":\"password\",\"scope\":\"organizations apps issues features account twitter_client_apps beta software answers\",\"username\":\"email@rambler.ru\",\"password\":\"pa$$word\",\"client_id\":\"your_client_id\",\"client_secret\":\"your_client_secret\"}"
|
23
|
+
}
|
24
|
+
}
|
25
|
+
],
|
26
|
+
"responses": {
|
27
|
+
"default": {
|
28
|
+
"description": "stub description for swagger compliance"
|
29
|
+
}
|
30
|
+
},
|
31
|
+
"security": []
|
32
|
+
}
|
33
|
+
},
|
34
|
+
"/api/v2/organizations": {
|
35
|
+
"get": {
|
36
|
+
"summary": "Get Organization",
|
37
|
+
"operationId": "1ba2364d-f093-4221-8af0-8ebd54ffa2e0",
|
38
|
+
"parameters": [
|
39
|
+
{
|
40
|
+
"name": "Authorization",
|
41
|
+
"required": false,
|
42
|
+
"in": "header",
|
43
|
+
"default": "Bearer {access_token}",
|
44
|
+
"type": "string",
|
45
|
+
"enum": [
|
46
|
+
"Bearer {access_token}"
|
47
|
+
],
|
48
|
+
"x-title": "Authorization"
|
49
|
+
}
|
50
|
+
],
|
51
|
+
"responses": {
|
52
|
+
"default": {
|
53
|
+
"description": "stub description for swagger compliance"
|
54
|
+
}
|
55
|
+
},
|
56
|
+
"security": []
|
57
|
+
}
|
58
|
+
},
|
59
|
+
"/api/v2/apps": {
|
60
|
+
"get": {
|
61
|
+
"summary": "Get All Apps",
|
62
|
+
"operationId": "8f3cdfab-68f2-4972-84d3-3ab77a7c2fe3",
|
63
|
+
"parameters": [
|
64
|
+
{
|
65
|
+
"name": "Authorization",
|
66
|
+
"required": false,
|
67
|
+
"in": "header",
|
68
|
+
"default": "Bearer {access_token}",
|
69
|
+
"type": "string",
|
70
|
+
"enum": [
|
71
|
+
"Bearer {access_token}"
|
72
|
+
],
|
73
|
+
"x-title": "Authorization"
|
74
|
+
}
|
75
|
+
],
|
76
|
+
"responses": {
|
77
|
+
"default": {
|
78
|
+
"description": "stub description for swagger compliance"
|
79
|
+
}
|
80
|
+
},
|
81
|
+
"security": []
|
82
|
+
}
|
83
|
+
},
|
84
|
+
"/api/v2/apps/{app_id}": {
|
85
|
+
"get": {
|
86
|
+
"summary": "Get Single App",
|
87
|
+
"operationId": "33f04899-d209-4ffe-91ef-27d1319edf96",
|
88
|
+
"parameters": [
|
89
|
+
{
|
90
|
+
"name": "Authorization",
|
91
|
+
"required": false,
|
92
|
+
"in": "header",
|
93
|
+
"default": "Bearer {access_token}",
|
94
|
+
"type": "string",
|
95
|
+
"enum": [
|
96
|
+
"Bearer {access_token}"
|
97
|
+
],
|
98
|
+
"x-title": "Authorization"
|
99
|
+
}
|
100
|
+
],
|
101
|
+
"responses": {
|
102
|
+
"default": {
|
103
|
+
"description": "stub description for swagger compliance"
|
104
|
+
}
|
105
|
+
},
|
106
|
+
"security": []
|
107
|
+
}
|
108
|
+
},
|
109
|
+
"/api/v2/organizations/{ResponseBodyPath}/apps/{app_id}/growth_analytics/active_now.json": {
|
110
|
+
"get": {
|
111
|
+
"summary": "Get Active Now",
|
112
|
+
"operationId": "7d073ee0-e243-4eb6-ab3c-d85355acb3b7",
|
113
|
+
"parameters": [
|
114
|
+
{
|
115
|
+
"name": "ResponseBodyPath",
|
116
|
+
"required": true,
|
117
|
+
"in": "path",
|
118
|
+
"default": "{organization_id}",
|
119
|
+
"type": "string",
|
120
|
+
"x-title": "ResponseBodyPath"
|
121
|
+
},
|
122
|
+
{
|
123
|
+
"name": "Authorization",
|
124
|
+
"required": false,
|
125
|
+
"in": "header",
|
126
|
+
"default": "Bearer {access_token}",
|
127
|
+
"type": "string",
|
128
|
+
"enum": [
|
129
|
+
"Bearer {access_token}"
|
130
|
+
],
|
131
|
+
"x-title": "Authorization"
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"name": "build",
|
135
|
+
"required": false,
|
136
|
+
"in": "query",
|
137
|
+
"default": "all",
|
138
|
+
"type": "string",
|
139
|
+
"enum": [
|
140
|
+
"all"
|
141
|
+
],
|
142
|
+
"x-title": "build"
|
143
|
+
}
|
144
|
+
],
|
145
|
+
"responses": {
|
146
|
+
"default": {
|
147
|
+
"description": "stub description for swagger compliance"
|
148
|
+
}
|
149
|
+
},
|
150
|
+
"security": []
|
151
|
+
}
|
152
|
+
},
|
153
|
+
"/api/v2/organizations/{ResponseBodyPath}/apps/{app_id}/growth_analytics/daily_new.json": {
|
154
|
+
"get": {
|
155
|
+
"summary": "Get Daily New",
|
156
|
+
"operationId": "cec756dc-5279-44c0-8855-4b119e8a281e",
|
157
|
+
"parameters": [
|
158
|
+
{
|
159
|
+
"name": "ResponseBodyPath",
|
160
|
+
"required": true,
|
161
|
+
"in": "path",
|
162
|
+
"default": "{organization_id}",
|
163
|
+
"type": "string",
|
164
|
+
"x-title": "ResponseBodyPath"
|
165
|
+
},
|
166
|
+
{
|
167
|
+
"name": "Authorization",
|
168
|
+
"required": false,
|
169
|
+
"in": "header",
|
170
|
+
"default": "Bearer {access_token}",
|
171
|
+
"type": "string",
|
172
|
+
"enum": [
|
173
|
+
"Bearer {access_token}"
|
174
|
+
],
|
175
|
+
"x-title": "Authorization"
|
176
|
+
},
|
177
|
+
{
|
178
|
+
"name": "start",
|
179
|
+
"required": false,
|
180
|
+
"in": "query",
|
181
|
+
"default": "1478736000",
|
182
|
+
"type": "string",
|
183
|
+
"enum": [
|
184
|
+
"1478736000"
|
185
|
+
],
|
186
|
+
"x-title": "start"
|
187
|
+
},
|
188
|
+
{
|
189
|
+
"name": "end",
|
190
|
+
"required": false,
|
191
|
+
"in": "query",
|
192
|
+
"default": "1481328000",
|
193
|
+
"type": "string",
|
194
|
+
"enum": [
|
195
|
+
"1481328000"
|
196
|
+
],
|
197
|
+
"x-title": "end"
|
198
|
+
},
|
199
|
+
{
|
200
|
+
"name": "build",
|
201
|
+
"required": false,
|
202
|
+
"in": "query",
|
203
|
+
"default": "all",
|
204
|
+
"type": "string",
|
205
|
+
"enum": [
|
206
|
+
"all"
|
207
|
+
],
|
208
|
+
"x-title": "build"
|
209
|
+
}
|
210
|
+
],
|
211
|
+
"responses": {
|
212
|
+
"default": {
|
213
|
+
"description": "stub description for swagger compliance"
|
214
|
+
}
|
215
|
+
},
|
216
|
+
"security": []
|
217
|
+
}
|
218
|
+
},
|
219
|
+
"/api/v2/organizations/{ResponseBodyPath}/apps/{app_id}/growth_analytics/daily_active.json": {
|
220
|
+
"get": {
|
221
|
+
"summary": "Get Daily Active",
|
222
|
+
"operationId": "28ce7787-4c62-4e36-8c3d-21f22721abc6",
|
223
|
+
"parameters": [
|
224
|
+
{
|
225
|
+
"name": "ResponseBodyPath",
|
226
|
+
"required": true,
|
227
|
+
"in": "path",
|
228
|
+
"default": "{organization_id}",
|
229
|
+
"type": "string",
|
230
|
+
"x-title": "ResponseBodyPath"
|
231
|
+
},
|
232
|
+
{
|
233
|
+
"name": "Authorization",
|
234
|
+
"required": false,
|
235
|
+
"in": "header",
|
236
|
+
"default": "Bearer {access_token}",
|
237
|
+
"type": "string",
|
238
|
+
"enum": [
|
239
|
+
"Bearer {access_token}"
|
240
|
+
],
|
241
|
+
"x-title": "Authorization"
|
242
|
+
},
|
243
|
+
{
|
244
|
+
"name": "start",
|
245
|
+
"required": false,
|
246
|
+
"in": "query",
|
247
|
+
"default": "1478736000",
|
248
|
+
"type": "string",
|
249
|
+
"enum": [
|
250
|
+
"1478736000"
|
251
|
+
],
|
252
|
+
"x-title": "start"
|
253
|
+
},
|
254
|
+
{
|
255
|
+
"name": "end",
|
256
|
+
"required": false,
|
257
|
+
"in": "query",
|
258
|
+
"default": "1481328000",
|
259
|
+
"type": "string",
|
260
|
+
"enum": [
|
261
|
+
"1481328000"
|
262
|
+
],
|
263
|
+
"x-title": "end"
|
264
|
+
},
|
265
|
+
{
|
266
|
+
"name": "build",
|
267
|
+
"required": false,
|
268
|
+
"in": "query",
|
269
|
+
"default": "3.0.4 (71)",
|
270
|
+
"type": "string",
|
271
|
+
"enum": [
|
272
|
+
"3.0.4 (71)"
|
273
|
+
],
|
274
|
+
"x-title": "build"
|
275
|
+
}
|
276
|
+
],
|
277
|
+
"responses": {
|
278
|
+
"default": {
|
279
|
+
"description": "stub description for swagger compliance"
|
280
|
+
}
|
281
|
+
},
|
282
|
+
"security": []
|
283
|
+
}
|
284
|
+
},
|
285
|
+
"/graphql": {
|
286
|
+
"post": {
|
287
|
+
"x-host": "api-dash.fabric.io",
|
288
|
+
"summary": "Get OOM",
|
289
|
+
"operationId": "a3c7ab8a-6da9-4514-a49c-dd05a160a967",
|
290
|
+
"consumes": [
|
291
|
+
"application/json"
|
292
|
+
],
|
293
|
+
"parameters": [
|
294
|
+
{
|
295
|
+
"name": "Authorization",
|
296
|
+
"required": false,
|
297
|
+
"in": "header",
|
298
|
+
"default": "Bearer {access_token}",
|
299
|
+
"type": "string",
|
300
|
+
"enum": [
|
301
|
+
"Bearer {access_token}"
|
302
|
+
],
|
303
|
+
"x-title": "Authorization"
|
304
|
+
},
|
305
|
+
{
|
306
|
+
"name": "body",
|
307
|
+
"in": "body",
|
308
|
+
"schema": {
|
309
|
+
"type": "string",
|
310
|
+
"default": "{\n \"query\": \"query oomCountForDaysForBuild($app_id: String!, $builds: [String!]!, $days: Int!) { project(externalId: $app_id) { crashlytics{ oomCounts(builds: $builds, days: $days){ timeSeries{ allTimeCount } } oomSessionCounts(builds: $builds, days: $days){ timeSeries{ allTimeCount } } } } }\",\n \"variables\": {\n \"app_id\": \"{app_id}\",\n \"days\": 1,\n \"builds\": [\n \"3.0.4 (71)\"\n ]\n }\n}"
|
311
|
+
}
|
312
|
+
}
|
313
|
+
],
|
314
|
+
"responses": {
|
315
|
+
"default": {
|
316
|
+
"description": "stub description for swagger compliance"
|
317
|
+
}
|
318
|
+
},
|
319
|
+
"security": []
|
320
|
+
}
|
321
|
+
},
|
322
|
+
"/api/v2/organizations/{ResponseBodyPath}/apps/{app_id}/growth_analytics/total_sessions_scalar.json": {
|
323
|
+
"get": {
|
324
|
+
"summary": "Get Sessions Count",
|
325
|
+
"operationId": "663ee252-e5da-48cf-9034-8c6afd6a0338",
|
326
|
+
"consumes": [
|
327
|
+
"text/plain"
|
328
|
+
],
|
329
|
+
"parameters": [
|
330
|
+
{
|
331
|
+
"name": "ResponseBodyPath",
|
332
|
+
"required": true,
|
333
|
+
"in": "path",
|
334
|
+
"default": "{organization_id}",
|
335
|
+
"type": "string",
|
336
|
+
"x-title": "ResponseBodyPath"
|
337
|
+
},
|
338
|
+
{
|
339
|
+
"name": "Authorization",
|
340
|
+
"required": false,
|
341
|
+
"in": "header",
|
342
|
+
"default": "Bearer {access_token}",
|
343
|
+
"type": "string",
|
344
|
+
"enum": [
|
345
|
+
"Bearer {access_token}"
|
346
|
+
],
|
347
|
+
"x-title": "Authorization"
|
348
|
+
},
|
349
|
+
{
|
350
|
+
"name": "build",
|
351
|
+
"required": false,
|
352
|
+
"in": "query",
|
353
|
+
"default": "all",
|
354
|
+
"type": "string",
|
355
|
+
"enum": [
|
356
|
+
"all"
|
357
|
+
],
|
358
|
+
"x-title": "build"
|
359
|
+
},
|
360
|
+
{
|
361
|
+
"name": "start",
|
362
|
+
"required": false,
|
363
|
+
"in": "query",
|
364
|
+
"default": "1480636800",
|
365
|
+
"type": "string",
|
366
|
+
"enum": [
|
367
|
+
"1480636800"
|
368
|
+
],
|
369
|
+
"x-title": "start"
|
370
|
+
},
|
371
|
+
{
|
372
|
+
"name": "end",
|
373
|
+
"required": false,
|
374
|
+
"in": "query",
|
375
|
+
"default": "1480723200",
|
376
|
+
"type": "string",
|
377
|
+
"enum": [
|
378
|
+
"1480723200"
|
379
|
+
],
|
380
|
+
"x-title": "end"
|
381
|
+
}
|
382
|
+
],
|
383
|
+
"responses": {
|
384
|
+
"default": {
|
385
|
+
"description": "stub description for swagger compliance"
|
386
|
+
}
|
387
|
+
},
|
388
|
+
"security": []
|
389
|
+
}
|
390
|
+
},
|
391
|
+
"/api/v2/organizations/{ResponseBodyPath}/apps/{app_id}/beta_distribution/releases/{release_id}": {
|
392
|
+
"get": {
|
393
|
+
"summary": "Get All Builds",
|
394
|
+
"operationId": "ac37ff6f-3d76-4eb1-904e-266f27c1f53b",
|
395
|
+
"consumes": [
|
396
|
+
"text/plain"
|
397
|
+
],
|
398
|
+
"parameters": [
|
399
|
+
{
|
400
|
+
"name": "ResponseBodyPath",
|
401
|
+
"required": true,
|
402
|
+
"in": "path",
|
403
|
+
"default": "{organization_id}",
|
404
|
+
"type": "string",
|
405
|
+
"x-title": "ResponseBodyPath"
|
406
|
+
},
|
407
|
+
{
|
408
|
+
"name": "Authorization",
|
409
|
+
"required": false,
|
410
|
+
"in": "header",
|
411
|
+
"default": "Bearer {access_token}",
|
412
|
+
"type": "string",
|
413
|
+
"enum": [
|
414
|
+
"Bearer {access_token}"
|
415
|
+
],
|
416
|
+
"x-title": "Authorization"
|
417
|
+
}
|
418
|
+
],
|
419
|
+
"responses": {
|
420
|
+
"default": {
|
421
|
+
"description": "stub description for swagger compliance"
|
422
|
+
}
|
423
|
+
},
|
424
|
+
"security": []
|
425
|
+
}
|
426
|
+
},
|
427
|
+
"/api/v2/organizations/{ResponseBodyPath}/apps/{app_id}/beta_distribution/releases": {
|
428
|
+
"get": {
|
429
|
+
"summary": "Get Single Build",
|
430
|
+
"operationId": "7a081371-1b92-4964-81ef-60dc76e37f3b",
|
431
|
+
"parameters": [
|
432
|
+
{
|
433
|
+
"name": "ResponseBodyPath",
|
434
|
+
"required": true,
|
435
|
+
"in": "path",
|
436
|
+
"default": "{organization_id}",
|
437
|
+
"type": "string",
|
438
|
+
"x-title": "ResponseBodyPath"
|
439
|
+
},
|
440
|
+
{
|
441
|
+
"name": "Authorization",
|
442
|
+
"required": false,
|
443
|
+
"in": "header",
|
444
|
+
"default": "Bearer {access_token}",
|
445
|
+
"type": "string",
|
446
|
+
"enum": [
|
447
|
+
"Bearer {access_token}"
|
448
|
+
],
|
449
|
+
"x-title": "Authorization"
|
450
|
+
},
|
451
|
+
{
|
452
|
+
"name": "app[display_version]",
|
453
|
+
"required": false,
|
454
|
+
"in": "query",
|
455
|
+
"default": "3.0.5",
|
456
|
+
"type": "string",
|
457
|
+
"enum": [
|
458
|
+
"3.0.5"
|
459
|
+
],
|
460
|
+
"x-title": "app[display_version]"
|
461
|
+
},
|
462
|
+
{
|
463
|
+
"name": "app[build_version]",
|
464
|
+
"required": false,
|
465
|
+
"in": "query",
|
466
|
+
"default": "75",
|
467
|
+
"type": "string",
|
468
|
+
"enum": [
|
469
|
+
"75"
|
470
|
+
],
|
471
|
+
"x-title": "app[build_version]"
|
472
|
+
}
|
473
|
+
],
|
474
|
+
"responses": {
|
475
|
+
"default": {
|
476
|
+
"description": "stub description for swagger compliance"
|
477
|
+
}
|
478
|
+
},
|
479
|
+
"security": []
|
480
|
+
}
|
481
|
+
},
|
482
|
+
"/api/v2/organizations/{ResponseBodyPath}/apps/{app_id}/growth_analytics/top_builds": {
|
483
|
+
"get": {
|
484
|
+
"summary": "Get Top Builds",
|
485
|
+
"operationId": "dde93ee1-998d-488f-94bc-acb832376097",
|
486
|
+
"parameters": [
|
487
|
+
{
|
488
|
+
"name": "ResponseBodyPath",
|
489
|
+
"required": true,
|
490
|
+
"in": "path",
|
491
|
+
"default": "{organization_id}",
|
492
|
+
"type": "string",
|
493
|
+
"x-title": "ResponseBodyPath"
|
494
|
+
},
|
495
|
+
{
|
496
|
+
"name": "Authorization",
|
497
|
+
"required": false,
|
498
|
+
"in": "header",
|
499
|
+
"default": "Bearer {access_token}",
|
500
|
+
"type": "string",
|
501
|
+
"enum": [
|
502
|
+
"Bearer {access_token}"
|
503
|
+
],
|
504
|
+
"x-title": "Authorization"
|
505
|
+
},
|
506
|
+
{
|
507
|
+
"name": "start",
|
508
|
+
"required": false,
|
509
|
+
"in": "query",
|
510
|
+
"default": "0",
|
511
|
+
"type": "string",
|
512
|
+
"enum": [
|
513
|
+
"0"
|
514
|
+
],
|
515
|
+
"x-title": "start"
|
516
|
+
},
|
517
|
+
{
|
518
|
+
"name": "app_id",
|
519
|
+
"required": false,
|
520
|
+
"in": "query",
|
521
|
+
"default": "{app_id}",
|
522
|
+
"type": "string",
|
523
|
+
"enum": [
|
524
|
+
"{app_id}"
|
525
|
+
],
|
526
|
+
"x-title": "app_id"
|
527
|
+
},
|
528
|
+
{
|
529
|
+
"name": "end",
|
530
|
+
"required": false,
|
531
|
+
"in": "query",
|
532
|
+
"default": "1481328000",
|
533
|
+
"type": "string",
|
534
|
+
"enum": [
|
535
|
+
"1481328000"
|
536
|
+
],
|
537
|
+
"x-title": "end"
|
538
|
+
}
|
539
|
+
],
|
540
|
+
"responses": {
|
541
|
+
"default": {
|
542
|
+
"description": "stub description for swagger compliance"
|
543
|
+
}
|
544
|
+
},
|
545
|
+
"security": []
|
546
|
+
}
|
547
|
+
}
|
548
|
+
},
|
549
|
+
"schemes": [
|
550
|
+
"https"
|
551
|
+
],
|
552
|
+
"securityDefinitions": {}
|
553
|
+
}
|