Something went wrong. Try again later

elchiconube

This user has not updated recently.

6 0 0 1
Forum Posts Wiki Points Following Followers

elchiconube's forum posts

Avatar image for elchiconube
elchiconube

6

Forum Posts

0

Wiki Points

1

Followers

Reviews: 0

User Lists: 0

Hi! I have one more question about this. How about to filter games that names starts with 'gta' is it possible? Thanks!

Avatar image for elchiconube
elchiconube

6

Forum Posts

0

Wiki Points

1

Followers

Reviews: 0

User Lists: 0

Ok I fix it! I try with other plugin called mithril:

mithril.jsonp({

url: "http://www.giantbomb.com/api/games/?api_key=KEY&format=jsonp&filter=name,image,platforms,description,original_release_date",

callbackKey: "json_callback",

})

.then(function(response) {

console.log(response)

})

thanks for your patience

Avatar image for elchiconube
elchiconube

6

Forum Posts

0

Wiki Points

1

Followers

Reviews: 0

User Lists: 0

Hi again,

I see that axios doesn't suport jsonp and now I'm trying with this:

jsonp('http://www.giantbomb.com/api/game/3030-4725/?api_key=KEY&format=jsonp&json_callback=?', function(err, data){

if (err) {

return console.error(err.message);

} else {

return console.log(data);

}

});

Then I have this error in the console: Uncaught SyntaxError: Unexpected token ?

Thanks for your help!

Avatar image for elchiconube
elchiconube

6

Forum Posts

0

Wiki Points

1

Followers

Reviews: 0

User Lists: 0

@monkehhh:Hi, thanks for the reply, I try to understand these two threads and change the url to this:

http://www.giantbomb.com/api/game/3030-4725/?api_key=KEY&format=jsonp&json_callback=?&field_list=genres,name  Any idea?
Avatar image for elchiconube
elchiconube

6

Forum Posts

0

Wiki Points

1

Followers

Reviews: 0

User Lists: 0

#5  Edited By elchiconube

Hi guys I'm trying to create a little app with VueJS and I want to use this API. For this purpose I'm using axios library but I'm having problems: This is the function:

axios.get('http://www.giantbomb.com/api/game/3030-4725/?api_key=KEY&format=json&field_list=genres,name') .then(function(response){ console.log(response); }) .catch(function(error){ console.log(error); }) 

And I have this error in the console:

XMLHttpRequest cannot load '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.

Thanks guys!