]> git.proxmox.com Git - pmg-api.git/commitdiff
api: statistics: drop deprecated detail statistic methods
authorStoiko Ivanov <s.ivanov@proxmox.com>
Tue, 8 Jun 2021 17:25:29 +0000 (17:25 +0000)
committerStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 11 Jun 2021 14:53:45 +0000 (14:53 +0000)
in e89b61c5190e3e374c2c3bcb3dce444c64c718cf we introduced a method
taking the address as explicit parameter instead of path component
(local-parts can contain '/'). now we can drop the old paths.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PMG/API2/Statistics.pm

index 43294fb90914f5727dbe226b74dec104489ce741..38c8d0c18e0618506218c48b1a4ded8d7a07717d 100644 (file)
@@ -369,46 +369,6 @@ __PACKAGE__->register_method ({
        return get_detail_statistics($param->{type}, $param);
     }});
 
-# FIXME: remove for PMG 7.0 - handled by 'details' API call which allows addresses containing '/'
-__PACKAGE__->register_method ({
-    name => 'contactdetails',
-    path => 'contact/{contact}',
-    method => 'GET',
-    description => "Detailed Contact Statistics.",
-    permissions => { check => [ 'admin', 'qmanager', 'audit'] },
-    parameters => {
-       additionalProperties => 0,
-       properties => $default_properties->({
-           contact => get_standard_option('pmg-email-address', {
-               description => "Contact email address.",
-           }),
-           filter => {
-               description => "Sender address filter.",
-               type => 'string',
-               maxLength => 512,
-               optional => 1,
-           },
-           orderby => $api_properties->{orderby},
-       }),
-    },
-    returns => {
-       type => 'array',
-       items => {
-           type => "object",
-           properties => $detail_return_properties->({
-               sender => {
-                   description => "Sender email.",
-                   type => 'string',
-               },
-           }),
-       },
-    },
-    code => sub {
-       my ($param) = @_;
-
-       return get_detail_statistics('contact', $param);
-    }});
-
 __PACKAGE__->register_method ({
     name => 'sender',
     path => 'sender',
@@ -473,46 +433,6 @@ __PACKAGE__->register_method ({
        return $res;
     }});
 
-# FIXME: remove for PMG 7.0 - handled by 'details' API call which allows addresses containing '/'
-__PACKAGE__->register_method ({
-    name => 'senderdetails',
-    path => 'sender/{sender}',
-    method => 'GET',
-    description => "Detailed Sender Statistics.",
-    permissions => { check => [ 'admin', 'qmanager', 'audit'] },
-    parameters => {
-       additionalProperties => 0,
-       properties => $default_properties->({
-           sender => get_standard_option('pmg-email-address', {
-               description => "Sender email address.",
-           }),
-           filter => {
-               description => "Receiver address filter.",
-               type => 'string',
-               maxLength => 512,
-               optional => 1,
-           },
-           orderby => $api_properties->{orderby},
-       }),
-    },
-    returns => {
-       type => 'array',
-       items => {
-           type => "object",
-           properties => $detail_return_properties->({
-               receiver => {
-                   description => "Receiver email.",
-                   type => 'string',
-               },
-           }),
-       },
-    },
-    code => sub {
-       my ($param) = @_;
-
-       return get_detail_statistics('sender', $param);
-    }});
-
 __PACKAGE__->register_method ({
     name => 'receiver',
     path => 'receiver',
@@ -585,46 +505,6 @@ __PACKAGE__->register_method ({
        return $res;
     }});
 
-# FIXME: remove for PMG 7.0 - handled by 'details' API call which allows addresses containing '/'
-__PACKAGE__->register_method ({
-    name => 'receiverdetails',
-    path => 'receiver/{receiver}',
-    method => 'GET',
-    description => "Detailed Receiver Statistics.",
-    permissions => { check => [ 'admin', 'qmanager', 'audit'] },
-    parameters => {
-       additionalProperties => 0,
-       properties => $default_properties->({
-           receiver => get_standard_option('pmg-email-address', {
-               description => "Receiver email address.",
-           }),
-           filter => {
-               description => "Sender address filter.",
-               type => 'string',
-               maxLength => 512,
-               optional => 1,
-           },
-           orderby => $api_properties->{orderby},
-       }),
-    },
-    returns => {
-       type => 'array',
-       items => {
-           type => "object",
-           properties => $detail_return_properties->({
-               sender => {
-                   description => "Sender email.",
-                   type => 'string',
-               },
-           }),
-       },
-    },
-    code => sub {
-       my ($param) = @_;
-
-       return get_detail_statistics('receiver', $param);
-    }});
-
 __PACKAGE__->register_method ({
     name => 'domains',
     path => 'domains',