@@ -699,6 +699,7 @@ paths:
699
699
college : NITT
700
700
avatarId : 1
701
701
tutorialLevel : 2
702
+ codeTutorialLevel : 3
702
703
tier : TIER1
703
704
isProfileComplete : true
704
705
isTutorialComplete : true
@@ -1099,7 +1100,7 @@ paths:
1099
1100
responses :
1100
1101
200 :
1101
1102
description : OK
1102
- headers : { }
1103
+ headers : {}
1103
1104
content :
1104
1105
application/json :
1105
1106
schema :
@@ -1493,7 +1494,7 @@ paths:
1493
1494
description : Created
1494
1495
' 400 ' :
1495
1496
description : Bad Request
1496
- headers : { }
1497
+ headers : {}
1497
1498
content :
1498
1499
application/json :
1499
1500
schema :
@@ -1513,11 +1514,11 @@ paths:
1513
1514
examples :
1514
1515
CodeExample :
1515
1516
value :
1516
- value : " #include<iostream>"
1517
+ value : ' #include<iostream>'
1517
1518
language : CPP
1518
1519
MapExample :
1519
1520
value :
1520
- value : " [[0,0,0]]"
1521
+ value : ' [[0,0,0]]'
1521
1522
tags :
1522
1523
- Daily Challenges
1523
1524
/dc/matches :
@@ -1570,8 +1571,113 @@ paths:
1570
1571
description : Size of the page
1571
1572
parameters : []
1572
1573
1574
+ ' /stats/ ' :
1575
+ get :
1576
+ summary : Get all General Stats for current user and top user
1577
+ tags :
1578
+ - stats
1579
+ responses :
1580
+ ' 200 ' :
1581
+ description : OK
1582
+ content :
1583
+ application/json :
1584
+ schema :
1585
+ type : array
1586
+ items :
1587
+ $ref : ' #/components/schemas/UserMatchStats'
1588
+ operationId : getStats
1589
+ description : Gets all statistics for the current user
1590
+ parameters : []
1591
+
1592
+
1593
+ ' /codetutorial/get/{codeTutorialNumber} ' :
1594
+ get :
1595
+ summary : Get tutorial by number
1596
+ description : Get a single tutorial
1597
+ operationId : getCodeTutorialByNumber
1598
+ parameters :
1599
+ - name : codeTutorialNumber
1600
+ in : path
1601
+ required : true
1602
+ schema :
1603
+ type : integer
1604
+ responses :
1605
+ 200 :
1606
+ description : OK
1607
+ content :
1608
+ application/json :
1609
+ schema :
1610
+ $ref : ' #/components/schemas/TutorialsGetRequest'
1611
+ 401 :
1612
+ description : Unauthorized
1613
+ 403 :
1614
+ description : Forbidden
1615
+ 404 :
1616
+ description : Not found
1617
+ tags :
1618
+ - Tutorials
1619
+
1620
+ /codetutorial/submit :
1621
+ post :
1622
+ summary : Match Execution for Tutorials
1623
+ description : Match making for Tutorials
1624
+ operationId : createCodeTutorialMatch
1625
+ responses :
1626
+ ' 201 ' :
1627
+ description : Created
1628
+ ' 400 ' :
1629
+ description : Bad Request
1630
+ headers : { }
1631
+ content :
1632
+ application/json :
1633
+ schema :
1634
+ $ref : ' #/components/schemas/GenericError'
1635
+ examples :
1636
+ Example :
1637
+ value :
1638
+ message : Some field missing
1639
+ ' 401 ' :
1640
+ description : Unauthorized
1641
+ requestBody :
1642
+ required : true
1643
+ content :
1644
+ application/json :
1645
+ schema :
1646
+ $ref : ' #/components/schemas/CodeTutorialMatchRequest'
1647
+ examples :
1648
+ CodeExample :
1649
+ value :
1650
+ value : " #include<iostream>"
1651
+ language : CPP
1652
+ codeTutorialNumber : 2
1653
+ MapExample :
1654
+ value :
1655
+ value : " [[0,0,0]]"
1656
+ codeTutorialNumber : 6
1657
+ tags :
1658
+ - Tutorials
1659
+
1660
+
1573
1661
components :
1574
1662
schemas :
1663
+ UserMatchStats :
1664
+ title : UserMatchStats
1665
+ type : object
1666
+ description : User Match Stats model
1667
+ properties :
1668
+ avgAtk :
1669
+ type : number
1670
+ default : 0
1671
+ dc_wins :
1672
+ type : number
1673
+ default : 0
1674
+ coins :
1675
+ type : number
1676
+ default : 0
1677
+ required :
1678
+ - avgAtk
1679
+ - dc_wins
1680
+ - coins
1575
1681
PasswordLoginRequest :
1576
1682
title : PasswordLoginRequest
1577
1683
type : object
@@ -2024,6 +2130,9 @@ components:
2024
2130
tutorialLevel :
2025
2131
type : integer
2026
2132
example : 1
2133
+ codeTutorialLevel :
2134
+ type : integer
2135
+ example : 3
2027
2136
tier :
2028
2137
$ref : ' #/components/schemas/TierType'
2029
2138
isProfileComplete :
@@ -2041,6 +2150,7 @@ components:
2041
2150
- college
2042
2151
- avatarId
2043
2152
- tutorialLevel
2153
+ - codeTutorialLevel
2044
2154
- isProfileComplete
2045
2155
- isTutorialComplete
2046
2156
UpdateCurrentUserProfile :
@@ -2260,6 +2370,29 @@ components:
2260
2370
- destruction
2261
2371
- coinsUsed
2262
2372
- status
2373
+ TutorialGame :
2374
+ title : Game
2375
+ type : object
2376
+ description : Game model
2377
+ properties :
2378
+ id :
2379
+ type : string
2380
+ format : uuid
2381
+ example : 123e4567-e89b-12d3-a456-426614174000
2382
+ destruction :
2383
+ type : number
2384
+ example : 100
2385
+ coinsUsed :
2386
+ type : integer
2387
+ logs :
2388
+ type : string
2389
+ status :
2390
+ $ref : ' #/components/schemas/GameStatus'
2391
+ required :
2392
+ - id
2393
+ - destruction
2394
+ - coinsUsed
2395
+ - status
2263
2396
GameLog :
2264
2397
type : string
2265
2398
description : Game log model
@@ -2315,6 +2448,46 @@ components:
2315
2448
required :
2316
2449
- user
2317
2450
- stats
2451
+ TutorialsGetRequest :
2452
+ title : Get tutorials
2453
+ description : Get the game tutorials
2454
+ type : object
2455
+ properties :
2456
+ tutorialId :
2457
+ type : integer
2458
+ example : 1
2459
+ tutorialName :
2460
+ type : string
2461
+ example : Tutorial for Spawning attacker
2462
+ tutorialType :
2463
+ $ref : ' #/components/schemas/ChallengeType'
2464
+ description :
2465
+ type : string
2466
+ example : Brief description of how the code works
2467
+ tutorialCodes :
2468
+ $ref : ' #/components/schemas/TutorialCodeObject'
2469
+ required :
2470
+ - tutorialId
2471
+ - tutorialName
2472
+ - tutorialCodes
2473
+
2474
+ TutorialCodeObject :
2475
+ title : Tutorial Code Object
2476
+ description : The object containing the code for the tutorial
2477
+ type : object
2478
+ properties :
2479
+ cpp :
2480
+ type : string
2481
+ example : This would have the cpp code for the tutorial
2482
+ java :
2483
+ type : string
2484
+ example : This would have the java code for the tutorial
2485
+ python :
2486
+ type : string
2487
+ example : This would have the python code for the tutorial
2488
+ image :
2489
+ type : string
2490
+
2318
2491
2319
2492
DailyChallengeGetRequest :
2320
2493
title : Get daily challenge
@@ -2373,14 +2546,30 @@ components:
2373
2546
title : DailyChallengeMatchRequest
2374
2547
description : Request Model for the daily challenge
2375
2548
type : object
2549
+ properties :
2550
+ value :
2551
+ type : string
2552
+ example : ' #include<iostream>'
2553
+ language :
2554
+ $ref : ' #/components/schemas/Language'
2555
+ required :
2556
+ - value
2557
+ CodeTutorialMatchRequest :
2558
+ title : CodeTutorialMatchRequest
2559
+ description : Request Model for the tutorial mode
2560
+ type : object
2376
2561
properties :
2377
2562
value :
2378
2563
type : string
2379
2564
example : " #include<iostream>"
2380
2565
language :
2381
2566
$ref : ' #/components/schemas/Language'
2567
+ codeTutorialNumber :
2568
+ type : integer
2569
+ nullable : false
2382
2570
required :
2383
2571
- value
2572
+ - codeTutorialNumber
2384
2573
GenericError :
2385
2574
title : GenericError
2386
2575
type : object
@@ -2554,3 +2743,4 @@ tags:
2554
2743
- name : match
2555
2744
- name : notification
2556
2745
- name : user
2746
+ - name : stats
0 commit comments