| 166 | return response |
| 167 | |
| 168 | async def get_similar( |
| 169 | self, *, listing_id: int, raw_response: bool = False |
| 170 | ) -> Union[Iterable[Listing], dict]: |
| 171 | parameters = f"/listings/{listing_id}/similar" |
| 172 | method = "GET" |
| 173 | |
| 174 | response = await self._request(method=method, parameters=parameters) |
| 175 | |
| 176 | if raw_response: |
| 177 | return response |
| 178 | |
| 179 | listings = [ |
| 180 | Listing(data=item) for item in response |
| 181 | ] |
| 182 | |
| 183 | return listings |
| 184 | |
| 185 | async def get_buy_orders( |
| 186 | self, *, listing_id: int, limit: int = 10, raw_response: bool = False |