MrSwitch / hello.js

A Javascript RESTFUL API library for connecting with OAuth2 services, such as Google+ API, Facebook Graph and Windows Live Connect
https://adodson.com/hello.js/
MIT License
4.64k stars 546 forks source link

yahoo api call issue #318

Closed sethdorris closed 8 years ago

sethdorris commented 8 years ago

I am using hellojs to try to authenticate with yahoo and pull down fantasy sports data from their YQL.

the REST API produced by yahoo is:

https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20fantasysports.leagues%20where%20league_key%3D'nfl.l.71159'&format=json&diagnostics=true&callback=abc

so using that API this is what my CODE looks like

hello('yahoo', ).api("https://query.yahooapis.com/v1/public/yql?    q=select%20*%20from%20weather.forecast%20where%20woeid%3D2502265&format=json&diagnostics=true&callback=abc")
    .then(function (data) {
        console.log("json", data);
    });

and when the code executes I get the following error

hello.all.min.js:3 Uncaught TypeError: Cannot read property 'options' of undefined

I think the resolution will be in the yahoo.js file and editing the base URL since the base URL is set to social and not query.yahooapis.com

MrSwitch commented 8 years ago

This is fixed in v1.8.4, thanks