Skip to content

Latest commit

 

History

History
246 lines (178 loc) · 6.17 KB

File metadata and controls

246 lines (178 loc) · 6.17 KB

MessenteApi.GroupsApi

All URIs are relative to https://api.messente.com/v1

Method HTTP request Description
createGroup POST /phonebook/groups Creates a new group with the provided name
deleteGroup DELETE /phonebook/groups/{groupId} Deletes a group
fetchGroup GET /phonebook/groups/{groupId} Lists a group
fetchGroups GET /phonebook/groups Returns all groups
updateGroup PUT /phonebook/groups/{groupId} Updates a group with the provided name

createGroup

GroupEnvelope createGroup(group_name)

Creates a new group with the provided name

Example

var MessenteApi = require('messente_api');
var defaultClient = MessenteApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new MessenteApi.GroupsApi();
var group_name = {"name":"Any group name"}; // GroupName | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createGroup(group_name, callback);

Parameters

Name Type Description Notes
group_name GroupName

Return type

GroupEnvelope

Authorization

basicAuth

HTTP request headers

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

deleteGroup

deleteGroup(group_id)

Deletes a group

Example

var MessenteApi = require('messente_api');
var defaultClient = MessenteApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new MessenteApi.GroupsApi();
var group_id = 5792a02a-e5c2-422b-a0a0-0ae65d814663; // String | String in UUID format
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteGroup(group_id, callback);

Parameters

Name Type Description Notes
group_id String String in UUID format

Return type

null (empty response body)

Authorization

basicAuth

HTTP request headers

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

fetchGroup

GroupEnvelope fetchGroup(group_id)

Lists a group

Example

var MessenteApi = require('messente_api');
var defaultClient = MessenteApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new MessenteApi.GroupsApi();
var group_id = 5792a02a-e5c2-422b-a0a0-0ae65d814663; // String | String in UUID format
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.fetchGroup(group_id, callback);

Parameters

Name Type Description Notes
group_id String String in UUID format

Return type

GroupEnvelope

Authorization

basicAuth

HTTP request headers

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

fetchGroups

GroupListEnvelope fetchGroups()

Returns all groups

Example

var MessenteApi = require('messente_api');
var defaultClient = MessenteApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new MessenteApi.GroupsApi();
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.fetchGroups(callback);

Parameters

This endpoint does not need any parameter.

Return type

GroupListEnvelope

Authorization

basicAuth

HTTP request headers

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

updateGroup

GroupEnvelope updateGroup(group_id, group_name)

Updates a group with the provided name

Example

var MessenteApi = require('messente_api');
var defaultClient = MessenteApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new MessenteApi.GroupsApi();
var group_id = 5792a02a-e5c2-422b-a0a0-0ae65d814663; // String | String in UUID format
var group_name = {"name":"Any group name"}; // GroupName | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.updateGroup(group_id, group_name, callback);

Parameters

Name Type Description Notes
group_id String String in UUID format
group_name GroupName

Return type

GroupEnvelope

Authorization

basicAuth

HTTP request headers

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