# VerityReputation.CommunityApi

All URIs are relative to *http://springserver.cfapps.io/verity/core*

Method | HTTP request | Description
------------- | ------------- | -------------
[**addCommunityMember**](CommunityApi.md#addCommunityMember) | **POST** /community/{community_uuid}/members/{person_uuid} | add community member
[**createCommunity**](CommunityApi.md#createCommunity) | **POST** /community | create a Community
[**getCommunitiesByQueryParameters**](CommunityApi.md#getCommunitiesByQueryParameters) | **GET** /community | get communities by query parameters
[**getCommunity**](CommunityApi.md#getCommunity) | **GET** /community/{uuid} | get community
[**getCommunityContent**](CommunityApi.md#getCommunityContent) | **GET** /community/{uuid}/content | get community content
[**getCommunityEthics**](CommunityApi.md#getCommunityEthics) | **GET** /community/{uuid}/ethic | get community ethics
[**getCommunityMembers**](CommunityApi.md#getCommunityMembers) | **GET** /community/{uuid}/members | get community members
[**getCommunitySubCommunities**](CommunityApi.md#getCommunitySubCommunities) | **GET** /community/{uuid}/community | get community sub communities
[**updateCommunity**](CommunityApi.md#updateCommunity) | **PUT** /community | update a community


<a name="addCommunityMember"></a>
# **addCommunityMember**
> addCommunityMember(communityUuid, personUuid)

add community member

It seems this should be a Community admin function. Perhaps it would be better for a Person to Join a Community, or optionally Leave a Community. Adding / removing members needs more though. It&#39;s possible that members may need to be invited or allowed to join base on some criteria (group vote, etc.)

### Example
```javascript
var VerityReputation = require('verity_reputation');

var apiInstance = new VerityReputation.CommunityApi();

var communityUuid = "communityUuid_example"; // String | 

var personUuid = "personUuid_example"; // String | 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.addCommunityMember(communityUuid, personUuid, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **communityUuid** | **String**|  | 
 **personUuid** | **String**|  | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

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

<a name="createCommunity"></a>
# **createCommunity**
> Community createCommunity(opts)

create a Community

### Example
```javascript
var VerityReputation = require('verity_reputation');

var apiInstance = new VerityReputation.CommunityApi();

var opts = { 
  'body': new VerityReputation.Community() // Community | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Community**](Community.md)|  | [optional] 

### Return type

[**Community**](Community.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="getCommunitiesByQueryParameters"></a>
# **getCommunitiesByQueryParameters**
> [Community] getCommunitiesByQueryParameters(opts)

get communities by query parameters

### Example
```javascript
var VerityReputation = require('verity_reputation');

var apiInstance = new VerityReputation.CommunityApi();

var opts = { 
  'name': "name_example", // String | 
  'enspath': "enspath_example", // String | 
  'parentid': "parentid_example", // String | 
  'organizationid': "organizationid_example" // String | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **name** | **String**|  | [optional] 
 **enspath** | **String**|  | [optional] 
 **parentid** | **String**|  | [optional] 
 **organizationid** | **String**|  | [optional] 

### Return type

[**[Community]**](Community.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="getCommunity"></a>
# **getCommunity**
> Community getCommunity(uuid)

get community

### Example
```javascript
var VerityReputation = require('verity_reputation');

var apiInstance = new VerityReputation.CommunityApi();

var uuid = "uuid_example"; // String | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **uuid** | **String**|  | 

### Return type

[**Community**](Community.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="getCommunityContent"></a>
# **getCommunityContent**
> [Content] getCommunityContent(uuid)

get community content

### Example
```javascript
var VerityReputation = require('verity_reputation');

var apiInstance = new VerityReputation.CommunityApi();

var uuid = "uuid_example"; // String | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **uuid** | **String**|  | 

### Return type

[**[Content]**](Content.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="getCommunityEthics"></a>
# **getCommunityEthics**
> [Ethic] getCommunityEthics(uuid, pageNumber, pageSize, )

get community ethics

### Example
```javascript
var VerityReputation = require('verity_reputation');

var apiInstance = new VerityReputation.CommunityApi();

var uuid = "uuid_example"; // String | 

var pageNumber = 56; // Number | starting page number. Must be > 0.

var pageSize = 56; // Number | number of records to return per page.


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **uuid** | **String**|  | 
 **pageNumber** | **Number**| starting page number. Must be &gt; 0. | 
 **pageSize** | **Number**| number of records to return per page. | 

### Return type

[**[Ethic]**](Ethic.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="getCommunityMembers"></a>
# **getCommunityMembers**
> [Person] getCommunityMembers(uuid)

get community members

### Example
```javascript
var VerityReputation = require('verity_reputation');

var apiInstance = new VerityReputation.CommunityApi();

var uuid = "uuid_example"; // String | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **uuid** | **String**|  | 

### Return type

[**[Person]**](Person.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="getCommunitySubCommunities"></a>
# **getCommunitySubCommunities**
> [Community] getCommunitySubCommunities(uuid)

get community sub communities

### Example
```javascript
var VerityReputation = require('verity_reputation');

var apiInstance = new VerityReputation.CommunityApi();

var uuid = "uuid_example"; // String | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **uuid** | **String**|  | 

### Return type

[**[Community]**](Community.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="updateCommunity"></a>
# **updateCommunity**
> updateCommunity(opts)

update a community

### Example
```javascript
var VerityReputation = require('verity_reputation');

var apiInstance = new VerityReputation.CommunityApi();

var opts = { 
  'body': new VerityReputation.Community() // Community | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.updateCommunity(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Community**](Community.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

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

