SoulSDK
Initialization
import SoulSDK from 'soul-sdk';
const soul = new SoulSDK({
app: {
name: "Soul app",
version: "1.0.0",
},
apiKey: "875f655d5f2f3a418d97c31000867b4744f6971d9f7f41ffac595affc4738dc8",
apiHost: "api.soulplatform.com",
apiDiscoveryHost: "api-discovery.soulplatform.com",
centrifugoWsHost: "x-soulplatform.com",
goddessApiHost: "goddess.soulplatform.com",
chats: {
chatWsHost: "chats.soulplatform.com",
},
deviceInfo: "OS X 10.13.6 64-bit MacIntel Chrome 74.0.3729.169; ru-RU",
sessionRecovery: true,
requestMetadata: false,
anonymousUserServiceKey: "j97c31000867b4744f6971d9f7f41ffac595affc4738dc8",
sendAmplitudeEvent: () => {},
testing: false,
});
Soul SDK modules:
-
soul.registration - signUp, acquire new users!
-
soul.auth - signIn, retention is important for viral grow
-
soul.me - manage user profile and access user products
-
soul.media - create albums, upload photos
-
soul.users - interact with other users (like, ban, etc.)
-
soul.chats - send text, photos, locations
-
soul.purchases - monetize your app
-
soul.events - subscribe and notify user about happened events
-
soul.system - set up notification tokens, and send push notification
documentation
autogenerated jsdoc documentation(run and open localhost:5000)
npm run generateDocumentation
For developers
compilation
compile all files in ES5(for compatibility with old nodejs version in folder /lib
)
npm run compile
compile web distributive(ES5, full version with sourcemap soul.js
and and minified version soul.min.js
in folder /dist
)
npm run compileWeb
testing
Test documentation
security
Dependencies vulnerability check
npm run checkSecurityNsp
npm run checkSecurityRetire
npm run checkOutdated