Skip to content

Instantly share code, notes, and snippets.

@rajtrivedi2001
rajtrivedi2001 / Google API.m
Created December 29, 2015 12:32 — forked from stormxuwz/Google API.m
Matlab Google Street View and Direction API
origin='Madison,Chicago,IL';
destination='N+Michigan+Ave,Chicago,IL';
url1=['https://maps.googleapis.com/maps/api/directions/json?origin=' origin '&destination=' destination '&sensor=false&key= XXXX&departure_time=1343641500&mode=driving'];
direction=urlread(url1);
d=parse_json(direction);
steps=d{1}.routes{1}.legs{1}.steps;
[startpoints,endpoints]=cellfun(@parsecoord,steps);
<?php
/** To use this just:
1. put in your api information at the top
2. store/retreive your API token in the specified locations
3.store your api calls
Ex: $jet->uploadFile($feed_type, $path);
$jet->processOrdersByStatus('ready');
$jet->apiPUT("/orders/".$JET_ORDER_ID."/acknowledge", $data);
**/