Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Endpoints with query parameters in string are broken #98

Open
matthewrankin opened this issue Dec 10, 2021 · 5 comments
Open

Endpoints with query parameters in string are broken #98

matthewrankin opened this issue Dec 10, 2021 · 5 comments

Comments

@matthewrankin
Copy link
Contributor

Endpoints made using a string containing a query parameter (e.g., "/stock/aapl/income/4?period=annual") are not working. The question mark is getting replaced with %3F prior to the endpoint being called.

@karagog
Copy link
Contributor

karagog commented Dec 10, 2021

I thought this was fixed in #95

I added a test for this in 64bcf08#diff-4dc56e64f310cd8c12bb00f75c09e83f5d875563ea9901788e525487dc6788b3R51

Is this a different issue?

@matthewrankin
Copy link
Contributor Author

There may be more methods that are broken, but right now I can confirm that the following are broken:

func (c Client) AnnualIncomeStatements(ctx context.Context, symbol string, num int) (IncomeStatements, error)
func (c Client) QuarterlyIncomeStatements(ctx context.Context, symbol string, num int) (IncomeStatements, error)

@karagog
Copy link
Contributor

karagog commented Dec 10, 2021

I wrote a unit test for annual income statements where I tried to reproduce this issue but I was unable (resulted in #101). It appears to be working for me. At any rate the PR refactors the code so it doesn't mix the endpoint and query params anymore, so if it was really an issue it should be gone after the PR is merged.

@matthewrankin
Copy link
Contributor Author

@karagog — Are the integration tests working for you?

@karagog
Copy link
Contributor

karagog commented Dec 10, 2021

I don't use them right now b/c I don't have a paid account yet. Eventually I will get one, but I've been able to do a lot of development without one so I'm putting it off as long as I can :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants