This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface Device : NSObject | |
/** Returns true if it is a iPhone/iPod with 4 inch tall screen */ | |
+(BOOL)isScreen4Inch; | |
@end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Hoiio developer credentials */ | |
$hoiioAppId = "YOUR_APP_ID_HERE"; | |
$hoiioAccessToken = "YOUR_ACCESS_TOKEN_HERE"; | |
$sendSmsURL = "https://secure.hoiio.com/open/sms/send"; | |
// User information: Query these from the db | |
$username = "test"; | |
$password = "password"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Hoiio developer credentials */ | |
$hoiioAppId = "YOUR_APP_ID_HERE"; | |
$hoiioAccessToken = "YOUR_ACCESS_TOKEN_HERE"; | |
$voiceCallURL = "https://secure.hoiio.com/open/voice/call"; | |
/* My Number */ | |
$callMyNumber = "+6511111111"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/************ | |
Program flow: | |
1. User enter booking details on web form. | |
2. Call out to user. | |
3. Read out booking details. | |
4. Ask user to confirm or cancel the booking. | |
5. Read out user's decision and hang up. | |
************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Hoiio Conference API</title> | |
</head> | |
<body style="font-family:arial,helvetica,sans-serif;font-size:13px;margin-top:20px;"> | |
<?php | |
// Developer information: appId, accessToken | |
$appId = "YOUR_APP_ID_HERE"; | |
$accessToken = "YOUR_ACCESS_TOKEN_HERE"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Instructions: | |
* In Hoiio Developer Portal under Hoiio Number section, configure the Forwarding URL to this script. | |
*/ | |
/* Hoiio developer credentials */ | |
$appId = "YOUR_APP_ID_HERE"; | |
$accessToken = "YOUR_ACCESS_TOKEN_HERE"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Check weather by phone | |
APIs used | |
- ivr/middle/gather | |
- ivr/middle/play | |
API Flow | |
1. <-- Incoming call to Hoiio number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Hoiio developer credentials */ | |
$hoiioAppId = "YOUR_APP_ID_HERE"; | |
$hoiioAccessToken = "YOUR_ACCESS_TOKEN_HERE"; | |
$sendSmsURL = "https://secure.hoiio.com/open/sms/send"; | |
/* Recipient of SMS */ | |
$destination = "+6511111111"; | |
$message = "Congrats! You have just sent your first SMS with Hoiio!"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hmac | |
import hashlib | |
def sign(payload, key): | |
dig = hmac.new(key, msg=payload, digestmod=hashlib.sha256).digest() | |
return dig.encode('hex') | |
if __name__ == "__main__": | |
import sys | |
if (len(sys.argv) == 3): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function computeHoiioSignature($payload, $accessToken) { | |
// hash_hmac will return a hex of the digest | |
$signature =hash_hmac('sha256', $payload, $accessToken); | |
return $signature; | |
} | |
?> |
OlderNewer