SlideShare ist ein Scribd-Unternehmen logo
1 von 56
Downloaden Sie, um offline zu lesen
HTTP/1.1 201 Created
Allow: POST, OPTIONS
Connection: keep-alive
Content-Type: application/json
Date: Tue, 21 Jun 2016 05:42:44 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Frame-Options: SAMEORIGIN
transfer-encoding: chunked
[
{
"callid": "a4963d84-1a9c-4fc7-9ac0-a9dc582168e9"
}
]
import requests
payload = {
'message': "Hello from Xoxzo",
'recipient': "+818012345678",
'sender': "818011112222"
}
req_res = requests.post(
"https://api.xoxzo.com/sms/messages/",
data=payload,
auth=("xxx", "yyy"))
xc = XoxzoClient(sid=“xxx",
auth_token="yyy")
result = xc.send_sms(
message = "Hello from Xoxzo",
recipient = "+818012345678",
sender = "818011112222")
import os
from slackbot.bot import respond_to, listen_to
from xoxzo.cloudpy import XoxzoClient
sid = os.environ.get("XOXZO_API_SID")
auth_token = os.environ.get("XOXZO_API_AUTH_TOKEN")
@listen_to('(.*) (.*) ')
def hello(message, phonnum, msg):
message.reply('%s %s ' % (phonnum, msg))
xc = XoxzoClient(sid=sid, auth_token=auth_token)
result = xc.call_tts_playback(
tts_message=msg,
tts_lang='ja',
recipient="+81" + phonnum[1:],
caller="+815012345678")
初心者のためのPythonによるWebAPI活用方入門
初心者のためのPythonによるWebAPI活用方入門
初心者のためのPythonによるWebAPI活用方入門
初心者のためのPythonによるWebAPI活用方入門
初心者のためのPythonによるWebAPI活用方入門
初心者のためのPythonによるWebAPI活用方入門
初心者のためのPythonによるWebAPI活用方入門
初心者のためのPythonによるWebAPI活用方入門
初心者のためのPythonによるWebAPI活用方入門
初心者のためのPythonによるWebAPI活用方入門
初心者のためのPythonによるWebAPI活用方入門

Weitere ähnliche Inhalte

Was ist angesagt?

Working with web_services
Working with web_servicesWorking with web_services
Working with web_services
Lorna Mitchell
 
log_client.txt
log_client.txtlog_client.txt
log_client.txt
sptlove2
 

Was ist angesagt? (9)

Poodle
PoodlePoodle
Poodle
 
You've Got Fail
You've Got FailYou've Got Fail
You've Got Fail
 
Concept of BlockChain & Decentralized Application
Concept of BlockChain & Decentralized ApplicationConcept of BlockChain & Decentralized Application
Concept of BlockChain & Decentralized Application
 
Working with web_services
Working with web_servicesWorking with web_services
Working with web_services
 
Ethernet Shield
Ethernet ShieldEthernet Shield
Ethernet Shield
 
Asynchronous PHP and Real-time Messaging
Asynchronous PHP and Real-time MessagingAsynchronous PHP and Real-time Messaging
Asynchronous PHP and Real-time Messaging
 
Bartosz Zaczyński (Grand Parade Poland) - WebSocket for Dummies
Bartosz Zaczyński (Grand Parade Poland) - WebSocket for DummiesBartosz Zaczyński (Grand Parade Poland) - WebSocket for Dummies
Bartosz Zaczyński (Grand Parade Poland) - WebSocket for Dummies
 
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...
 
log_client.txt
log_client.txtlog_client.txt
log_client.txt
 

Mehr von Xoxzo Inc.

Mehr von Xoxzo Inc. (18)

人間のためのpython #stapy68 2021-04-14
人間のためのpython #stapy68 2021-04-14人間のためのpython #stapy68 2021-04-14
人間のためのpython #stapy68 2021-04-14
 
Goto statement considered harmful - LearnDay@Xoxzo #17
Goto statement considered harmful - LearnDay@Xoxzo #17Goto statement considered harmful - LearnDay@Xoxzo #17
Goto statement considered harmful - LearnDay@Xoxzo #17
 
A very short history on drunkenness - LearnDay@Xoxzo #14
A very short history on drunkenness - LearnDay@Xoxzo #14A very short history on drunkenness - LearnDay@Xoxzo #14
A very short history on drunkenness - LearnDay@Xoxzo #14
 
PyCon JP 2019 LT - 「ありがとう」と言おう
PyCon JP 2019 LT - 「ありがとう」と言おうPyCon JP 2019 LT - 「ありがとう」と言おう
PyCon JP 2019 LT - 「ありがとう」と言おう
 
USB Hacking - LearnDay@Xoxzo #11
USB Hacking -  LearnDay@Xoxzo #11USB Hacking -  LearnDay@Xoxzo #11
USB Hacking - LearnDay@Xoxzo #11
 
How to run a design sprint - LearnDay@Xoxzo #9
How to run a design sprint - LearnDay@Xoxzo #9How to run a design sprint - LearnDay@Xoxzo #9
How to run a design sprint - LearnDay@Xoxzo #9
 
Lightning Talk: PyCon Thailand 2019
Lightning Talk: PyCon Thailand 2019Lightning Talk: PyCon Thailand 2019
Lightning Talk: PyCon Thailand 2019
 
The Culture Map - LearnDay@Xoxzo #8
The Culture Map - LearnDay@Xoxzo #8The Culture Map - LearnDay@Xoxzo #8
The Culture Map - LearnDay@Xoxzo #8
 
Linear algebra power of abstraction - LearnDay@Xoxzo #5
Linear algebra power of abstraction - LearnDay@Xoxzo #5Linear algebra power of abstraction - LearnDay@Xoxzo #5
Linear algebra power of abstraction - LearnDay@Xoxzo #5
 
The Takumi Method - LearnDay@Xoxzo #1
The Takumi Method - LearnDay@Xoxzo #1The Takumi Method - LearnDay@Xoxzo #1
The Takumi Method - LearnDay@Xoxzo #1
 
Django osc2018-okinawa
Django osc2018-okinawaDjango osc2018-okinawa
Django osc2018-okinawa
 
Working in a Fully Remote Organization: Challenges and How We Made it Work - ...
Working in a Fully Remote Organization: Challenges and How We Made it Work - ...Working in a Fully Remote Organization: Challenges and How We Made it Work - ...
Working in a Fully Remote Organization: Challenges and How We Made it Work - ...
 
JomLaunch 5.0 Sep 2017 by Iqbal Abdullah
JomLaunch 5.0 Sep 2017 by Iqbal AbdullahJomLaunch 5.0 Sep 2017 by Iqbal Abdullah
JomLaunch 5.0 Sep 2017 by Iqbal Abdullah
 
Introduction to Data Analysis
Introduction to Data AnalysisIntroduction to Data Analysis
Introduction to Data Analysis
 
djangoのmigrationはどう動いているか
djangoのmigrationはどう動いているかdjangoのmigrationはどう動いているか
djangoのmigrationはどう動いているか
 
PyCon APAC 2017
PyCon APAC 2017PyCon APAC 2017
PyCon APAC 2017
 
Pythonの隠れた武器
Pythonの隠れた武器Pythonの隠れた武器
Pythonの隠れた武器
 
The Secret Weapon Of Python
The Secret Weapon Of PythonThe Secret Weapon Of Python
The Secret Weapon Of Python
 

Kürzlich hochgeladen

一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
F
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Monica Sydney
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
F
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
ydyuyu
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
ydyuyu
 

Kürzlich hochgeladen (20)

一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girls
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
 

初心者のためのPythonによるWebAPI活用方入門

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29. HTTP/1.1 201 Created Allow: POST, OPTIONS Connection: keep-alive Content-Type: application/json Date: Tue, 21 Jun 2016 05:42:44 GMT Server: Apache/2.4.7 (Ubuntu) X-Frame-Options: SAMEORIGIN transfer-encoding: chunked [ { "callid": "a4963d84-1a9c-4fc7-9ac0-a9dc582168e9" } ]
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. import requests payload = { 'message': "Hello from Xoxzo", 'recipient': "+818012345678", 'sender': "818011112222" } req_res = requests.post( "https://api.xoxzo.com/sms/messages/", data=payload, auth=("xxx", "yyy"))
  • 42.
  • 43.
  • 44. xc = XoxzoClient(sid=“xxx", auth_token="yyy") result = xc.send_sms( message = "Hello from Xoxzo", recipient = "+818012345678", sender = "818011112222")
  • 45. import os from slackbot.bot import respond_to, listen_to from xoxzo.cloudpy import XoxzoClient sid = os.environ.get("XOXZO_API_SID") auth_token = os.environ.get("XOXZO_API_AUTH_TOKEN") @listen_to('(.*) (.*) ') def hello(message, phonnum, msg): message.reply('%s %s ' % (phonnum, msg)) xc = XoxzoClient(sid=sid, auth_token=auth_token) result = xc.call_tts_playback( tts_message=msg, tts_lang='ja', recipient="+81" + phonnum[1:], caller="+815012345678")