Browse Source

args -> options

pull/14/head
Luke Childs 8 years ago
parent
commit
98cbfa3bec
  1. 4
      src/index.js

4
src/index.js

@ -53,9 +53,9 @@ class Onionoo {
// Returns a function to make requests to a given endpoint // Returns a function to make requests to a given endpoint
createEndpointMethod (endpoint) { createEndpointMethod (endpoint) {
return args => { return options => {
// Build query string (don't encode ':' for search filters) // Build query string (don't encode ':' for search filters)
const qs = querystring.encode(args).replace(/%3A/g, ':') const qs = querystring.encode(options).replace(/%3A/g, ':')
// Build url // Build url
const url = `${this.options.baseUrl}/${endpoint}?${qs}` const url = `${this.options.baseUrl}/${endpoint}?${qs}`

Loading…
Cancel
Save