+@when(u'sending (?P<fmt>\S+ )?details query for (?P<query>.*)')
+def website_details_request(context, fmt, query):
+ params = {}
+ if query[0] in 'NWR':
+ params['osmtype'] = query[0]
+ params['osmid'] = query[1:]
+ else:
+ params['place_id'] = query
+ outp, status = send_api_query('details', params, fmt, context)
+
+ context.response = DetailsResponse(outp, 'html', status)
+
+@when(u'sending (?P<fmt>\S+ )?lookup query for (?P<query>.*)')
+def website_lookup_request(context, fmt, query):
+ params = { 'osm_ids' : query }
+ outp, status = send_api_query('lookup', params, fmt, context)
+
+ if fmt == 'json ':
+ outfmt = 'json'
+ else:
+ outfmt = 'xml'
+
+ context.response = SearchResponse(outp, outfmt, status)