SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Downloaden Sie, um offline zu lesen
DIUIT API
RICH MESSAGING API BUILT FOR EVERY APP
Created by /Momo Lee @zxcvbnius
在開始介紹之前
before we start to explore diuit api
大家可以想像一下
you can imagine that
NO LIMIT
HOW TO FIND EACH OTHER
HOW TO DO FILE TRANSFERRING WITHOUT SERVER
BUILDING HTTP SERVICE IN YOUR APP
resuming transfer
custom security
file live streaming
curl -X GET 
-H "range: 1200-" 
http://127.0.0.1:8080/v1/transfer
DEMO
file live streaming
A REQUEST IS LIKE A COMMAND
https://127.0.0.1/{dosomething}
3-WAY HANDSHAKE PROBLEM
想一個情況,當你打SKYPE給朋友
我: Hi, 有沒有聽到聲音?[SYN]
某: 有,那我呢?有沒有聽到聲音[SYN, ACK]
我: 有唷~[ACK]
CHAT API
WebSocket bidirectional, full-duplex communication
+ Node.jsSocket.io
REAL-TIME COMMUNICATION
DEMO
login , listing all chat room and sending text message
AUTHENTICATING USER
Authenticate User On Your Account Server
Obtaining Authentication Nonce
Generate JWT Token
Login to Messaging Server
curl -X GET 
-H "x-diuit-application-id: ${DIUIT_APP_ID}" 
-H "x-diuit-api-key: ${DIUIT_APP_KEY}" 
https://api.diuit.net/1/auth/nonce
curl -X POST 
-H "x-diuit-application-id: ${DIUIT_APP_ID}" 
-H "x-diuit-api-key: ${DIUIT_APP_KEY}" 
-H "Content-Type: application/json" 
-d '{"authToken":${JWT_TOKEN}, "deviceId": ${DEVICE_ID}, "platform": ${PUS
https://api.diuit.net/1/auth/login
LOGIN
DiuitMessagingAPI.loginWithAuthToken(new DiuitCallback<JSONObject>()
{
@Override
public void onSuccess(final JSONObject result)
{
// get session
// put your code
}
@Override
public void onFailure(final int code, final JSONObject result)
{
// put your code
}
}, authToken);
LIST CHAT ROOM
DiuitMessagingAPI.listChats(new DiuitCallback<ArrayList<DiuitChat>>()
{
@Override
public void onSuccess(final ArrayList<DiuitChat> chats)
{
// if success, return chatArrayList
}
@Override
public void onFailure(final int code, final JSONObject resultObj)
{
// if failure, it will return error code and result
}
});
SEND MESSAGE
chat.sendText (String text, ...);
chat.sendImage(Image image, ...);
chat.sendFile (File file, ...);
API DOCUMENT
http://api.diuit.com
SAMPLE CODE
https://github.com/diuitAPI
實作
如何20分鐘建立一個聊天API
今日目標
https://goo.gl/T1I5cI
REGISTER YOUR ACCOUNT
http://demo.diuit.net/v1/users/register
LOGIN
http://demo.diuit.net/v1/users/login
CREATE A NEW ANDROID PROJECT
https://bintray.com/duolc/maven/com.duolc.diuitapi/view
LOGIN
JOIN CHAT ROOM
SEND TEXT MESSAGING
RECEIVING MESSAGING
Remember, if you register a receiving in a activity or a obj, you have to unregister before leaving this activity or
destroy this obj.
http://developer.diuit.com/register
THANKS FOR YOUR ATTENTION

Weitere ähnliche Inhalte

Ähnlich wie Diuit API Overview

Working Remotely (via SSH) Rocks!
Working Remotely (via SSH) Rocks!Working Remotely (via SSH) Rocks!
Working Remotely (via SSH) Rocks!Kent Chen
 
Hybrid Mobile Development and MobileFirst
Hybrid Mobile Development and MobileFirstHybrid Mobile Development and MobileFirst
Hybrid Mobile Development and MobileFirstRaymond Camden
 
Taking Docker to Dance: Continuous Delivery on AWS
Taking Docker to Dance: Continuous Delivery on AWSTaking Docker to Dance: Continuous Delivery on AWS
Taking Docker to Dance: Continuous Delivery on AWSJessie Yi Wei
 
Stups.io - an Open Source Cloud Framework for AWS
Stups.io - an Open Source Cloud Framework for AWSStups.io - an Open Source Cloud Framework for AWS
Stups.io - an Open Source Cloud Framework for AWSJan Löffler
 
Twilio Voice Applications with Amazon AWS S3 and EC2
Twilio Voice Applications with Amazon AWS S3 and EC2Twilio Voice Applications with Amazon AWS S3 and EC2
Twilio Voice Applications with Amazon AWS S3 and EC2Twilio Inc
 
STUPS by Zalando @WHD.local Frankfurt: STUPS.io - an Open Source Cloud Framew...
STUPS by Zalando @WHD.local Frankfurt: STUPS.io - an Open Source Cloud Framew...STUPS by Zalando @WHD.local Frankfurt: STUPS.io - an Open Source Cloud Framew...
STUPS by Zalando @WHD.local Frankfurt: STUPS.io - an Open Source Cloud Framew...Henning Jacobs
 
Avoiding damage, shame and regrets data protection for mobile client-server a...
Avoiding damage, shame and regrets data protection for mobile client-server a...Avoiding damage, shame and regrets data protection for mobile client-server a...
Avoiding damage, shame and regrets data protection for mobile client-server a...Stanfy
 
Drive By Downloads: How To Avoid Getting a Cap Popped in Your App
Drive By Downloads:  How To Avoid Getting a Cap Popped in Your App Drive By Downloads:  How To Avoid Getting a Cap Popped in Your App
Drive By Downloads: How To Avoid Getting a Cap Popped in Your App Cenzic
 
Front-end. Global domination
Front-end. Global dominationFront-end. Global domination
Front-end. Global dominationStfalcon Meetups
 
Functional legacy - how to incorporate ZIO in your legacy services
Functional legacy - how to incorporate ZIO in your legacy servicesFunctional legacy - how to incorporate ZIO in your legacy services
Functional legacy - how to incorporate ZIO in your legacy servicesNatan Silnitsky
 
IBM Bluemix™ Architecture & Deep Dive
IBM Bluemix™ Architecture & Deep DiveIBM Bluemix™ Architecture & Deep Dive
IBM Bluemix™ Architecture & Deep DiveIBM
 
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...André Goliath
 
Containerizing your Security Operations Center
Containerizing your Security Operations CenterContainerizing your Security Operations Center
Containerizing your Security Operations CenterJimmy Mesta
 
FATC UK - Real time collaborative Flex apps
FATC UK - Real time collaborative Flex appsFATC UK - Real time collaborative Flex apps
FATC UK - Real time collaborative Flex appsMichael Chaize
 
Serverless Computing, AWS Way by SourceFuse Technologies
Serverless Computing, AWS Way by SourceFuse Technologies Serverless Computing, AWS Way by SourceFuse Technologies
Serverless Computing, AWS Way by SourceFuse Technologies SourceFuse
 
Serverless Computing, AWS Way: SourceFuse Technologies
Serverless Computing, AWS Way: SourceFuse Technologies Serverless Computing, AWS Way: SourceFuse Technologies
Serverless Computing, AWS Way: SourceFuse Technologies Sarmishtha Sinha
 
AWS Customer Presentation - Twilio
AWS Customer Presentation - TwilioAWS Customer Presentation - Twilio
AWS Customer Presentation - TwilioAmazon Web Services
 

Ähnlich wie Diuit API Overview (20)

Working Remotely (via SSH) Rocks!
Working Remotely (via SSH) Rocks!Working Remotely (via SSH) Rocks!
Working Remotely (via SSH) Rocks!
 
Hybrid Mobile Development and MobileFirst
Hybrid Mobile Development and MobileFirstHybrid Mobile Development and MobileFirst
Hybrid Mobile Development and MobileFirst
 
Taking Docker to Dance: Continuous Delivery on AWS
Taking Docker to Dance: Continuous Delivery on AWSTaking Docker to Dance: Continuous Delivery on AWS
Taking Docker to Dance: Continuous Delivery on AWS
 
Stups.io - an Open Source Cloud Framework for AWS
Stups.io - an Open Source Cloud Framework for AWSStups.io - an Open Source Cloud Framework for AWS
Stups.io - an Open Source Cloud Framework for AWS
 
Twilio Voice Applications with Amazon AWS S3 and EC2
Twilio Voice Applications with Amazon AWS S3 and EC2Twilio Voice Applications with Amazon AWS S3 and EC2
Twilio Voice Applications with Amazon AWS S3 and EC2
 
STUPS by Zalando @WHD.local Frankfurt: STUPS.io - an Open Source Cloud Framew...
STUPS by Zalando @WHD.local Frankfurt: STUPS.io - an Open Source Cloud Framew...STUPS by Zalando @WHD.local Frankfurt: STUPS.io - an Open Source Cloud Framew...
STUPS by Zalando @WHD.local Frankfurt: STUPS.io - an Open Source Cloud Framew...
 
Avoiding damage, shame and regrets data protection for mobile client-server a...
Avoiding damage, shame and regrets data protection for mobile client-server a...Avoiding damage, shame and regrets data protection for mobile client-server a...
Avoiding damage, shame and regrets data protection for mobile client-server a...
 
Drive By Downloads: How To Avoid Getting a Cap Popped in Your App
Drive By Downloads:  How To Avoid Getting a Cap Popped in Your App Drive By Downloads:  How To Avoid Getting a Cap Popped in Your App
Drive By Downloads: How To Avoid Getting a Cap Popped in Your App
 
Nano S O A
Nano S O ANano S O A
Nano S O A
 
Front-end. Global domination
Front-end. Global dominationFront-end. Global domination
Front-end. Global domination
 
Frontend. Global domination.
Frontend. Global domination.Frontend. Global domination.
Frontend. Global domination.
 
Functional legacy - how to incorporate ZIO in your legacy services
Functional legacy - how to incorporate ZIO in your legacy servicesFunctional legacy - how to incorporate ZIO in your legacy services
Functional legacy - how to incorporate ZIO in your legacy services
 
Web over 9000
Web over 9000Web over 9000
Web over 9000
 
IBM Bluemix™ Architecture & Deep Dive
IBM Bluemix™ Architecture & Deep DiveIBM Bluemix™ Architecture & Deep Dive
IBM Bluemix™ Architecture & Deep Dive
 
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
 
Containerizing your Security Operations Center
Containerizing your Security Operations CenterContainerizing your Security Operations Center
Containerizing your Security Operations Center
 
FATC UK - Real time collaborative Flex apps
FATC UK - Real time collaborative Flex appsFATC UK - Real time collaborative Flex apps
FATC UK - Real time collaborative Flex apps
 
Serverless Computing, AWS Way by SourceFuse Technologies
Serverless Computing, AWS Way by SourceFuse Technologies Serverless Computing, AWS Way by SourceFuse Technologies
Serverless Computing, AWS Way by SourceFuse Technologies
 
Serverless Computing, AWS Way: SourceFuse Technologies
Serverless Computing, AWS Way: SourceFuse Technologies Serverless Computing, AWS Way: SourceFuse Technologies
Serverless Computing, AWS Way: SourceFuse Technologies
 
AWS Customer Presentation - Twilio
AWS Customer Presentation - TwilioAWS Customer Presentation - Twilio
AWS Customer Presentation - Twilio
 

Kürzlich hochgeladen

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Kürzlich hochgeladen (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Diuit API Overview