# Zaun.TeamApi

All URIs are relative to *https://virtserver.swaggerhub.com/kata.ai/zaun-q2/1.0.0*

Method | HTTP request | Description
------------- | ------------- | -------------
[**teamsPost**](TeamApi.md#teamsPost) | **POST** /teams | Create a team
[**teamsTeamIdUsersGet**](TeamApi.md#teamsTeamIdUsersGet) | **GET** /teams/{teamId}/users | Find users in a team
[**teamsTeamIdUsersUserIdDelete**](TeamApi.md#teamsTeamIdUsersUserIdDelete) | **DELETE** /teams/{teamId}/users/{userId} | Delete user from team
[**teamsTeamIdUsersUserIdPost**](TeamApi.md#teamsTeamIdUsersUserIdPost) | **POST** /teams/{teamId}/users/{userId} | Add user to team


<a name="teamsPost"></a>
# **teamsPost**
> InlineResponse2004 teamsPost(body)

Create a team

### Example
```javascript
var Zaun = require('zaun');
var defaultClient = Zaun.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new Zaun.TeamApi();

var body = new Zaun.Team(); // Team | Team object


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.teamsPost(body, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Team**](Team.md)| Team object | 

### Return type

[**InlineResponse2004**](InlineResponse2004.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="teamsTeamIdUsersGet"></a>
# **teamsTeamIdUsersGet**
> InlineResponse2004 teamsTeamIdUsersGet(teamId)

Find users in a team

### Example
```javascript
var Zaun = require('zaun');
var defaultClient = Zaun.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new Zaun.TeamApi();

var teamId = "teamId_example"; // String | ID of team to return


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.teamsTeamIdUsersGet(teamId, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **teamId** | **String**| ID of team to return | 

### Return type

[**InlineResponse2004**](InlineResponse2004.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="teamsTeamIdUsersUserIdDelete"></a>
# **teamsTeamIdUsersUserIdDelete**
> InlineResponse2004 teamsTeamIdUsersUserIdDelete(teamId, userId)

Delete user from team

### Example
```javascript
var Zaun = require('zaun');
var defaultClient = Zaun.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new Zaun.TeamApi();

var teamId = "teamId_example"; // String | Team ID

var userId = "userId_example"; // String | User ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.teamsTeamIdUsersUserIdDelete(teamId, userId, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **teamId** | **String**| Team ID | 
 **userId** | **String**| User ID | 

### Return type

[**InlineResponse2004**](InlineResponse2004.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="teamsTeamIdUsersUserIdPost"></a>
# **teamsTeamIdUsersUserIdPost**
> InlineResponse2004 teamsTeamIdUsersUserIdPost(teamId, userId, body)

Add user to team

### Example
```javascript
var Zaun = require('zaun');
var defaultClient = Zaun.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new Zaun.TeamApi();

var teamId = "teamId_example"; // String | Team ID

var userId = "userId_example"; // String | User ID

var body = new Zaun.Body1(); // Body1 | User object


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.teamsTeamIdUsersUserIdPost(teamId, userId, body, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **teamId** | **String**| Team ID | 
 **userId** | **String**| User ID | 
 **body** | [**Body1**](Body1.md)| User object | 

### Return type

[**InlineResponse2004**](InlineResponse2004.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

