Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zimbra-admin-api-js
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Public
zimbra-admin-api-js
Commits
dc3b60c4
Commit
dc3b60c4
authored
Aug 04, 2016
by
David Gatica
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
se agrego la funcion getDistributionListMembership
parent
09950bf3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
1 deletion
+35
-1
package.json
package.json
+1
-1
index.js
src/index.js
+15
-0
test.js
test/test.js
+18
-0
ipaddress.pyc
vagrant/provision/filter_plugins/ipaddress.pyc
+0
-0
playbook.retry
vagrant/provision/playbook.retry
+1
-0
No files found.
package.json
View file @
dc3b60c4
{
"name"
:
"zimbra-admin-api-js"
,
"version"
:
"0.3.
6
"
,
"version"
:
"0.3.
7
"
,
"main"
:
"src/index.js"
,
"engines"
:
{
"node"
:
">=6.2"
...
...
src/index.js
View file @
dc3b60c4
...
...
@@ -348,6 +348,21 @@ class ZimbraAdminApi {
});
}
// query_object takes this
// {limit: INT, offset: INT}
getDistributionListMembership
(
dl
,
query_object
=
{},
callback
)
{
const
request_data
=
this
.
buildRequestData
(
'GetDistributionListMembership'
,
callback
);
request_data
.
resource
=
'dl'
;
request_data
.
parse_response
=
ResponseParser
.
allResponse
;
// request_data.parse_response = function(data, rq, callback){ return callback(null, data.get()) };
request_data
.
params
.
params
.
dl
=
{
'by'
:
this
.
dictionary
.
byIdOrName
(
dl
),
'_content'
:
dl
};
return
this
.
performRequest
(
request_data
);
};
getDistributionListOwners
(
distributionList
,
callback
)
{
this
.
getDistributionList
(
distributionList
,
(
err
,
dl
)
=>
{
if
(
err
)
return
callback
(
err
);
...
...
test/test.js
View file @
dc3b60c4
...
...
@@ -831,6 +831,24 @@ var zimbraAdminPassword = process.env.ZIMBRA_PASSWORD || '12345678';
describe
(
'DistributionList tests'
,
function
()
{
this
.
timeout
(
5000
);
it
(
'Should Return the DL membership'
,
function
(
done
){
let
api
=
new
ZimbraAdminApi
(
auth_data
);
let
dl_name
=
Date
.
now
()
+
'@zboxapp.dev'
;
const
attributes
=
{};
api
.
createDistributionList
(
dl_name
,
attributes
,
function
(
err
,
dl
){
if
(
err
)
return
console
.
error
(
err
);
api
.
addDistributionListMember
(
dl
.
id
,
[
'abierta@customer.dev'
],
(
err
,
data
)
=>
{
if
(
err
)
return
console
.
error
(
err
);
api
.
getDistributionListMembership
(
'abierta@customer.dev'
,
{},
function
(
err
,
dls
){
if
(
err
)
return
console
.
error
(
err
);
expect
(
dls
.
length
).
to
.
be
.
above
(
0
);
expect
(
dls
[
0
].
constructor
.
name
).
to
.
be
.
equal
(
'DistributionList'
);
done
();
})
});
});
});
it
(
'should remove DL'
,
function
(
done
){
let
resource_name
=
Date
.
now
()
+
'@zboxapp.dev'
;
let
resource_attributes
=
{};
...
...
vagrant/provision/filter_plugins/ipaddress.pyc
View file @
dc3b60c4
No preview for this file type
vagrant/provision/playbook.retry
0 → 100644
View file @
dc3b60c4
default
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment