iex-ruby-client icon indicating copy to clipboard operation
iex-ruby-client copied to clipboard

Add Search endpoint

Open pmn4 opened this issue 6 years ago • 7 comments

This PR adds the "Search" endpoint. Search doesn't quite fit the Resourceful pattern, so I put the tests in client_spec.rb. Happy to move them if you'd prefer them to be in their own file (I just felt strange because there is no resource to use in describe <Resource>).

I also added a new Error class, and to allow for better rescuing, created an error superclass for the gem. Also happy to revert if it doesn't feel right.

pmn4 avatar Nov 27 '19 16:11 pmn4

1 Warning
:warning: [DEPRECATION] check is deprecated. Please use check! instead.

Generated by :no_entry_sign: Danger

dangerpr-bot avatar Nov 27 '19 16:11 dangerpr-bot

The code here looks good. You still need to remove your actual secret token from everywhere!

dblock avatar Jan 06 '20 18:01 dblock

Also add a comment when this is ready to re-review, commits don't get flagged in notifications.

dblock avatar Jan 06 '20 18:01 dblock

Bump @pmn4, want to finish this?

dblock avatar Feb 01 '20 22:02 dblock

@dblock there are a few items here:

  1. Resource Type: I introduced some confusion with the search results "Resource Type." IEX has not yet launched this feature, so there is nothing to support, or even details about how to support it. The documentation says it's coming, so I left a comment mentioning that it is coming.

  2. Tokens: the token in this PR is copy/pasted from IEX's documentation (it is their sandbox API key). I used it because the search endpoint is a paid feature, for which I do not have an API key. Instead, for this one test case, I updated both the endpoint and API key to point to the sandbox environment, so if we need to recreate the VCR response, we can without having to pay.

do these make sense? sorry for the confusion, and the delay! (tbh, I was only evaluating IEX when I authored this PR, and have since switched gears to another provider.)

pmn4 avatar Feb 03 '20 21:02 pmn4

@dblock there are a few items here:

  1. Resource Type: I introduced some confusion with the search results "Resource Type." IEX has not yet launched this feature, so there is nothing to support, or even details about how to support it. The documentation says it's coming, so I left a comment mentioning that it is coming.

ok

  1. Tokens: the token in this PR is copy/pasted from IEX's documentation (it is their sandbox API key). I used it because the search endpoint is a paid feature, for which I do not have an API key. Instead, for this one test case, I updated both the endpoint and API key to point to the sandbox environment, so if we need to recreate the VCR response, we can without having to pay.

you just don't want the real token in this PR because someone will steal it; once a recording was made you can just replace it with a placeholder

dblock avatar Feb 04 '20 14:02 dblock

do these make sense? sorry for the confusion, and the delay! (tbh, I was only evaluating IEX when I authored this PR, and have since switched gears to another provider.)

I'll leave this open for someone/you to finish it.

dblock avatar Feb 04 '20 14:02 dblock