All URIs are relative to https://api.legislate.tech
Method | HTTP request | Description |
---|---|---|
getTeamUsingGET | GET /v1/teams/{teamId} | Get team details. |
getTeamsUsingGET | GET /v1/users/{userId}/teams | Get teams. |
postTeamUsingPOST | POST /v1/users/{userId}/teams | Create a team for a given user. |
updateTeamUsingPATCH | PATCH /v1/teams/{teamId} | Updates a team. |
TeamResponseDTO getTeamUsingGET(teamId)
Get team details.
This operation will retrieve details about a given team.
// Import classes:
//import com.legislate.ApiClient;
//import com.legislate.ApiException;
//import com.legislate.Configuration;
//import com.legislate.auth.*;
//import com.legislate.api.TeamApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: auth0_jwt
OAuth auth0_jwt = (OAuth) defaultClient.getAuthentication("auth0_jwt");
auth0_jwt.setAccessToken("YOUR ACCESS TOKEN");
TeamApi apiInstance = new TeamApi();
Long teamId = 789L; // Long | teamId
try {
TeamResponseDTO result = apiInstance.getTeamUsingGET(teamId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TeamApi#getTeamUsingGET");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
teamId | Long | teamId |
- Content-Type: Not defined
- Accept: application/json
List<TeamResponseDTO> getTeamsUsingGET(userId)
Get teams.
This operation will retrieve all teams for a given user.
// Import classes:
//import com.legislate.ApiClient;
//import com.legislate.ApiException;
//import com.legislate.Configuration;
//import com.legislate.auth.*;
//import com.legislate.api.TeamApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: auth0_jwt
OAuth auth0_jwt = (OAuth) defaultClient.getAuthentication("auth0_jwt");
auth0_jwt.setAccessToken("YOUR ACCESS TOKEN");
TeamApi apiInstance = new TeamApi();
Long userId = 789L; // Long | The unique Id of the user you'd whose teams you'd like to query.
try {
List<TeamResponseDTO> result = apiInstance.getTeamsUsingGET(userId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TeamApi#getTeamsUsingGET");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
userId | Long | The unique Id of the user you'd whose teams you'd like to query. |
- Content-Type: Not defined
- Accept: application/json
TeamResponseDTO postTeamUsingPOST(body, userId)
Create a team for a given user.
This operation will create a team for a given user.
// Import classes:
//import com.legislate.ApiClient;
//import com.legislate.ApiException;
//import com.legislate.Configuration;
//import com.legislate.auth.*;
//import com.legislate.api.TeamApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: auth0_jwt
OAuth auth0_jwt = (OAuth) defaultClient.getAuthentication("auth0_jwt");
auth0_jwt.setAccessToken("YOUR ACCESS TOKEN");
TeamApi apiInstance = new TeamApi();
CreateTeamRequestDTO body = new CreateTeamRequestDTO(); // CreateTeamRequestDTO | createTeamRequest
Long userId = 789L; // Long | The unique Id of the user for whom you'd like to create a team.
try {
TeamResponseDTO result = apiInstance.postTeamUsingPOST(body, userId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TeamApi#postTeamUsingPOST");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | CreateTeamRequestDTO | createTeamRequest | |
userId | Long | The unique Id of the user for whom you'd like to create a team. |
- Content-Type: application/json
- Accept: application/json
TeamResponseDTO updateTeamUsingPATCH(body, teamId)
Updates a team.
This operation will update a team details.
// Import classes:
//import com.legislate.ApiClient;
//import com.legislate.ApiException;
//import com.legislate.Configuration;
//import com.legislate.auth.*;
//import com.legislate.api.TeamApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: auth0_jwt
OAuth auth0_jwt = (OAuth) defaultClient.getAuthentication("auth0_jwt");
auth0_jwt.setAccessToken("YOUR ACCESS TOKEN");
TeamApi apiInstance = new TeamApi();
UpdateTeamRequestDTO body = new UpdateTeamRequestDTO(); // UpdateTeamRequestDTO | updateTeamRquest
Long teamId = 789L; // Long | The unique Id of the team you'd like to update.
try {
TeamResponseDTO result = apiInstance.updateTeamUsingPATCH(body, teamId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TeamApi#updateTeamUsingPATCH");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | UpdateTeamRequestDTO | updateTeamRquest | |
teamId | Long | The unique Id of the team you'd like to update. |
- Content-Type: application/json
- Accept: application/json