Skip to content

api accepts url params and additional keyword args for requests module #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jan 15, 2019

Conversation

timjen3
Copy link
Contributor

@timjen3 timjen3 commented Jan 28, 2018

Currently the url params that are sent to Woo-Commerce are a closed box.
They should be exposed outside of the function. Additionally, there are
cases where a developer needs to pass additional parameters to the
requests library. These should also be exposed outside of the function.

I've been meaning to make a pull request for this. I have previously
sub-classed the woocommerce.api.API object in order to do this and
think it would be helpful to others who like me need to do more
complicated requests.

Currently the url params that are sent to Woo-Commerce are a closed box.
They should be exposed outside of the function. Additionally, there are
cases where a developer needs to pass additional parameters to the
requests library. These should also be exposed outside of the function.

This pull request simply achieves these things.
@timjen3
Copy link
Contributor Author

timjen3 commented Feb 1, 2018

I really like how simple this package is, so I don't know if it fits in with your vision... But would you be interested in adding a "getPaged" method to the API class? If so, I can make a pull request once we get this one sorted out.

@foresmac
Copy link

Fixes #37

@timjen3
Copy link
Contributor Author

timjen3 commented Apr 17, 2018

After opening this pull request originally I found out that the code would not work when extra params are used with OAuth. I updated the code just now to what should work from memory. Unfortunately I don't have access to a woo shop to test my work today. I can test this either this weekend or next.

@claudiosanches
Copy link
Contributor

Thanks for your help.

@claudiosanches claudiosanches merged commit 502b211 into woocommerce:master Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy