https://github.com/tobymurray/realtor-rs
Unofficial Rust client for Canadian Realtor site
https://github.com/tobymurray/realtor-rs
Last synced: 4 months ago
JSON representation
Unofficial Rust client for Canadian Realtor site
- Host: GitHub
- URL: https://github.com/tobymurray/realtor-rs
- Owner: tobymurray
- License: other
- Created: 2021-04-20T03:58:43.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-08T02:05:16.000Z (about 4 years ago)
- Last Synced: 2025-01-30T16:39:53.319Z (4 months ago)
- Language: Rust
- Size: 32.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license.md
Awesome Lists containing this project
README
An unofficial client for use with the Canadian Realtor site. Based off [Foren](https://github.com/Froren)'s [realtorca](https://github.com/Froren/realtorca) project.
_Note_: This cannot be used commercially in any capacity.
## Disclaimer
This is very much a work in progress. There are no stability promises nor any validation of functional correctness included.## What might be working
Filters:
- price range
- longitude range
- latitude range
- ownership type
- transaction typeMetadata:
- paging through results
- records per page (max of 200)## How to use
This provides syntactic sugar for building HTML form data specific to this one API. The output is `Vec<(&'static str, String)>`. This should be flexible enough to be consumed by any HTTP client, e.g. for [reqwest](https://lib.rs/crates/reqwest) it might look like:
```rust
use realtor_rs::realtor::filter::builder::FilterBuilder;
use reqwest::header::USER_AGENT;let client = reqwest::Client::new();
let request_builder = client
.post("https://api.realtor.ca/Listing.svc/PropertySearch_Post")
.form(&FilterBuilder::new().build())
.header(USER_AGENT, "realtor-rs v0.5.0")
.send();
```