Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
function getpublickey()
{
x=$(curl -fs http://169.254.169.254/latest/meta-data/public-keys/)
if [ $? -eq 0 ]; then
for i in $x; do
index=$(echo $i|cut -d = -f 1)
format=$(curl -s http://169.254.169.254/latest/meta-data/public-keys/$index/)
echo $(curl -s http://169.254.169.254/latest/meta-data/public-keys/$index/$format)
{
"meta": {
"code": 400,
"error_message": "The courier is not supported.",
"error_type": "InvalidContent"
},
"data": {}
}
{
"meta": {
"code": 409,
"error_message": "The tracking number is required.",
"error_type": "MissingParameter"
},
"data": {}
}
{
"meta": {
"code": 200
},
"data": {
"tracking": {
"active": true,
"created_at": "2013-04-15T16:41:56+08:00",
"custom_fields": {
"product_name": "new_iPhone Case",
{
"tracking": {
"title": "New Title Name",
"smses": [
"+18555072519",
"+18555072511"
],
"emails": [
"[email protected]",
"[email protected]"
v3.0.7 (2014-04-10)
  • Trackings Resource, added tracked_count in the return value.
  • Webhook, both 1.0 and 2.0, added tracked_count in the call.
v3.0.6 (2014-04-09)
  • Support delete tracking DELETE /trackings/:slug/:tracking_number
v3.0.5 (2014-02-06)
  • error response with relevant data content.
  • Support reactivate an expired tracking. POST /trackings/:slug/:tracking_number/reactivate
module Jekyll
class LessCssFile < StaticFile
def write(dest)
# do nothing
end
end
# Expects a lessc: key in your _config.yml file with the path to a local less.js/bin/lessc
# Less.js will require node.js to be installed
{
"meta": {
"code": 200
},
"data": {
"couriers": [
{ ... },
{ ... },
{ ... }
]
{
"tracking": {
"slug": "dhl",
"tracking_number": "123456789"
}
}
{
"meta": {
"code": 200
},
"data": {
}
}