william-reed / GroupMe-Bots-With-Google-Apps-Script

A bunch of examples / resources for using the GroupMe Bot API with Google Apps Script
40 stars 29 forks source link

Yahoo Finance API no longer accepting RESTful requests #9

Closed william-reed closed 7 years ago

william-reed commented 7 years ago

Yahoo Finance API is no longer accepting RESTful requests. Needs to be replaced. See the comments of this commit for more information

william-reed commented 7 years ago

@MlchaeI @SirJohnBear It should be simple to change. Just need to settle on which API to use, change the request link that the bot is using to reflect the new API's URL, and change how we extract data from the API's response since it will not be in the same JSON format as the yahoo one.

william-reed commented 7 years ago

If the bot is just displaying price and the name pretty much any api can be used. If other features are desired an API needs to be found which supports them

MlchaeI commented 7 years ago

Will the previous API you used work? How come you switched to the Yahoo one?

william-reed commented 7 years ago

@MlchaeI almost exactly a year ago, someone contacted me saying they were trying to switch the bot "to the yahoo finance API as it displays real time info on the current stock price." I wound up doing it for them for that reason.

I think that is a valid point of the succeeding API - that it is realtime

william-reed commented 7 years ago

@MlchaeI @SirJohnBear Ok I just submitted a new commit with the new API - tried it with alpha vantage. Give it a go and I can resolve this issue

SirJohnBear commented 7 years ago

Works perfectly @wreed12345 ! Thanks so much!

I tried editing it before hand but seemed to have gotten errors with selecting the fields I wanted from the json reply. Thanks again!

Just an FYI, I'd suggest putting a comment in your code telling people to get their own API key as I can see them limiting your usage if people simply copy the API key you have.

william-reed commented 7 years ago

Good idea. I will try and look at the limits on each API key and then post a comment if it is in fact limited

william-reed commented 7 years ago

@SirJohnBear on the site it says: "While we are proud to provide free API service with no daily/weekly/monthly call limits, we recommend that API call frequency does not extend far beyond ~100 calls per minute so that we could deliver the optimal server-side performance."

I will add a comment anyway but it shouldnt be a problem anyhow