<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
/** | |
* API prototype class. Uses strict ECMA convention. | |
* This class requires jQuery. | |
* | |
* @category Prototype | |
* @author Muntasir Mohiuddin | |
*/ | |
var API; |
<?php | |
ini_set('precision', 20); | |
?> | |
<!-- Decreased Latency --> | |
<!-- Increased parallelism --> | |
<!-- Better caching --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> | |
<script src="js/mustache.js" type="text/javascript"></script><!-- --> | |
<script> |
public function before(){ | |
parent::before(); | |
// this block provides header information for facebook send message popup | |
if( preg_match('/facebook/', $_SERVER['HTTP_USER_AGENT'])) { | |
$facebook_config = kohana::$config->load('facebook'); | |
$share = $facebook_config['share'][$this->lang]; | |
$item_id = $this->request->query('id'); | |
$media = ORM::factory('Media', $item_id)->as_array(); |
#!/usr/bin/env python | |
''' | |
Change Facebook test users password | |
''' | |
import urllib, urllib2, json | |
# makes a batch call to facebook | |
# access_token : facebook access token |
args.batch.push({ | |
method : "GET", | |
name : "get-users", | |
relative_url : "/"+app.id+"/accounts/test-users", | |
omit_response_on_success : false | |
}); | |
args.batch.push({ | |
method : "GET", | |
relative_url : "?ids={result=get-users:$.data.*.id}" |
class Controller_Home extends Controller { | |
protected $args; // store GET/POST variables | |
public function before() { | |
parent::before(); | |
// if a GET request | |
if( $this->request->method() == "GET" ) { | |
$this->args = $this->request->query(); |
<?php | |
send_push($_REQUEST['alert'], $_REQUEST['appkey'], $_REQUEST['appmaster']); | |
function send_push($alert, $appkey, $appmaster) { | |
$badge = 1; // default is 1 | |
$auth = $appkey . ":" . $appmaster; | |
$url = "https://go.urbanairship.com/api/push/broadcast/"; |
<?php | |
// GENERATE TABLE FROM FIRST LINE OF CSV FILE | |
$inputFile = 'csv/sample.csv'; // path to CSV file | |
$tableName = 'csv'; // table name | |
$fh = fopen($inputFile, 'r'); | |
$contents = fread($fh, 5120); // 5KB | |
fclose($fh); |