Permalink
Browse files

more docs

  • Loading branch information...
1 parent 52c4252 commit 936370e3e7141e3d2b7b90d68744c215bfff8f49 @squallstar squallstar committed Feb 17, 2017
Showing with 621 additions and 3 deletions.
  1. +13 −1 docs/API-Documentation.md
  2. +61 −0 docs/API/fliplet-communicate.md
  3. +471 −0 docs/API/fliplet-core.md
  4. +73 −0 docs/Best-practises.md
  5. +3 −2 docs/README.md
@@ -1,3 +1,15 @@
# API Documentation
-- Fliplet Core (`fliplet-core`)
+## Public JS APIs
+
+- [Fliplet Core](API/fliplet-core.md) (`fliplet-core`)
+- [Fliplet Communicate](API/fliplet-communicate.md) (`fliplet-communicate`)
+- [Fliplet Data Sources](API/fliplet-datasources.md) (`fliplet-datasources`)
+- [Fliplet Media](API/fliplet-media.md) (`fliplet-media`)
+- Fliplet Security
+
+# Private JS APIs
+
+- Fliplet Interact
+- Fliplet Menu
+- Fliplet Native
@@ -0,0 +1,61 @@
+# Fliplet Communicate JS APIs
+
+The `fliplet-communicate` package contains the following namespaces:
+
+- [Communicate](#communicate)
+
+---
+
+## Communicate
+
+### Send an email
+
+```js
+const options = {
+ to: [{
+ email: "john@example.org",
+ name: "John",
+ type: "to"
+ }],
+ html: "<p>Some HTML content</p>",
+ subject: "My subject"
+};
+
+Fliplet.Communicate.sendEmail(options);
+
+```
+
+### Send a SMS
+
+#### Default provider
+```js
+const options = {
+ data: {
+ to: "+123456789",
+ body: "Hey!"
+ }
+};
+
+Fliplet.Communicate.sendSMS(options);
+```
+
+##### Twilio
+```js
+const options = {
+ provider: "twilio"
+ data: {
+ from: "+123456789"
+ to: "+123456789",
+ body: "Hey!"
+ },
+ options: {
+ twilio_sid: 'AC81caaa94b3b84bb7ba9c3cd96bcb152a', // Your Account SID from www.twilio.com/console
+ twilio_auth_token: 'AUTH_TOKEN'; // Your Auth Token from www.twilio.com/console
+ }
+};
+
+Fliplet.Communicate.sendSMS(options);
+```
+
+Let us know if you want to use another SMS provider.
+We'll check if we can integrate it on our system.
Oops, something went wrong.

0 comments on commit 936370e

Please sign in to comment.