Ported API client library from Mami and load colour presets through it as well.
This commit is contained in:
parent
83dc860904
commit
6870ee3959
9 changed files with 256 additions and 41 deletions
src/ami.js
|
@ -2,6 +2,7 @@
|
|||
#include cookies.js
|
||||
#include copyright.jsx
|
||||
#include emotes.jsx
|
||||
#include flashii.js
|
||||
#include messages.jsx
|
||||
#include notify.js
|
||||
#include reconnect.jsx
|
||||
|
@ -16,6 +17,9 @@
|
|||
var AmiContext = function(title, auth, loading) {
|
||||
var pub = {};
|
||||
|
||||
const flashii = new Flashii;
|
||||
pub.flashii = flashii;
|
||||
|
||||
var settings = new AmiSettings;
|
||||
pub.settings = settings;
|
||||
|
||||
|
@ -187,11 +191,12 @@ var AmiContext = function(title, auth, loading) {
|
|||
return;
|
||||
}
|
||||
|
||||
futami.getApiJson('/v1/emotes').success(emotes => {
|
||||
if(Array.isArray(emotes))
|
||||
emoticons.load(emotes);
|
||||
chat.emoticonList.render(emoticons);
|
||||
}).run();
|
||||
flashii.v1.emotes({ fields: ['url', 'strings', 'min_rank'] })
|
||||
.success(emotes => {
|
||||
if(Array.isArray(emotes))
|
||||
emoticons.load(emotes);
|
||||
chat.emoticonList.render(emoticons);
|
||||
}).run();
|
||||
});
|
||||
|
||||
var reconnecter = new AmiReconnecter(chat);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue