diff --git a/pycaching/cache.py b/pycaching/cache.py index dc5e488..843b94c 100644 --- a/pycaching/cache.py +++ b/pycaching/cache.py @@ -153,6 +153,43 @@ def _from_print_page(cls, geocaching, guid, soup): cache_info["log_counts"] = Cache._get_log_counts_from_print_page(soup) return Cache(geocaching, **cache_info) + @classmethod + def _from_api_record(cls, geocaching, record): + """Create a cache instance from a JSON record returned by API.""" + cache = Cache( + geocaching, + wp=record['code'], + name=record['name'], + type=Type.from_number(record['geocacheType']), + state=Status(record['cacheStatus']) == Status.enabled, + found=record['userFound'], + size=Size.from_number(record['containerType']), + difficulty=record['difficulty'], + terrain=record['terrain'], + author=record['owner']['username'], + hidden=record['placedDate'].split('T')[0], + favorites=record['favoritePoints'], + pm_only=record['premiumOnly'], + + # Not consumed attributes: + # detailsUrl + # hasGeotour + # hasLogDraft + # id + # lastFoundDate + # owner.code + # userDidNotFind + ) + + # NOTE: Basic Members have no access to postedCoordinates of Premium-only caches + if 'postedCoordinates' in record: + cache.location = Point( + record['postedCoordinates']['latitude'], + record['postedCoordinates']['longitude'] + ) + + return cache + def __init__(self, geocaching, wp, **kwargs): """Create a cache instance. @@ -827,7 +864,7 @@ def load_by_guid(self): type_img = os.path.basename(content.find("img").get("src")) self.type = Type.from_filename(os.path.splitext(type_img)[0]) - size_img = content.find("img", src=re.compile("\/icons\/container\/")) + size_img = content.find("img", src=re.compile(r"\/icons\/container\/")) self.size = Size.from_string(size_img.get("alt").split(": ")[1]) D_and_T_img = content.find("p", "Meta DiffTerr").find_all("img") @@ -843,7 +880,7 @@ def load_by_guid(self): hidden_p = content.find("p", text=re.compile("Placed Date:")) self.hidden = hidden_p.text.replace("Placed Date:", "").strip() - attr_img = content.find_all("img", src=re.compile("\/attributes\/")) + attr_img = content.find_all("img", src=re.compile(r"\/attributes\/")) attributes_raw = [ os.path.basename(_.get("src")).rsplit("-", 1) for _ in attr_img ] @@ -1004,12 +1041,12 @@ def load_logbook(self, limit=float("inf")): img_filename = log_data["LogTypeImage"].rsplit(".", 1)[0] # filename w/o extension # create and fill log object - l = Log() - l.type = LogType.from_filename(img_filename) - l.text = log_data["LogText"] - l.visited = log_data["Visited"] - l.author = log_data["UserName"] - yield l + log = Log() + log.type = LogType.from_filename(img_filename) + log.text = log_data["LogText"] + log.visited = log_data["Visited"] + log.author = log_data["UserName"] + yield log # TODO: trackable list can have multiple pages - handle it in similar way as _logbook_get_page # for example see: http://www.geocaching.com/geocache/GC26737_geocaching-jinak-tb-gc-hrbitov @@ -1034,7 +1071,7 @@ def load_trackables(self, limit=float("inf")): # filter out all urls for trackables urls = [link.get("href") for link in links if "track" in link.get("href")] # find the names matching the trackble urls - names = [re.split("[\<\>]", str(link))[2] for link in links if "track" in link.get("href")] + names = [re.split(r"[\<\>]", str(link))[2] for link in links if "track" in link.get("href")] for name, url in zip(names, urls): @@ -1280,6 +1317,10 @@ def from_string(cls, name): except KeyError as e: raise errors.ValueError("Unknown cache type '{}'.".format(name)) from e + @classmethod + def from_number(cls, number: int): + return Type(str(number)) + class Size(enum.Enum): """Enum of possible cache sizes. @@ -1322,14 +1363,25 @@ def from_number(cls, number): number = int(number) number_mapping = { + 1: cls.not_chosen, 2: cls.micro, - 8: cls.small, 3: cls.regular, 4: cls.large, - 6: cls.other + 5: cls.virtual, + 6: cls.other, + 8: cls.small, } try: return number_mapping[number] except KeyError as e: raise errors.ValueError("Unknown cache size numeric id '{}'.".format(number)) from e + + +class Status(enum.IntEnum): + """Enum of possible cache statuses.""" + # NOTE: extracted from https://www.geocaching.com/play/map/public/main.2b28b0dc1c9c10aaba66.js + enabled = 0 + disabled = 1 + archived = 2 + unpublished = 3 diff --git a/pycaching/errors.py b/pycaching/errors.py index 381263e..ca9e31a 100644 --- a/pycaching/errors.py +++ b/pycaching/errors.py @@ -55,3 +55,22 @@ class ValueError(Error, ValueError): Can be raised in various situations, but most commonly when unexpected property value is set. """ pass + + +class TooManyRequestsError(Error): + """Geocaching API rate limit has been reached.""" + + def __init__(self, url: str, rate_limit_reset: int = 0): + """ + Initialize TooManyRequestsError. + + :param url: Requested url. + :param rate_limit_reset: Number of seconds to wait before rate limit reset. + """ + self.url = url + self.rate_limit_reset = rate_limit_reset + + def wait_for(self): + """Wait enough time to release Rate Limits.""" + import time + time.sleep(self.rate_limit_reset + 5) diff --git a/pycaching/geo.py b/pycaching/geo.py index a154a45..fa5d2a0 100644 --- a/pycaching/geo.py +++ b/pycaching/geo.py @@ -230,6 +230,10 @@ def __init__(self, point_a, point_b): :param .Point point_a: Top left corner. :param .Point point_b: Bottom right corner. """ + if point_a.latitude < point_b.latitude: + point_a.latitude, point_b.latitude = point_b.latitude, point_a.latitude + if point_a.longitude > point_b.longitude: + point_a.longitude, point_b.longitude = point_b.longitude, point_a.longitude assert point_a != point_b, "Corner points cannot be the same" self.corners = [point_a, point_b] diff --git a/pycaching/geocaching.py b/pycaching/geocaching.py index 24f32e6..2bd3654 100644 --- a/pycaching/geocaching.py +++ b/pycaching/geocaching.py @@ -7,13 +7,30 @@ import json import subprocess import warnings +import enum +from typing import Optional, Union from urllib.parse import parse_qs, urljoin, urlparse from os import path from pycaching.cache import Cache, Size from pycaching.log import Log, Type as LogType -from pycaching.geo import Point +from pycaching.geo import Point, Rectangle from pycaching.trackable import Trackable -from pycaching.errors import Error, NotLoggedInException, LoginFailedException, PMOnlyException +from pycaching.errors import Error, NotLoggedInException, LoginFailedException, PMOnlyException, TooManyRequestsError + + +class SortOrder(enum.Enum): + """Enum of possible cache sort orderings returned in Groundspeak API.""" + # NOTE: extracted from https://www.geocaching.com/play/map/public/main.2b28b0dc1c9c10aaba66.js + container_size = "containersize" + date_last_visited = "datelastvisited" + difficulty = "difficulty" + distance = "distance" + favorite_point = "favoritepoint" + found_date = "founddate" + found_date_of_found_by_user = "founddateoffoundbyuser" + geocache_name = "geocachename" + place_date = "placedate" + terrain = "terrain" class Geocaching(object): @@ -29,6 +46,7 @@ class Geocaching(object): "search": "play/search", "search_more": "play/search/more-results", 'my_logs': 'my/logs.aspx', + 'api_search': 'api/proxy/web/search' } _credentials_file = ".gc_credentials" @@ -67,6 +85,12 @@ def _request(self, url, *, expect="soup", method="GET", login_check=True, **kwar return res except requests.exceptions.RequestException as e: + if e.response.status_code == 429: # Handle rate limiting errors + raise TooManyRequestsError( + url, + rate_limit_reset=int(e.response.headers.get('x-rate-limit-reset', '0')) + ) from e + raise Error("Cannot load page: {}".format(url)) from e def login(self, username=None, password=None): @@ -356,6 +380,64 @@ def search_quick(self, area, *, strict=False, zoom=None): # add some shortcuts ------------------------------------------------------ + def search_rect( + self, + rect: Rectangle, + *, + per_query: int = 200, + sort_by: Union[str, SortOrder] = SortOrder.date_last_visited, + origin: Optional[Point] = None, + wait_sleep: bool = True + ): + """ + Return a generator of caches in given Rectange area. + + :param rect: Search area. + :param int per_query: Number of caches requested in single query. + :param sort_by: Order cached by given criterion. + :param origin: Origin point for search by distance. + :param wait_sleep: In case of rate limits exceeding, wait appropriate time if set True, + otherwise just yield None. + """ + if not isinstance(sort_by, SortOrder): + sort_by = SortOrder(sort_by) + + params = { + "box": "{},{},{},{}".format( + rect.corners[0].latitude, + rect.corners[0].longitude, + rect.corners[1].latitude, + rect.corners[1].longitude, + ), + "take": per_query, + "asc": "true", + "skip": 0, + "sort": sort_by.value, + } + + if sort_by is SortOrder.distance: + assert isinstance(origin, Point) + params["origin"] = "{},{}".format(origin.latitude, origin.longitude) + + total, offset = None, 0 + while (total is None) or (offset < total): + params["skip"] = offset + + try: + resp = self._request(self._urls["api_search"], params=params, expect="json") + except TooManyRequestsError as e: + if wait_sleep: + e.wait_for() + else: + yield None + continue + + for record in resp["results"]: + yield Cache._from_api_record(self, record) + + total = resp["total"] + offset += per_query + def geocode(self, location): """Return a :class:`.Point` object from geocoded location. @@ -396,8 +478,8 @@ def post_log(self, wp, text, type=LogType.found_it, date=None): """ if not date: date = datetime.date.today() - l = Log(type=type, text=text, visited=date) - self.get_cache(wp).post_log(l) + log = Log(type=type, text=text, visited=date) + self.get_cache(wp).post_log(log) def _cache_from_guid(self, guid): logging.info('Loading cache with GUID {!r}'.format(guid)) diff --git a/pycaching/util.py b/pycaching/util.py index ef54f94..183b613 100644 --- a/pycaching/util.py +++ b/pycaching/util.py @@ -77,7 +77,7 @@ def format_date(date, user_date_format): """Format a date according to user_date_format.""" # parse user format date_format = user_date_format.lower() - date_format = re.split("(\W+)", date_format) + date_format = re.split(r"(\W+)", date_format) # non-zero-padded numbers use different characters depending on different platforms # see https://strftime.org/ for example eat_zero_prefix = "#" if platform.system() == "Windows" else "-" diff --git a/test/cassettes/geocaching_api_rate_limit.json b/test/cassettes/geocaching_api_rate_limit.json new file mode 100644 index 0000000..3dafcbb --- /dev/null +++ b/test/cassettes/geocaching_api_rate_limit.json @@ -0,0 +1,863 @@ +{ + "http_interactions": [ + { + "recorded_at": "2020-06-08T19:26:41", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=0&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7453707,\"name\":\"CITO podle pranostik - Maxim\",\"code\":\"GC8G003\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":13,\"containerType\":6,\"difficulty\":1.0,\"terrain\":3.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.071967,\"longitude\":14.392633},\"detailsUrl\":\"/geocache/GC8G003\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-06-10T17:30:00\",\"owner\":{\"code\":\"PR24GA1\",\"username\":\"taxoft\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "516" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "8842fad8-90ff-47c5-bde2-889d8022bca2" + ], + "Date": [ + "Mon, 08 Jun 2020 19:26:35 GMT" + ], + "Set-Cookie": [ + "jwt=; domain=.geocaching.com; path=/; expires=Mon, 08-Jun-2020 20:25:34 GMT; secure; HttpOnly" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=0&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:26:41", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=1&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7624537,\"name\":\"4 roky jsme tu s V\u00e1mi\",\"code\":\"GC8NPQQ\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":3653,\"containerType\":6,\"difficulty\":1.0,\"terrain\":1.5,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.187433,\"longitude\":14.15545},\"detailsUrl\":\"/geocache/GC8NPQQ\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-06-27T15:00:00\",\"owner\":{\"code\":\"PRCMVK0\",\"username\":\"cvr\u010dkov\u00e9\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "515" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "6012160e-bd5b-4cf4-99c2-c63fa4ff6466" + ], + "Date": [ + "Mon, 08 Jun 2020 19:26:36 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=1&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:26:41", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=2&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7737235,\"name\":\"V jedn\u00e9 stop\u011b\",\"code\":\"GC8TG15\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":6,\"containerType\":6,\"difficulty\":1.0,\"terrain\":1.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.67815,\"longitude\":14.03695},\"detailsUrl\":\"/geocache/GC8TG15\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-08-29T08:30:00\",\"owner\":{\"code\":\"PR22HRH\",\"username\":\"Ajfel66\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "501" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "614e367f-0bc9-4247-8439-2bcb24b81850" + ], + "Date": [ + "Mon, 08 Jun 2020 19:26:36 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=2&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:26:42", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=3&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7503565,\"name\":\"Community Celebration Event - Terezin Games 2020\",\"code\":\"GC8HMWD\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":3653,\"containerType\":6,\"difficulty\":1.0,\"terrain\":1.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.506667,\"longitude\":14.152},\"detailsUrl\":\"/geocache/GC8HMWD\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-08-15T16:00:00\",\"owner\":{\"code\":\"PR671V8\",\"username\":\"evenTeam\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "537" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "1ba1d746-c702-4581-9274-d5345e885bef" + ], + "Date": [ + "Mon, 08 Jun 2020 19:26:36 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=3&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:26:42", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=4&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7572415,\"name\":\"Bowling v Repich II/?\",\"code\":\"GC8KZGC\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":6,\"containerType\":6,\"difficulty\":1.0,\"terrain\":1.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.065917,\"longitude\":14.304117},\"detailsUrl\":\"/geocache/GC8KZGC\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-06-22T20:15:00\",\"owner\":{\"code\":\"PR3KWJX\",\"username\":\"bosorcicka\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "512" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "4215ff61-59cd-4ddb-a0f7-c13b8767a05f" + ], + "Date": [ + "Mon, 08 Jun 2020 19:26:37 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=4&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:26:43", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=5&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7501312,\"name\":\"\\\"CESTOVATEL\u00c9\\\" na Lou\u0161t\u00edn\u011b\",\"code\":\"GC8HJGQ\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":3653,\"containerType\":6,\"difficulty\":1.0,\"terrain\":2.5,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.163783,\"longitude\":13.793783},\"detailsUrl\":\"/geocache/GC8HJGQ\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-06-20T13:00:00\",\"owner\":{\"code\":\"PR2X9QM\",\"username\":\"GeoCule\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "522" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "ff2a3c7c-1a56-4299-bf12-95d966eb15bb" + ], + "Date": [ + "Mon, 08 Jun 2020 19:26:37 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=5&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:26:44", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=6&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7710650,\"name\":\"5.peceni burtu v udoli\",\"code\":\"GC8RKBJ\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":6,\"containerType\":6,\"difficulty\":1.0,\"terrain\":1.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.138883,\"longitude\":14.1024},\"detailsUrl\":\"/geocache/GC8RKBJ\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-06-12T18:00:00\",\"owner\":{\"code\":\"PR45R40\",\"username\":\"kstavk\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "507" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "c5b071d8-aa9f-4b65-a200-e08c93622b3f" + ], + "Date": [ + "Mon, 08 Jun 2020 19:26:38 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=6&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:26:44", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=7&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7453710,\"name\":\"CITO podle pranostik - Adina\",\"code\":\"GC8G006\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":13,\"containerType\":6,\"difficulty\":1.0,\"terrain\":3.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.071967,\"longitude\":14.392633},\"detailsUrl\":\"/geocache/GC8G006\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-06-17T17:30:00\",\"owner\":{\"code\":\"PR24GA1\",\"username\":\"taxoft\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "516" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "5519009e-245c-4398-857e-3a3b666ef6bf" + ], + "Date": [ + "Mon, 08 Jun 2020 19:26:39 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=7&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:26:45", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=8&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7453714,\"name\":\"CITO podle pranostik - Jaroslava\",\"code\":\"GC8G00A\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":13,\"containerType\":6,\"difficulty\":1.0,\"terrain\":3.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.071967,\"longitude\":14.392633},\"detailsUrl\":\"/geocache/GC8G00A\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-07-01T17:30:00\",\"owner\":{\"code\":\"PR24GA1\",\"username\":\"taxoft\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "520" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "8f6b3bdc-0e96-4a4b-85e4-f7761c53876d" + ], + "Date": [ + "Mon, 08 Jun 2020 19:26:39 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=8&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:26:45", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=9&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7453712,\"name\":\"CITO podle pranostik - sv. Jan K\u0159titel\",\"code\":\"GC8G008\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":13,\"containerType\":6,\"difficulty\":1.0,\"terrain\":3.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.071967,\"longitude\":14.392633},\"detailsUrl\":\"/geocache/GC8G008\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-06-24T17:30:00\",\"owner\":{\"code\":\"PR24GA1\",\"username\":\"taxoft\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "527" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "e2da2b48-9066-433c-ae11-70ea90b97a87" + ], + "Date": [ + "Mon, 08 Jun 2020 19:26:40 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=9&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:26:45", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=10&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"statusCode\":429,\"statusMessage\":\"Too many requests\"}" + }, + "headers": { + "Cache-Control": [ + "private" + ], + "Content-Length": [ + "54" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "57ea9077-342d-40e2-8961-766b3c2afb06" + ], + "Date": [ + "Mon, 08 Jun 2020 19:26:40 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ], + "x-rate-limit-reset": [ + "20" + ] + }, + "status": { + "code": 429, + "message": "" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=10&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:27:10", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=10&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7453712,\"name\":\"CITO podle pranostik - sv. Jan K\u0159titel\",\"code\":\"GC8G008\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":13,\"containerType\":6,\"difficulty\":1.0,\"terrain\":3.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.071967,\"longitude\":14.392633},\"detailsUrl\":\"/geocache/GC8G008\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-06-24T17:30:00\",\"owner\":{\"code\":\"PR24GA1\",\"username\":\"taxoft\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "527" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "696a75de-9363-4b10-9dc3-1979580e83ac" + ], + "Date": [ + "Mon, 08 Jun 2020 19:27:05 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=10&sort=datelastvisited" + } + } + ], + "recorded_with": "betamax/0.8.1" +} \ No newline at end of file diff --git a/test/cassettes/geocaching_api_rate_limit_with_none.json b/test/cassettes/geocaching_api_rate_limit_with_none.json new file mode 100644 index 0000000..7d3509e --- /dev/null +++ b/test/cassettes/geocaching_api_rate_limit_with_none.json @@ -0,0 +1,1011 @@ +{ + "http_interactions": [ + { + "recorded_at": "2020-06-08T19:30:38", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=0&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7453707,\"name\":\"CITO podle pranostik - Maxim\",\"code\":\"GC8G003\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":13,\"containerType\":6,\"difficulty\":1.0,\"terrain\":3.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.071967,\"longitude\":14.392633},\"detailsUrl\":\"/geocache/GC8G003\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-06-10T17:30:00\",\"owner\":{\"code\":\"PR24GA1\",\"username\":\"taxoft\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "516" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "7e19a115-b714-493a-841a-a246b868ebfa" + ], + "Date": [ + "Mon, 08 Jun 2020 19:30:32 GMT" + ], + "Set-Cookie": [ + "jwt=; domain=.geocaching.com; path=/; expires=Mon, 08-Jun-2020 20:29:32 GMT; secure; HttpOnly" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=0&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:30:38", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=1&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7624537,\"name\":\"4 roky jsme tu s V\u00e1mi\",\"code\":\"GC8NPQQ\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":3653,\"containerType\":6,\"difficulty\":1.0,\"terrain\":1.5,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.187433,\"longitude\":14.15545},\"detailsUrl\":\"/geocache/GC8NPQQ\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-06-27T15:00:00\",\"owner\":{\"code\":\"PRCMVK0\",\"username\":\"cvr\u010dkov\u00e9\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "515" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "ac89ee89-781e-4825-ae8e-28748a26ffc4" + ], + "Date": [ + "Mon, 08 Jun 2020 19:30:33 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=1&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:30:39", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=2&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7737235,\"name\":\"V jedn\u00e9 stop\u011b\",\"code\":\"GC8TG15\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":6,\"containerType\":6,\"difficulty\":1.0,\"terrain\":1.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.67815,\"longitude\":14.03695},\"detailsUrl\":\"/geocache/GC8TG15\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-08-29T08:30:00\",\"owner\":{\"code\":\"PR22HRH\",\"username\":\"Ajfel66\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "501" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "c5ac4a2c-c7ee-4a36-ac45-e6f829332c77" + ], + "Date": [ + "Mon, 08 Jun 2020 19:30:33 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=2&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:30:39", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=3&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7503565,\"name\":\"Community Celebration Event - Terezin Games 2020\",\"code\":\"GC8HMWD\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":3653,\"containerType\":6,\"difficulty\":1.0,\"terrain\":1.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.506667,\"longitude\":14.152},\"detailsUrl\":\"/geocache/GC8HMWD\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-08-15T16:00:00\",\"owner\":{\"code\":\"PR671V8\",\"username\":\"evenTeam\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "537" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "a40c1aad-e901-42ab-9b73-22e30536a393" + ], + "Date": [ + "Mon, 08 Jun 2020 19:30:33 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=3&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:30:39", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=4&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7572415,\"name\":\"Bowling v Repich II/?\",\"code\":\"GC8KZGC\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":6,\"containerType\":6,\"difficulty\":1.0,\"terrain\":1.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.065917,\"longitude\":14.304117},\"detailsUrl\":\"/geocache/GC8KZGC\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-06-22T20:15:00\",\"owner\":{\"code\":\"PR3KWJX\",\"username\":\"bosorcicka\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "512" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "32fa900c-4891-431a-a46c-06536a333684" + ], + "Date": [ + "Mon, 08 Jun 2020 19:30:34 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=4&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:30:40", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=5&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7501312,\"name\":\"\\\"CESTOVATEL\u00c9\\\" na Lou\u0161t\u00edn\u011b\",\"code\":\"GC8HJGQ\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":3653,\"containerType\":6,\"difficulty\":1.0,\"terrain\":2.5,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.163783,\"longitude\":13.793783},\"detailsUrl\":\"/geocache/GC8HJGQ\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-06-20T13:00:00\",\"owner\":{\"code\":\"PR2X9QM\",\"username\":\"GeoCule\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "522" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "9b586dd3-b779-4685-a0e0-ad1245f738dd" + ], + "Date": [ + "Mon, 08 Jun 2020 19:30:34 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=5&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:30:40", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=6&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7710650,\"name\":\"5.peceni burtu v udoli\",\"code\":\"GC8RKBJ\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":6,\"containerType\":6,\"difficulty\":1.0,\"terrain\":1.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.138883,\"longitude\":14.1024},\"detailsUrl\":\"/geocache/GC8RKBJ\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-06-12T18:00:00\",\"owner\":{\"code\":\"PR45R40\",\"username\":\"kstavk\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "507" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "7d9c454f-1c26-4157-8821-e66c17507c01" + ], + "Date": [ + "Mon, 08 Jun 2020 19:30:35 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=6&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:30:41", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=7&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7453710,\"name\":\"CITO podle pranostik - Adina\",\"code\":\"GC8G006\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":13,\"containerType\":6,\"difficulty\":1.0,\"terrain\":3.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.071967,\"longitude\":14.392633},\"detailsUrl\":\"/geocache/GC8G006\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-06-17T17:30:00\",\"owner\":{\"code\":\"PR24GA1\",\"username\":\"taxoft\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "516" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "1ac8d3ed-0c41-445a-bab8-9280171f521f" + ], + "Date": [ + "Mon, 08 Jun 2020 19:30:35 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=7&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:30:41", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=8&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7453714,\"name\":\"CITO podle pranostik - Jaroslava\",\"code\":\"GC8G00A\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":13,\"containerType\":6,\"difficulty\":1.0,\"terrain\":3.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.071967,\"longitude\":14.392633},\"detailsUrl\":\"/geocache/GC8G00A\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-07-01T17:30:00\",\"owner\":{\"code\":\"PR24GA1\",\"username\":\"taxoft\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "520" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "d4360c9e-fb20-4638-98b7-b80aed13cc88" + ], + "Date": [ + "Mon, 08 Jun 2020 19:30:36 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=8&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:30:42", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=9&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7453712,\"name\":\"CITO podle pranostik - sv. Jan K\u0159titel\",\"code\":\"GC8G008\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":13,\"containerType\":6,\"difficulty\":1.0,\"terrain\":3.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":50.071967,\"longitude\":14.392633},\"detailsUrl\":\"/geocache/GC8G008\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-06-24T17:30:00\",\"owner\":{\"code\":\"PR24GA1\",\"username\":\"taxoft\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "527" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "a12fcee1-c603-4be5-b821-7d52465a2ed6" + ], + "Date": [ + "Mon, 08 Jun 2020 19:30:36 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=9&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:30:42", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=10&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"statusCode\":429,\"statusMessage\":\"Too many requests\"}" + }, + "headers": { + "Cache-Control": [ + "private" + ], + "Content-Length": [ + "54" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "a24662aa-ffa9-4bf3-a5be-01ed25bcb8ef" + ], + "Date": [ + "Mon, 08 Jun 2020 19:30:36 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ], + "x-rate-limit-reset": [ + "23" + ] + }, + "status": { + "code": 429, + "message": "" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=10&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:30:52", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=10&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"statusCode\":429,\"statusMessage\":\"Too many requests\"}" + }, + "headers": { + "Cache-Control": [ + "private" + ], + "Content-Length": [ + "54" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "da652c6e-57a8-49f8-8a25-e9b065360f14" + ], + "Date": [ + "Mon, 08 Jun 2020 19:30:47 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ], + "x-rate-limit-reset": [ + "13" + ] + }, + "status": { + "code": 429, + "message": "" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=10&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:31:03", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=10&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"statusCode\":429,\"statusMessage\":\"Too many requests\"}" + }, + "headers": { + "Cache-Control": [ + "private" + ], + "Content-Length": [ + "54" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "f7ffbe6a-7279-4df1-966f-8db40c68ac6f" + ], + "Date": [ + "Mon, 08 Jun 2020 19:30:57 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ], + "x-rate-limit-reset": [ + "2" + ] + }, + "status": { + "code": 429, + "message": "" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=10&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T19:31:13", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=10&sort=datelastvisited" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"results\":[{\"id\":7696741,\"name\":\"Upiri event, aneb daruj krev posedme\",\"code\":\"GC8R4WX\",\"premiumOnly\":false,\"favoritePoints\":0,\"geocacheType\":6,\"containerType\":6,\"difficulty\":1.0,\"terrain\":1.0,\"userFound\":false,\"userDidNotFind\":false,\"cacheStatus\":0,\"postedCoordinates\":{\"latitude\":49.8406,\"longitude\":13.914717},\"detailsUrl\":\"/geocache/GC8R4WX\",\"hasGeotour\":false,\"hasLogDraft\":false,\"placedDate\":\"2020-06-26T07:00:00\",\"owner\":{\"code\":\"PRBJY85\",\"username\":\"mik.ves75\"},\"lastFoundDate\":\"0001-01-01T00:00:00\"}],\"total\":8657}" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Content-Length": [ + "524" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "15f5d480-55bd-4247-86cb-a1e673bbd2de" + ], + "Date": [ + "Mon, 08 Jun 2020 19:31:07 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=50.74%2C13.38%2C49.73%2C14.4&take=1&asc=true&skip=10&sort=datelastvisited" + } + } + ], + "recorded_with": "betamax/0.8.1" +} \ No newline at end of file diff --git a/test/cassettes/geocaching_search_rect.json b/test/cassettes/geocaching_search_rect.json new file mode 100644 index 0000000..47fb23e --- /dev/null +++ b/test/cassettes/geocaching_search_rect.json @@ -0,0 +1,940 @@ +{ + "http_interactions": [ + { + "recorded_at": "2020-06-08T20:06:08", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=datelastvisited" + }, + "response": { + "body": { + "base64_string": "H4sIAAAAAAAAA6pWKkotLs0pKVayiq5WykxRsjI0sjC1NDPQUcpLzE1VslLyzs9LTc5LVCgrTk3OUCgpSswtS8zKVNBVKMuvyi/LS1TSUUrOTwGpdHc2DImMdAcKFBSl5maW5vrn5VQqWaUl5hSn6iilJZblF2WWpAbkZ+aBrDPXUUpPzU9OTM5IDaksAOq3ABmUV5KYmZdaBBEx0lFKyUxLy0wGOhBokLEe0FUlqUVFQCVAd+qZ6iiVFqcWueWX5gHdDbUGJOKSmeKXX+KWiSQMtie4JLGkFGg10JiC/OKS1BTn/PyilMy8xJJUoGi1Uk5iSWZJKcgvJpZ65sbmBhbGOko5+XnpUFFDYz1jCwOTWqCzUoHuzCkOLcoB+lsf5g99RAhkJBa7p+aX5JcWwZ0AFPLJT3cpSkwrgYsV5CQmp6a4AB0ANMfIwMBS18BM18g4xMDACoyAJuWXA8MD5DpoKAcEmQYG+XkAZUBehUaSo49PprdCSWpirhLQdTmJxSXgUIEbbGipa2ika2QZYmhiZWBhZWIKVAaJbjMzQ2NTc2DYQ00K8FVQNrVQCEgsyCxKzSvORolfc6+gIFMi49eSUPyCRZDj1wQlfo1oHb/GZpaGwESIHr8mhmbm+GIYFgakxjA0Iix0DYARYYo/hk3MLSODUGM4KDM5xDUAPXYhhhoZ6BqY6hoYhxgaQQ2Fx66lkbmRITxyPfJBoaGQC9QIxJnZlSiZ18zQG2QpMZFrCMwYhGIXPfeC4hM999Iwdi3NscWuuamFMXrsouRfaCCQGruQiDAw1wVmYUML/LFrZOEVboYauympWWnmoEyJM3aNjNBjF+gjA0NTQzNgVEBNca/MzcxGiVL3cFMTIqPUhFCMAqMQNUaN0PIrkEfbGEXPr5AYNTZEz6+oMQoNAzJj1ELXEBT+BGLUzDnSGzVGvVKBHirKxBulwOIYPUrNzIyNLA0QtS+oODYxVfAFBo/Ch/k9nSilsbdLuCuxsQssBAhFL1pxjFrdmtI6eo0NTNCrW1D0GpqboscuSmkMDQNSYxcSD6DS2FjX0BB/7Lq4B3i5oMZuVUpqRmIWqZELrHKApTEwDUNNcTkyu6Q4+/BKhYyjMzOPLiw5MlvBNzElMT0RWO0WIce0hYuxgTGRMQ0MbdSIBpbD6CUzakSDy2L0kpmWEQ3MsegRDczHJsboJTNKTMPCgMyYBrasgMgIf0x7uFi4RaDG9NG9qTlliQrGuOPaDIjQ4xqYX8xMDA2AIQnLxzlVoNZUKrABnZ+TmpVUWoxa9xoGBIUTGcFAQ1EjGJhr0CMYPSfTOoLRGs7AJhR6BAMbzpboDSu0ghoaBqRGMCQmQFWvsa6ROf4INnQ2ADfPkSK4rDSlEm/kmocYGluZmlsZWyrVxuooleSXJOYoWZnXAgIAAP//TRyjAjsNAAA=", + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Connection": [ + "Keep-Alive" + ], + "Content-Encoding": [ + "gzip" + ], + "Content-Length": [ + "1076" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "27886143-47d6-414a-9cbc-458a4116227f" + ], + "Date": [ + "Mon, 08 Jun 2020 20:06:03 GMT" + ], + "Set-Cookie": [ + "jwt=; domain=.geocaching.com; path=/; expires=Mon, 08-Jun-2020 21:05:02 GMT; secure; HttpOnly" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T20:06:09", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=distance&origin=49.73717%2C13.38097" + }, + "response": { + "body": { + "base64_string": "H4sIAAAAAAAAA6pWKkotLs0pKVayiq5WykxRsjI1MzE0MNVRykvMTVWyUgrIqUrNK85OVSgpys9JzUoqLa5U0lFKzk8BSbo7GxoGBIUDBQqKUnMzS3P983IqlazSEnOKU3WU0hLL8osyS1ID8jPzQBYADU1PzU9OTM5IDaksAOo3BhmUV5KYmZdaBBEx0lFKyUxLy0wGOglokLEeUE9JalERUImSlSGIV1qcWuSWX5oHdCnUGpCIS2aKX36JWyaSMNie4JLEklKg1QZAF+YXl6SmOOfnF6Vk5iWWpAJFq5VyEksyS0pBfjGx1DM3Njc0M9dRysnPS4eKGhrrGVsYWJqZ1wIdlgp0aU5xaFEO0Of6MJ/oI8IgI7HYPTW/JL+0CO4IoJBPf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+ "max-age=60, private" + ], + "Connection": [ + "Keep-Alive" + ], + "Content-Encoding": [ + "gzip" + ], + "Content-Length": [ + "1073" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "bbe95a21-f7cf-40b3-ae56-e4428116bb74" + ], + "Date": [ + "Mon, 08 Jun 2020 20:06:04 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=distance&origin=49.73717%2C13.38097" + } + }, + { + "recorded_at": "2020-06-08T20:06:10", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=containersize" + }, + "response": { + "body": { + "base64_string": "H4sIAAAAAAAAA6pWKkotLs0pKVayiq5WykxRsjI3NjM3MjTXUcpLzE1VslJyOTK7pDj78EqFjKMzM48uLDkyW8E3MSUxPbE4O7FISUcpOT8FpMzd2cLF2MAYKFBQlJqbWZrrn5dTqWSVlphTnKqjlJZYll+UWZIakJ+ZB7LLQEcpPTU/OTE5IzWksgCo3whkUF5JYmZeahFcJCUzLS0zGeg6oEGGeqY6SiWpRUVAJVBeaXFqkVt+aR7Q0VBrQCIumSl++SVumUjCYHuCSxJLSiFWF+QXl6SmOOfnF6Vk5iWWpAJFq5VyEksyS0pB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8", + "string": "" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Connection": [ + "Keep-Alive" + ], + "Content-Encoding": [ + "gzip" + ], + "Content-Length": [ + "1043" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "b03c5c3c-ebb2-4e21-8b14-466a41683d70" + ], + "Date": [ + "Mon, 08 Jun 2020 20:06:04 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=containersize" + } + }, + { + "recorded_at": "2020-06-08T20:06:10", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=datelastvisited" + }, + "response": { + "body": { + "base64_string": "H4sIAAAAAAAAA6pWKkotLs0pKVayiq5WykxRsjI0sjC1NDPQUcpLzE1VslLyzs9LTc5LVCgrTk3OUCgpSswtS8zKVNBVKMuvyi/LS1TSUUrOTwGpdHc2DImMdAcKFBSl5maW5vrn5VQqWaUl5hSn6iilJZblF2WWpAbkZ+aBrDPXUUpPzU9OTM5IDaksAOq3ABmUV5KYmZdaBBEx0lFKyUxLy0wGOhBokLEe0FUlqUVFQCVAd+qZ6iiVFqcWueWX5gHdDbUGJOKSmeKXX+KWiSQMtie4JLGkFGg10JiC/O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ROf4INnQ2ADfPkSK4rDSlEm/kmocYGluZmlsZWyrVxuooleSXJOYoWZnXAgIAAP//TRyjAjsNAAA=", + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Connection": [ + "Keep-Alive" + ], + "Content-Encoding": [ + "gzip" + ], + "Content-Length": [ + "1076" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "5f385301-bf2b-49e6-9f46-ea33fcc84290" + ], + "Date": [ + "Mon, 08 Jun 2020 20:06:05 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=datelastvisited" + } + }, + { + "recorded_at": "2020-06-08T20:06:10", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=difficulty" + }, + "response": { + "body": { + "base64_string": "H4sIAAAAAAAAA6pWKkotLs0pKVayiq5WykxRsjI3NjM3MjTXUcpLzE1VslJyOTK7pDj78EqFjKMzM48uLDkyW8E3MSUxPbE4O7FISUcpOT8FpMzd2cLF2MAYKFBQlJqbWZrrn5dTqWSVlphTnKqjlJZYll+UWZIakJ+ZB7LLQEcpPTU/OTE5IzWksgCo3whkUF5JYmZeahFcJCUzLS0zGe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rc+66OWylQlaK4vWcWuG3soCx60JMMbR4xalYIaGAalxC4kIUMEMrCDRW1locWtibhkJKh6Q4jYoMznENQB37JoC0wxS1o3VUSrJL0nMUbIyrwUEAAD///c7j6s7DQAA", + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Connection": [ + "Keep-Alive" + ], + "Content-Encoding": [ + "gzip" + ], + "Content-Length": [ + "1062" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "10c54e0a-ad78-4eb9-a39d-9818f1631585" + ], + "Date": [ + "Mon, 08 Jun 2020 20:06:05 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=difficulty" + } + }, + { + "recorded_at": "2020-06-08T20:06:11", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=favoritepoint" + }, + "response": { + "body": { + "base64_string": "H4sIAAAAAAAAA6pWKkotLs0pKVayiq5WykxRsjI3NjM3MjTXUcpLzE1VslJyOTK7pDj78EqFjKMzM48uLDkyW8E3MSUxPbE4O7FISUcpOT8FpMzd2cLF2MAYKFBQlJqbWZrrn5dTqWSVlphTnKqjlJZYll+UWZIakJ+ZB7LL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MNXZTUrPSzEGZEj12EfWwEXrsgvKusZGlAaKoBuVdE1MFX2DoKHyY39OJknW9XcJdCcUurJUFTDGEYhct76KWzabozSxqx66xgQl62QyKXUNzU/TIRcm60DAgNXIh8QDKusa6hob4I9fFPcDLBTVyq1JSMxKz8EYuciMrVkepJL8kMUfJyrwWEAAA//8V/h7kOw0AAA==", + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Connection": [ + "Keep-Alive" + ], + "Content-Encoding": [ + "gzip" + ], + "Content-Length": [ + "1072" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "7f5cc0dd-67d0-4aef-8879-4bc1a77d7e80" + ], + "Date": [ + "Mon, 08 Jun 2020 20:06:06 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=favoritepoint" + } + }, + { + "recorded_at": "2020-06-08T20:06:12", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=founddate" + }, + "response": { + "body": { + "base64_string": "H4sIAAAAAAAAA6pWKkotLs0pKVayiq5WykxRsjI3NjM3MjTXUcpLzE1VslJyOTK7pDj78EqFjKMzM48uLDkyW8E3MSUxPbE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ctErYnP0rAuuiE0t0BtXqIUzNBBIjV1IRBiYgxpXhhbosYtWEVt4hZuhxm5KalaaOajExR27RuixC8whZiaGBsBwhOXcnCpQcZwKrIHzc1KzkkqLUePXMCAonMj4BRqKGr3A+B7o6EWreYFlMHr0AmteS/SSGS16oWFAfvQa6xqZ449eQ2cDcP2OFL1lpSmVuCMX2G42DzE0tjI1tzK2VKqN1VEqyS9JzFGyMq8FBAAA//9bISoLOw0AAA==", + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Connection": [ + "Keep-Alive" + ], + "Content-Encoding": [ + "gzip" + ], + "Content-Length": [ + "1063" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "a477d4a8-4b46-48d0-83a2-ac4b9a061d6f" + ], + "Date": [ + "Mon, 08 Jun 2020 20:06:06 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=founddate" + } + }, + { + "recorded_at": "2020-06-08T20:06:12", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=founddateoffoundbyuser" + }, + "response": { + "body": { + "base64_string": "H4sIAAAAAAAAA6pWKkotLs0pKVayiq5WykxRs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NzK2BKRlw0MTQ3NgOEONcO9MjczGyU+3cNNTQjFJ6xlhR6f6BkWHMPI8WmEVjqjN6yoHZ+W6KUzpO41NsQfn9AwIDM+LXQNQWUpenyi1b1mzpHeqPHplQr0UFEm7ihFb1pBohRYBwGbVkBvQo1xOTK7pDj78EqFjKMzM48uLDkyW8E3MSUxPRFYDxchR7WFi7GBMZFRDQxv1KgGZlT0rIsa1eDMip51qR3VyG1oYKRiiWoTY/RmFkpUw8KA1KiGRAqwEAUV0Eb4o9rDxcItAjWqj+5NzSlLVDDGHdfA7GuGFNexOkol+SWJOUpW5rWAAAAA//82R0VvOw0AAA==", + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Connection": [ + "Keep-Alive" + ], + "Content-Encoding": [ + "gzip" + ], + "Content-Length": [ + "1087" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "bf707d32-c097-4083-85ab-2ac4f4f74156" + ], + "Date": [ + "Mon, 08 Jun 2020 20:06:07 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=founddateoffoundbyuser" + } + }, + { + "recorded_at": "2020-06-08T20:06:13", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=geocachename" + }, + "response": { + "body": { + "base64_string": "H4sIAAAAAAAAA6pWKkotLs0pKVayiq5WykxRsjI3NjM3MjTXUcpLzE1VslJyOTK7pDj78EqFjKMzM48uLDkyW8E3MSUxPbE4O7FISUcpOT8FpMzd2cLF2MAYKFBQlJqbWZrrn5dTqWSVlphTnKqjlJZYll+UWZIakJ+ZB7LLQEcpPTU/OTE5IzWksgCo3whkUF5JYmZeahFcJCUzLS0zGeg6oEGGeqY6SiWpRUVAJVBeaXFqkVt+aR7Q0VBrQCIumSl++SVumUjCYHuCSxJLSiFWF+QXl6SmOOfnF6Vk5iWWpAJFq5VyEksyS0pBfjGx1DMHegUUBjn5eelQUUNjPWMLcxNj41qgw1KBLs0pDi3KAfpcH+YTfUQYZCQWu6fml+SXFsEdARTyyU93KUpMK4GLFeQkJqemuACdADTHyMDQUtcAiIxCDAyswAhoUn45MERA7oOGc0CQh4uFWwRQBuRZaBwd3ZuaU5aoYKwEdFtOYnEJOFTgxhoZ6BqYAVGIoRHU2FodSFwbGhiaGpoZw+PavTI3Mxs5Tg3dw01NiIxTE/Q4tUCPUyugTchxaqQHjAx4nIJ5NI1TS0uscQqMaXxxCgsDUuMUEvgGFrqGwPA3xR+nRmbOkd6oceqVCvRQUSbuKDXVNbJEj1IlKzNLI2D2hceoRz4oOBRygRqBODO7EiV2zQy9g4iMXUNg3BGKXrQsa4yeZWkdveZYo9fUAj3LokYvNBDIjF5zUJY1tCAQvRZe4Wao0ZuSmpVmboo3do3QYxfoIyMLU0szYHhATfHOz0tNBsZvWXFqcoZCSVFiblliVqaCrkJZflV+WV4iSmyHREa6ExnbwHAkNbJR8jKtI9vc2NzAApgi0SPbwARvVENDgMyoBhbNZrpGxvij2jQwyM8DNaodfXwyvRVKUhNz0aMbYjCw2Dc0AmdmEysDCysTUKqARLepmYmhATAkoQYF5FSl5hVnpwIjOj8nNSuptBg1OxsGBIUTGcFAQ1EjGBiYhCIYPTfTOIINzdBzMyiCLc3QC2vUKIaGAZlRDMzNxrpG5vij2NDZAJyMkKK4rDSlEj1yIUZCK1/zEENjK1NzK2NLREltZmxkaYDIywG+Csompgq+wLBR+DC/pxM5as29XcJdCUUtrB4Glv7omRc9boEi6JkXEbem6BUxtePW2MAEPfOC4tbQ3BRf1MLCgNSohcSDoQUoag0N8Ueti3uAlwtq1FalpGYkZuGOXPRqGBa5hsam5sBgRopcUwuFgMSCzCJQHkYpmc29goJMiYxdS1Ij18oErZWFnnGpHblm6K0scOSaALMz3tiFhgH5sQssQtFbWWixa2JuGQmq6pFiNygzOcQ1AF/sGhgjxW6sjlJJfklijpKVeS0gAAD//6dWjY07DQAA", + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Connection": [ + "Keep-Alive" + ], + "Content-Encoding": [ + "gzip" + ], + "Content-Length": [ + "1050" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "5ca2c5a2-97ad-456c-b4a6-4809beb696c4" + ], + "Date": [ + "Mon, 08 Jun 2020 20:06:08 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=geocachename" + } + }, + { + "recorded_at": "2020-06-08T20:06:13", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=placedate" + }, + "response": { + "body": { + "base64_string": "H4sIAAAAAAAAA6pWKkotLs0pKVayiq5WykxRsjI1MzE0MNVRykvMTVWyUgrIqUrNK85OVSgpys9JzUoqLa5U0lFKzk8BSbo7GxoGBIUDBQqKUnMzS3P983IqlazSEnOKU3WU0hLL8osyS1ID8jPzQBYADU1PzU9OTM5IDaksAOo3BhmUV5KYmZdaBBEx0lFKyUxLy0wGOglokLEeUE9JalERUImSlSGIV1qcWuSWX5oHdCnUGpCIS2aKX36JWyaSMNie4JLEklKg1QZAF+YXl6SmOOfnF6Vk5iWWpAJFq5VyEksyS0pBfjGx1DM3Njc0M9dRysnPS4eKGhrrGVsYWJqZ1wIdlgp0aU5xaFEO0Of6MJ/oI8IgI7HYPTW/JL+0CO4IoJBPfrpLUWJaCVysICcxOTXFBegEoDlGBgbmugbGukbmIQYGVmAENCm/HBgiIPdBwzkgyNDZINIdKAPyLDRmykpTKpWA7spJLC4BhwjcSCMDXQMzXQPzEENjK1NzK2NLoDJI5JpZGpkbGcIj1yMfFBYKuUCNQJyZjRq1ZobeQURGrSEwKlHj1mKwxa2luSGWuDU3tTDGG7fQQCA/bi11DS3wx62RhVe4GWrcpqRmpZmb4o5dU10joxBDI6ihsNg1NDA0NTQDRgXUFPfK3MxslCh1Dzc1ITJKTQjFKDj/IseokR4wKuAxCubRNkYtscaosSF6bkWNUWgYkBmjFrqGoPAnEKNmzpHeqDHqlQr0UFEm3ii1RI9SoJeMLEwtzYABAjXGOz8vNRmYZcuKU5MzgGVyYm5ZYlamgq5CWX5VflleIkpsh0SCywxiYhsYkIRiGz3/osQ2ev6ldmwDy2YDC2B6Q49tAxO8cQ0NATLj2hJUjBoZ449r08AgPw/UuHb08cn0VihJTcxFj26IwYbAMsEIHN0mVgYWViagjA4tn80MjU3NgWEPq319FZRNLRQCEgsyi0DVMEr8mnsFBZkSGb+WhOIXLIIcvyZouZnW8WuGnpvB8WsCrJHxxTAsDEiNYWhEWOgaACMCPTejxbCJuWUkqA5AiuGgzOQQ1wD02IUYCsnMBsbomRkUu8ZGlgaIzAyKXRNTBV9g6Ch8mN/TiRK53i7hroQiF1ZUA2t0EmMXNfeaopfV1I5dYwMT9NwLil1Dc1O8kQsNA/Ij11jX0BB/5Lq4B3i5oEZuVUpqRmIWvshFL6lBkQtMwcCmFTAJQ01xOTK7pDj78EqFjKMzM48uLDkyW8E3MSUxPRGYi4uQY9rCxdjAmMiYBoY2akQDC2X0Yho1osEFM3oxTcuIBla/6BENrJRNjNGbWSgxDQsDMmMaWFADkRH+mPZwsXCLQI3po3tTc8oSFYxxxzWwGW2GFNexOkol+SWJOUpW5rWAAAAA///5rsevOw0AAA==", + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Connection": [ + "Keep-Alive" + ], + "Content-Encoding": [ + "gzip" + ], + "Content-Length": [ + "1057" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "c8fc7611-2b5e-45d9-b131-c846c67a5712" + ], + "Date": [ + "Mon, 08 Jun 2020 20:06:08 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=placedate" + } + }, + { + "recorded_at": "2020-06-08T20:06:13", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=terrain" + }, + "response": { + "body": { + "encoding": "utf-8", + "string": "{\"statusCode\":429,\"statusMessage\":\"Too many requests\"}" + }, + "headers": { + "Cache-Control": [ + "private" + ], + "Content-Length": [ + "54" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "f70d0dad-a6d4-46a8-87af-31c831f8ddac" + ], + "Date": [ + "Mon, 08 Jun 2020 20:06:08 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ], + "x-rate-limit-reset": [ + "52" + ] + }, + "status": { + "code": 429, + "message": "" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=terrain" + } + }, + { + "recorded_at": "2020-06-08T20:07:11", + "request": { + "body": { + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Cookie": [ + "gspkauth=; jwt=; __RequestVerificationToken=" + ], + "User-Agent": [ + "python-requests/2.23.0" + ] + }, + "method": "GET", + "uri": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=terrain" + }, + "response": { + "body": { + "base64_string": "H4sIAAAAAAAAA6pWKkotLs0pKVayiq5WykxRsjI3NjM3MjTXUcpLzE1VslJyOTK7pDj78EqFjKMzM48uLDkyW8E3MSUxPbE4O7FISUcpOT8FpMzd2cLF2MAYKFBQlJqbWZrrn5dTqWSVlphTnKqjlJZYll+UWZIakJ+ZB7LLQEcpPTU/OTE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XYJdyUUubC8C6y/SYxd1LaUKXrmpXbsGhuYoLelQLFraG6KN3KhYUB+5BrrGhrij1wX9wAvF9TIrUpJzUjMwhe5KFk3VkepJL8kMUfJyrwWEAAA///2WXUoOw0AAA==", + "encoding": "utf-8", + "string": "" + }, + "headers": { + "Cache-Control": [ + "max-age=60, private" + ], + "Connection": [ + "Keep-Alive" + ], + "Content-Encoding": [ + "gzip" + ], + "Content-Length": [ + "1039" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "CorrelationGuid": [ + "9bc984ed-4e41-4093-a955-6d68d61c9fff" + ], + "Date": [ + "Mon, 08 Jun 2020 20:07:05 GMT" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Vary": [ + "Accept-Encoding" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "X-XSS-Protection": [ + "1" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.geocaching.com/api/proxy/web/search?box=49.74%2C13.38%2C49.73%2C13.39&take=200&asc=true&skip=0&sort=terrain" + } + } + ], + "recorded_with": "betamax/0.8.1" +} \ No newline at end of file diff --git a/test/helpers.py b/test/helpers.py index 9d4055b..8810106 100644 --- a/test/helpers.py +++ b/test/helpers.py @@ -1,6 +1,10 @@ from betamax.cassette.cassette import Placeholder -CLASSIFIED_COOKIES = ('gspkauth', '__RequestVerificationToken') +CLASSIFIED_COOKIES = ( + 'gspkauth', + '__RequestVerificationToken', + 'jwt' # NOTE: JWT token, contains user related informations: username, ids, oauth token +) def sanitize_cookies(interaction, cassette): diff --git a/test/test_geo.py b/test/test_geo.py index 443b653..ce520af 100644 --- a/test/test_geo.py +++ b/test/test_geo.py @@ -144,15 +144,15 @@ def setUp(self): def test_bounding_box(self): bb = self.p.bounding_box - sw, ne = bb.corners + nw, se = bb.corners with self.subTest("Minimum latitude"): - self.assertEqual(sw.latitude, -70.) + self.assertEqual(se.latitude, -70.) with self.subTest("Minimum longitude"): - self.assertEqual(sw.longitude, -170.) + self.assertEqual(nw.longitude, -170.) with self.subTest("Maximum latitude"): - self.assertEqual(ne.latitude, 30.) + self.assertEqual(nw.latitude, 30.) with self.subTest("Maximum longitude"): - self.assertEqual(ne.longitude, 40.) + self.assertEqual(se.longitude, 40.) def test_mean_point(self): mp = self.p.mean_point diff --git a/test/test_geocaching.py b/test/test_geocaching.py index 4ee5108..89da716 100644 --- a/test/test_geocaching.py +++ b/test/test_geocaching.py @@ -12,7 +12,8 @@ import pycaching from pycaching import Cache, Geocaching, Point, Rectangle -from pycaching.errors import NotLoggedInException, LoginFailedException, PMOnlyException +from pycaching.errors import NotLoggedInException, LoginFailedException, PMOnlyException, TooManyRequestsError +from pycaching.geocaching import SortOrder from . import username as _username, password as _password, NetworkedTest @@ -108,6 +109,90 @@ def test__try_getting_cache_from_guid(self): self.assertEqual("Nidda: jenseits der Rennstrecke Reloaded", cache_pm.name) +class TestAPIMethods(NetworkedTest): + def test_search_rect(self): + """Perform search by rect and check found caches.""" + rect = Rectangle(Point(49.73, 13.38), Point(49.74, 13.39)) + + expected = {'GC1TYYG', 'GC11PRW', 'GC7JRR5', 'GC161KR', 'GC1GW54', 'GC7KDWE', 'GC8D303'} + + orig_wait_for = TooManyRequestsError.wait_for + with self.recorder.use_cassette('geocaching_search_rect') as vcr: + with patch.object(TooManyRequestsError, 'wait_for', autospec=True) as wait_for: + wait_for.side_effect = orig_wait_for if vcr.current_cassette.is_recording() else None + with self.subTest("default use"): + caches = self.gc.search_rect(rect) + waypoints = {cache.wp for cache in caches} + + self.assertSetEqual(waypoints, expected) + + with self.subTest("sort by distance"): + with self.assertRaises(AssertionError): + caches = list(self.gc.search_rect(rect, sort_by='distance')) + + origin = Point.from_string('N 49° 44.230 E 013° 22.858') + + caches = list(self.gc.search_rect(rect, sort_by=SortOrder.distance, origin=origin)) + + waypoints = [cache.wp for cache in caches] + self.assertEqual(waypoints, [ + 'GC11PRW', 'GC1TYYG', 'GC7JRR5', 'GC1GW54', 'GC161KR', 'GC7KDWE', 'GC8D303' + ]) + + # Check if caches are sorted by distance to origin + distances = [great_circle(cache.location, origin).meters for cache in caches] + self.assertEqual(distances, sorted(distances)) + + with self.subTest("sort by different criteria"): + for sort_by in SortOrder: + if sort_by is SortOrder.distance: + continue + caches = self.gc.search_rect(rect, sort_by=sort_by) + waypoints = {cache.wp for cache in caches} + self.assertSetEqual(waypoints, expected) + + def test_recover_from_rate_limit(self): + """Test recovering from API rate limit exception.""" + rect = Rectangle(Point(50.74, 13.38), Point(49.73, 14.40)) # large rectangle + + with self.recorder.use_cassette('geocaching_api_rate_limit') as vcr: + orig_wait_for = TooManyRequestsError.wait_for + + with patch.object(TooManyRequestsError, 'wait_for', autospec=True) as wait_for: + # If we are recording, we must perform real wait, otherwise we skip waiting + wait_for.side_effect = orig_wait_for if vcr.current_cassette.is_recording() else None + + for i, _cache in enumerate(self.gc.search_rect(rect, per_query=1)): + if wait_for.called: + self.assertEqual(wait_for.call_count, 1) + break + + if i > 20: # rate limit should be released after ~10 requests + self.fail("API Rate Limit not released") + + def test_recover_from_rate_limit_without_sleep(self): + """Test recovering from API rate limit exception without sleep.""" + rect = Rectangle(Point(50.74, 13.38), Point(49.73, 14.40)) + + with self.recorder.use_cassette('geocaching_api_rate_limit_with_none') as vcr: + with patch.object(TooManyRequestsError, 'wait_for', autospec=True) as wait_for: + caches = self.gc.search_rect(rect, per_query=1, wait_sleep=False) + for i, cache in enumerate(caches): + if cache is None: + import time + while cache is None: + if vcr.current_cassette.is_recording(): + time.sleep(10) + cache = next(caches) + self.assertIsInstance(cache, Cache) + break + + if i > 20: + self.fail("API Rate Limit not released") + + self.assertEqual(wait_for.call_count, 0) + + class TestLoginOperations(NetworkedTest): def setUp(self): super().setUp()