gotsunami / mangopay2-go-sdk

A Go library for the MangoPay HTTP REST api v2
MIT License
10 stars 14 forks source link

Feature request: How to add query params #6

Open javiermanzano opened 8 years ago

javiermanzano commented 8 years ago

I've been working with your SDK and I haven't found anything about adding query params to the requests.

I'm talking about this: https://docs.mangopay.com/api-references/sort-lists/

Is there any way to add those query params?

aboutofpluto commented 8 years ago

Hello Javier,

There is no explicit way to add parameters to a request right now. It could be added as an optional parameter to request() and anyRequest() defined in service.go:121 and service.go:247. As a list or url.Values.

Is it what you'd like to do?

Best regards Anthony

aboutofpluto commented 8 years ago

Hi,

I have worked on a new branch to make filters and sorts available.

https://github.com/gotsunami/mangopay2-go-sdk/tree/filter-sort

For now, only Tranfers() works with extra params. Can you give it a try? Explanations are in filter.go.

If it works OK, I'll rebuild the doc and add filters and sorts to other methods.

Regards, Anthony