libninjacom / plaid-rs

Rust client library for Plaid, generated from Plaid's OpenAPI spec
https://docs.rs/plaid/
MIT License
11 stars 6 forks source link

transactions_sync doesn't accept cursor or count #2

Closed thomasmost closed 2 years ago

thomasmost commented 2 years ago

See my implementation here: https://github.com/Bend-Green/plaid-rs/blob/main/src/transactions.rs#L194-L211

kurtbuilds commented 2 years ago

Because these are optional parameters, they get applied with function chaining. Example:

client.transactions_sync("my-access-token")
    .count(500)
    .cursor("my_cursor".to_string())
    .send()
    .await

Let me know if that doesn't work or you encounter issues.

For devxp, I noticed that cursor still takes a String. Since you're using the API, I'm curious your opinion: is it easier to take a reference or owned type in that case? I notice your code takes an owned type.

thomasmost commented 2 years ago

ah!

kurtbuilds commented 2 years ago

This toolchain is relatively new, so I'm still ironing kinks out. Do you think that the cleanest way for this API to work, or would you make changes?

Does it make sense to close out #2, #1, and #3 at this point?

thomasmost commented 2 years ago

Yep, I'll close them.

kurtbuilds commented 2 years ago

Quick update, I added short documentation to each Request object, so that can hopefully serve as a pointer for other people who might have the same question.