Skip to content

Instantly share code, notes, and snippets.

@Soulflare3
Last active September 30, 2017 05:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Soulflare3/d3c016f27439630b926527b287687aba to your computer and use it in GitHub Desktop.
Rendered version of this file hosted at https://static.sf3soft.net/zpriotesting.html as of 2017-09-29

#zpr.io https://zapier.com/zapbook/updates/30/zprio-shortener/

Micah Bennett / November 26, 2012
Now your tweets have pre-shortened zpr.io URLs, no more failed tweet attempts due to crazy long URLs!
(We also don't re-shorten common shorteners like bit.ly or t.co.)

zpr.io is not a URL service that just spits out any shortened URLs, one must first set up twitter integrations using their website, and when tweeting a URL the user has the option of applying Zapier's URL shortening service automatically (enabled by default). A free account can use 1 "zap" (integration) and twitter is available for free.

Initially I tested with a hard set URL in their twitter integration. I set it up to tweet a predefined message

Testing zpr for URL Team http://archiveteam.org to which the output was Testing zpr for URL Team http://zpr.io/nniJB

I then tweeted another time on account #1 and the same tweet (same url) was posted a second time. I loaded thier URL variable in, and now instead of having a preset URL it copies the URL of the tweet from account #1. This was a success

Test 3 Testing zpr for URL Team http://zpr.io/nnidS

Now after this I tweeted rapidly, but their service has a delay where it only checks every 5 minutes. Instead of having a delay and only sending 1 tweet/5min, it does a batch job and processes all tweets since last run (and runs every 5 min, but you can run it manually as well). I tweeted twice then manually ran the job, so test 4 and 5 were immediately after one another.

Testing zpr for URL Team http://zpr.io/nnidd Testing zpr for URL Team http://zpr.io/nnide

URLS seem to be created sequentially. It also appears that the service starts with capital letters, then moves to lowercase letters (extensive testing not done).

Test results:

λ curl -I zpr.io/nniJB
HTTP/1.1 302 FOUND
Connection: keep-alive
Server: gunicorn/19.6.0
Date: Sat, 30 Sep 2017 00:48:13 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 259
Location: http://www.archiveteam.org
Via: 1.1 vegur

λ curl -I zpr.io/nnidS
HTTP/1.1 302 FOUND
Connection: keep-alive
Server: gunicorn/19.6.0
Date: Sat, 30 Sep 2017 00:48:44 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 319
Location: https://twitter.com/soulflare3/status/913902011027992578
Via: 1.1 vegur

λ curl -I zpr.io/nnidd
HTTP/1.1 302 FOUND
Connection: keep-alive
Server: gunicorn/19.6.0
Date: Sat, 30 Sep 2017 00:49:00 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 319
Location: https://twitter.com/soulflare3/status/913926265899569152
Via: 1.1 vegur

λ curl -I zpr.io/nnide
HTTP/1.1 302 FOUND
Connection: keep-alive
Server: gunicorn/19.6.0
Date: Sat, 30 Sep 2017 00:49:06 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 319
Location: https://twitter.com/soulflare3/status/913926105802919936
Via: 1.1 vegur

##Examples via Twitter:

@steam_games

Now Available on Steam: Call of Duty®: WWII - PC Open Beta @CallofDuty http://zpr.io/nnpR8 https://twitter.com/steam_games/status/913817000102653952

Now Available on Steam - Cuphead #SteamNewRelease @StudioMDHR http://zpr.io/nnk7K https://twitter.com/steam_games/status/913784074627682304

Now Available on Steam - GOKEN #SteamNewRelease http://zpr.io/nnC87 | https://twitter.com/steam_games/status/913587084518150144


##Valid:

λ curl -I zpr.io/nnk7K
HTTP/1.1 302 FOUND
Connection: keep-alive
Server: gunicorn/19.6.0
Date: Fri, 29 Sep 2017 22:22:53 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 351
Location: http://store.steampowered.com/app/268910/?snr=1_550_552&newsId=33141
Via: 1.1 vegur

##Not found:

λ curl -I zpr.io/nnK7l
HTTP/1.1 200 OK
Connection: keep-alive
Server: gunicorn/19.6.0
Date: Fri, 29 Sep 2017 22:23:19 GMT
Content-Type: application/json
Content-Length: 36
Via: 1.1 vegur
λ curl -I zpr.io/--test--
HTTP/1.1 200 OK
Connection: keep-alive
Server: gunicorn/19.6.0
Date: Sat, 30 Sep 2017 00:58:56 GMT
Content-Type: application/json
Content-Length: 36
Via: 1.1 vegur

####Response:

{
  "error": "no link found! :-("
}

##Root URL:

λ curl -I zpr.io
HTTP/1.1 200 OK
Connection: keep-alive
Server: gunicorn/19.6.0
Date: Fri, 29 Sep 2017 22:26:34 GMT
Content-Type: application/json
Content-Length: 145
Via: 1.1 vegur

####Response:

{
  "hello!": [
    "and thanks for checking out zpr.io!",
    "this is the url shortener for zapier.com!",
    "cheers!",
    "~bryan"
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment