Process a NEWGROUPS command. Arguments: - date: a date or datetime object Return: - resp: server response if successful - list: list of newsgroup names
(self, date, *, file=None)
| 594 | return resp, caps |
| 595 | |
| 596 | def newgroups(self, date, *, file=None): |
| 597 | """Process a NEWGROUPS command. Arguments: |
| 598 | - date: a date or datetime object |
| 599 | Return: |
| 600 | - resp: server response if successful |
| 601 | - list: list of newsgroup names |
| 602 | """ |
| 603 | if not isinstance(date, (datetime.date, datetime.date)): |
| 604 | raise TypeError( |
| 605 | "the date parameter must be a date or datetime object, " |
| 606 | "not '{:40}'".format(date.__class__.__name__)) |
| 607 | date_str, time_str = _unparse_datetime(date, self.nntp_version < 2) |
| 608 | cmd = 'NEWGROUPS {0} {1}'.format(date_str, time_str) |
| 609 | resp, lines = self._longcmdstring(cmd, file) |
| 610 | return resp, self._grouplist(lines) |
| 611 | |
| 612 | def newnews(self, group, date, *, file=None): |
| 613 | """Process a NEWNEWS command. Arguments: |
nothing calls this directly
no test coverage detected