Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
0
Members

call other API (js) in superpower typescript

A topic by reopucino created Jun 24, 2016 Views: 586 Replies: 2
Viewing posts 1 to 2

let say,
I want call script API from kongregate or gamejolt to push score in to their server. I'm don't know how to call that API, or how to put into my typescript.


any suggestion for me? or any resource can help me fix this problem?

(+1)

For exemple , to use Kongregate with your export project :

Put this link into the Index.html after export;

<script src='https://cdn1.kongregate.com/javascripts/kongregate_api.js'></script>

And in Superpowers, you can directly use :

declare let window;

let kongregate = window.kongregateAPI.getAPI();
kongregate.services.connect();

or

declare let window;

let kongregate = window["kongregateAPI"]["getAPI"]();
kongregate["services"]["connect"]();

wow thank's for reply.. i will try first :)