2 ms·
What are you working on? I'm interested in Rust projects, especially web ones.
by echelon 8y ago
What are you working on? I'm interested in Rust projects, especially web ones.
- swsieber 8y agoIntegrating SMS (Twilio/Plivo) with Google Spreadsheets for Budgeting purposes. Basically allows people with custom budgets to get an easier form of transaction recording. I had been using warp, but I wanted to write a custom middleware for some session / cookie management, but ran into trouble, so I moved to actix-web. The google api crates also didn't seem to compile/work right for me, so that's why I wrote a custom derive. Basically, it allows you to define a struct that represents an endpoint, and you can just mark what get's included in the query, body, or in the url with some nice interpolation. And then I defined a endpoint processor that can take that and execute it, deserializing it. I implemented that for the reqwest client and for one of my custom structs, a google api token. Here's an example of what a marked up struct looks like: https://gist.github.com/samsieber/d2efec774320c0af01ee72cb0958c9a3 https://gist.github.com/samsieber/d2efec774320c0af01ee72cb09... . It's a little rough around the edges, but I think by the time I'm done it'll have acquired enough polish to release it on crates.io - it's been super useful to eliminate a lot of the fiddliness I had been doing with making requests.