File notes.txt deleted (index f9fffe0..0000000) |
1 |
|
1. |
|
2 |
|
|
|
3 |
|
curl -v -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/48.0.2564.116 Chrome/48.0.2564.116 Safari/537.36" -H 'Content-Type: application/json' -d '{"client_id":"imoji","username":"bitmojire@gdr.name","password":"test1234","grant_type":"password","client_secret":"secret"}' -X POST https://api.bitmoji.com/user/login |
|
4 |
|
|
|
5 |
|
{"token_type":"bearer","access_token":"d047eb95c06922fedfb88d24e6fd71dfeb164368"} |
|
6 |
|
|
|
7 |
|
2. |
|
8 |
|
|
|
9 |
|
Cookie: bitmoji_bsauth_token=d047eb95c06922fedfb88d24e6fd71dfeb164368 |
|
10 |
|
|
|
11 |
|
curl -v -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/48.0.2564.116 Chrome/48.0.2564.116 Safari/537.36" -H 'Content-Type: application/json' -H 'Cookie: bitmoji_bsauth_token=d047eb95c06922fedfb88d24e6fd71dfeb164368' https://api.bitmoji.com/content/templates |
|
12 |
|
|
|
13 |
|
3. |
|
14 |
|
|
|
15 |
|
curl -v -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/48.0.2564.116 Chrome/48.0.2564.116 Safari/537.36" -H 'Content-Type: application/json' -H 'Cookie: bitmoji_bsauth_token=d047eb95c06922fedfb88d24e6fd71dfeb164368' -H 'bitmoji-token: d047eb95c06922fedfb88d24e6fd71dfeb164368' https://api.bitmoji.com/user/avatar |
|
16 |
|
|
|
17 |
|
{"avatar_id":206259971,"avatar_version":1,"id":"206259971_1-s1","bsauth":true,"style":1,"gender":1,"id_hash":"d3J30xz"} |
|
18 |
|
|
|
19 |
|
ID mozna interpolowac w obrazkach z content/template! |
|
20 |
|
|
|
21 |
|
/ |
|
22 |
|
|
|
23 |
|
endpoints: { |
|
24 |
|
BITMOJI_API: "https://api.bitmoji.com/", |
|
25 |
|
BITMOJI_COM_URL: "https://www.bitmoji.com/account/", |
|
26 |
|
RENDERING_ENDPOINT: "https://render.bitstrips.com/", |
|
27 |
|
FORGOT_PASSWORD_ENDPOINT: "https://www.bitmoji.com/support/reset-password.html" |
|
28 |
|
}, |
|
29 |
|
options: { |
|
30 |
|
LANDING_TAB_AFTER_LOGIN: "popular" |
|
31 |
|
}, |
|
32 |
|
storage: { |
|
33 |
|
RECENTS_KEY: "recents" |
|
34 |
|
}, |
|
35 |
|
events: { |
|
36 |
|
RECENTS_CHANGED: "RECENTS_CHANGED", |
|
37 |
|
BITMOJIS_LOADED: "BITMOJIS_LOADED" |
|
38 |
|
}, |
|
39 |
|
|
|
40 |
|
v = "bitmoji", |
|
41 |
|
m = "ios", |
|
42 |
|
|
|
43 |
|
|
|
44 |
|
h = c.endpoints.BITMOJI_API + "user/login", |
|
45 |
|
p = c.endpoints.BITMOJI_API + "user", |
|
46 |
|
v = c.endpoints.BITMOJI_API + "user/exchange-tokens", |
|
47 |
|
|
|
48 |
|
/* LOGIN - get token - store as variable "e" */ |
|
49 |
|
function i(e, t) { |
|
50 |
|
return new Promise(function(n, r) { |
|
51 |
|
var i = { |
|
52 |
|
client_id: "imoji", |
|
53 |
|
username: e, |
|
54 |
|
password: t, |
|
55 |
|
grant_type: "password", |
|
56 |
|
client_secret: "secret" |
|
57 |
|
}; |
|
58 |
|
a.ajax({ |
|
59 |
|
url: h, |
|
60 |
|
method: "POST", |
|
61 |
|
dataType: "json", |
|
62 |
|
data: i, |
|
63 |
|
error: function(e) { |
|
64 |
|
try { |
|
65 |
|
e = JSON.parse(e.responseText) |
|
66 |
|
} catch (t) { |
|
67 |
|
e = { |
|
68 |
|
description: "Unexpected error." |
|
69 |
|
} |
|
70 |
|
} |
|
71 |
|
r(e.description) |
|
72 |
|
}, |
|
73 |
|
success: function(e) { |
|
74 |
|
return e.error ? void r(e.error) : (m = e.access_token, l.set(u.BITMOJI_BSAUTH_COOKIE, e.access_token), void n(e.access_token)) |
|
75 |
|
} |
|
76 |
|
}) |
|
77 |
|
}) |
|
78 |
|
} |
|