bettiolo / oauth-signature-js

JavaScript OAuth 1.0a signature generator (RFC 5849) for node and the browser
https://www.npmjs.com/package/oauth-signature
BSD 3-Clause "New" or "Revised" License
232 stars 71 forks source link

Using with woocommerce #33

Open steffanhalv opened 7 years ago

steffanhalv commented 7 years ago

Please see this stackoverflow post.

DeLonge commented 7 years ago

hi, I have some problem. https://woocommerce.github.io/woocommerce-rest-api-docs/?shell#list-all-products in woocommerce, there are parameter filter. that executed like this for example: filter[orderby]=meta_value_num

how can I input that parameter? var parameter = { filter[orderby]: 'meta_value_num', order: 'asc', oauth_consumer_key: 'ck_key', oauth_signature_method: 'HMAC-SHA1', oauth_timestamp: timestamp, oauth_nonce: nonce, oauth_version : '1.0' }; that can't be possible right? So how to do that? Thanks

bettiolo commented 7 years ago

@DeLonge This is not a valid syntax:

{
  filter[orderby]: 'meta_value_num',
}

I cannot help you with specific examples for woocommerce.

You need to consider that the parameter object needs to be serialisable to a query string (?foo=bar&baz=qux), so you will need to understand what kind of encoding you need to get woocommerce to handle complex object encoding.