Ejemplo n.º 1
0
def get_podcast_episodes(podcast, count=5):
    return parser_list(
        PodcastEpisode,
        call_api('getPodcastEpisodes', {
            'podcast': podcast,
            'count': count,
        }))
Ejemplo n.º 2
0
def get_podcast_live(podcast, count=5):
    return parser_list(
        PodcastLive,
        call_api('getPodcastLive', {
            'podcast': podcast,
            'count': count,
        }))
Ejemplo n.º 3
0
def get_deleted(dateStart=None, dateEnd=None):
    params = {}

    if dateStart is not None:
        params['dateStart'] = dateStart.strftime('%y-%m-%d')
    if dateEnd is not None:
        params['dateEnd'] = dateEnd.strftime('%y-%m-%d')

    return parser_list(DeleteEntry, call_api('getDeleted', params))
Ejemplo n.º 4
0
def get_live(count=5, dateStart=None, dateEnd=None):
    params = {'count': count}

    if dateStart is not None:
        params['dateStart'] = dateStart.strftime('%y-%m-%d')
    if dateEnd is not None:
        params['dateEnd'] = dateEnd.strftime('%y-%m-%d')

    return parser_list(PodcastLive, call_api('getLive', params))
Ejemplo n.º 5
0
def get_live(count=5, dateStart=None, dateEnd=None):
    params = { 'count': count }

    if dateStart is not None:
        params['dateStart'] = dateStart.strftime('%y-%m-%d')
    if dateEnd is not None:
        params['dateEnd'] = dateEnd.strftime('%y-%m-%d')

    return parser_list(PodcastLive, call_api('getLive', params))
Ejemplo n.º 6
0
def get_podcast_episodes(podcast, count=5):
    return parser_list(PodcastEpisode, call_api('getPodcastEpisodes', {
        'podcast': podcast,
        'count': count,
    }))
Ejemplo n.º 7
0
def get_podcasts():
    return parser_list(Podcast, call_api('getPodcasts'))
Ejemplo n.º 8
0
 def test_none(self):
     lst = parser_list(MockCounter, None)
     assert isinstance(lst, list)
     assert len(lst) == 0
Ejemplo n.º 9
0
 def test_no_array(self):
     with pytest.raises(InvalidDataError):
         parser_list(MockCounter, (None,))
Ejemplo n.º 10
0
 def test_call_clazz(self):
     global mockCalled; mockCalled = 0
     parser_list(MockCounter, [{}, {}])
     assert mockCalled == 2
Ejemplo n.º 11
0
def get_podcast_live(podcast, count=5):
    return parser_list(PodcastLive, call_api('getPodcastLive', {
        'podcast': podcast,
        'count': count,
    }))
Ejemplo n.º 12
0
 def test_none(self):
     lst = parser_list(MockCounter, None)
     assert isinstance(lst, list)
     assert len(lst) == 0
Ejemplo n.º 13
0
 def test_no_array(self):
     with pytest.raises(InvalidDataError):
         parser_list(MockCounter, (None, ))
Ejemplo n.º 14
0
 def test_call_clazz(self):
     global mockCalled
     mockCalled = 0
     parser_list(MockCounter, [{}, {}])
     assert mockCalled == 2