Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/api/client.py
Show First 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | class RemoteStorage(SWHRemoteAPI): | ||||
def origin_search(self, url_pattern, offset=0, limit=50, regexp=False, | def origin_search(self, url_pattern, offset=0, limit=50, regexp=False, | ||||
with_visit=False): | with_visit=False): | ||||
return self.post('origin/search', {'url_pattern': url_pattern, | return self.post('origin/search', {'url_pattern': url_pattern, | ||||
'offset': offset, | 'offset': offset, | ||||
'limit': limit, | 'limit': limit, | ||||
'regexp': regexp, | 'regexp': regexp, | ||||
'with_visit': with_visit}) | 'with_visit': with_visit}) | ||||
def origin_count(self, url_pattern, regexp=False, with_visit=False): | |||||
return self.post('origin/count', {'url_pattern': url_pattern, | |||||
'regexp': regexp, | |||||
'with_visit': with_visit}) | |||||
def origin_get_range(self, origin_from=1, origin_count=100): | def origin_get_range(self, origin_from=1, origin_count=100): | ||||
return self.post('origin/get_range', {'origin_from': origin_from, | return self.post('origin/get_range', {'origin_from': origin_from, | ||||
'origin_count': origin_count}) | 'origin_count': origin_count}) | ||||
def origin_add(self, origins): | def origin_add(self, origins): | ||||
return self.post('origin/add_multi', {'origins': origins}) | return self.post('origin/add_multi', {'origins': origins}) | ||||
def origin_add_one(self, origin): | def origin_add_one(self, origin): | ||||
▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines |