From 4c0e76b885d92226d57ac3a390cfbd2e42e62eea Mon Sep 17 00:00:00 2001 From: esensar Date: Tue, 28 Mar 2017 21:34:28 +0200 Subject: [PATCH] Add teams to postman collections --- .../Steleks%20Backend.postman_collection.json | 323 ++++++++++++++++++ teams/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 3 +- .../ba/steleks/repository/module/Team.java | 16 + 4 files changed, 342 insertions(+), 2 deletions(-) diff --git a/postman collections/Steleks%20Backend.postman_collection.json b/postman collections/Steleks%20Backend.postman_collection.json index e03fa9f..893975b 100644 --- a/postman collections/Steleks%20Backend.postman_collection.json +++ b/postman collections/Steleks%20Backend.postman_collection.json @@ -256,6 +256,52 @@ } ] }, + { + "name": "Participants", + "description": "", + "item": [ + { + "name": "Add Participant", + "request": { + "url": "http://{{url}}:{{teamsPort}}/participants", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"firstName\":\"Testni\",\n \"lastName\":\"User\",\n \"email\":\"testni.user@steleks.ba\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get All Participants", + "request": { + "url": "http://{{url}}:{{teamsPort}}/participants", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"firstName\":\"Testni\",\n \"lastName\":\"User\",\n \"email\":\"testni.user@steleks.ba\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, { "name": "Roles", "description": "", @@ -296,6 +342,283 @@ } ] }, + { + "name": "Team Category", + "description": "", + "item": [ + { + "name": "Add Team Category", + "request": { + "url": "http://{{url}}:{{teamsPort}}/teamCategories", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"type\":\"The category\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get All Team Categories", + "request": { + "url": "http://{{url}}:{{teamsPort}}/teamCategories", + "method": "GET", + "header": [], + "body": { + "mode": "formdata", + "formdata": [] + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "Team Media", + "description": "", + "item": [ + { + "name": "Get All Team Medias", + "request": { + "url": "http://{{url}}:{{teamsPort}}/teamMedias", + "method": "GET", + "header": [], + "body": { + "mode": "formdata", + "formdata": [] + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add Team Media", + "request": { + "url": "http://{{url}}:{{teamsPort}}/teamMedias", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"contentUrl\":\"http://www.google.com\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "Teams", + "description": "", + "item": [ + { + "name": "Get Teams", + "request": { + "url": "http://{{url}}:{{teamsPort}}/teams", + "method": "GET", + "header": [], + "body": { + "mode": "formdata", + "formdata": [] + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add Team", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": "\nvar jsonData = JSON.parse(responseBody);\nvar arr = jsonData._links.self.href.split(\"/\");\npostman.setEnvironmentVariable(\"teamId\", arr[4]);" + } + } + ], + "request": { + "url": "http://{{url}}:{{teamsPort}}/teams", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"position\":0,\n \"gradesOrPoints\":6\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get Team", + "request": { + "url": "http://{{url}}:{{teamsPort}}/teams/{{teamId}}", + "method": "GET", + "header": [], + "body": { + "mode": "formdata", + "formdata": [] + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get All", + "request": { + "url": "http://{{url}}:{{teamsPort}}", + "method": "GET", + "header": [], + "body": { + "mode": "formdata", + "formdata": [] + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add Category To Team", + "request": { + "url": "http://{{url}}:{{teamsPort}}/teams/{{teamId}}/teamCategory", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "text/uri-list", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "http://{{url}}:{{teamsPort}}/teamCategories/1" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get Team Categories", + "request": { + "url": "http://{{url}}:{{teamsPort}}/teams/{{teamId}}/teamCategory", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "text/uri-list", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "http://{{url}}:{{teamsPort}}/teamCategories/1" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add Participants To Team", + "request": { + "url": "http://{{url}}:{{teamsPort}}/teams/{{teamId}}/participantSet", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "text/uri-list", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "http://{{url}}:{{teamsPort}}/participants/1" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get Team Participants", + "request": { + "url": "http://{{url}}:{{teamsPort}}/teams/{{teamId}}/participantSet", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "text/uri-list", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "http://{{url}}:{{teamsPort}}/participants/1" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add Media To Team", + "request": { + "url": "http://{{url}}:{{teamsPort}}/teams/{{teamId}}/teamMediaSet", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "text/uri-list", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "http://{{url}}:{{teamsPort}}/teamMedias/1" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get Team Medias", + "request": { + "url": "http://{{url}}:{{teamsPort}}/teams/{{teamId}}/teamMediaSet", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "text/uri-list", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "http://{{url}}:{{teamsPort}}/teamMedias/1" + }, + "description": "" + }, + "response": [] + } + ] + }, { "name": "Users", "description": "", diff --git a/teams/build.gradle b/teams/build.gradle index 44d545d..7581b53 100644 --- a/teams/build.gradle +++ b/teams/build.gradle @@ -25,6 +25,6 @@ repositories { dependencies { compile('org.springframework.boot:spring-boot-starter-data-jpa') compile('org.springframework.boot:spring-boot-starter-data-rest') - runtime('mysql:mysql-connector-java') + runtime('com.h2database:h2') testCompile('org.springframework.boot:spring-boot-starter-test') } diff --git a/teams/gradle/wrapper/gradle-wrapper.properties b/teams/gradle/wrapper/gradle-wrapper.properties index 293fd09..80d4973 100644 --- a/teams/gradle/wrapper/gradle-wrapper.properties +++ b/teams/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Tue Mar 28 21:19:02 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip diff --git a/teams/src/main/java/ba/steleks/repository/module/Team.java b/teams/src/main/java/ba/steleks/repository/module/Team.java index 5981ddd..ad3bd45 100644 --- a/teams/src/main/java/ba/steleks/repository/module/Team.java +++ b/teams/src/main/java/ba/steleks/repository/module/Team.java @@ -90,4 +90,20 @@ public class Team { public void setParticipantSet(Set participantSet) { this.participantSet = participantSet; } + + public TeamCategory getTeamCategory() { + return teamCategory; + } + + public void setTeamCategory(TeamCategory teamCategory) { + this.teamCategory = teamCategory; + } + + public Set getTeamMediaSet() { + return teamMediaSet; + } + + public void setTeamMediaSet(Set teamMediaSet) { + this.teamMediaSet = teamMediaSet; + } }