I hereby claim:
- I am michelezonca on github.
- I am mzonca (https://keybase.io/mzonca) on keybase.
- I have a public key whose fingerprint is 6296 03C7 CE7E 5638 57CD C09D 139A EA2C 61A3 4D26
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| find "$PWD" -name '*.less' | while read line; do | |
| OUTPUT=`echo $line | sed "s|\.less|\.css|"` | |
| lessc -x "$line" >> "$OUTPUT" | |
| done |
| // Pseudo-code | |
| HASH = BASE64(PUBLIC_KEY + ":" + HMAC_SHA1(PUBLIC_KEY, PRIVATE_KEY) ) |
| <api format="JSON"> | |
| <authentication type="QueryParameter"> | |
| <description><![CDATA[This is a simple query parameter authentication]]></description> | |
| <parameters> | |
| <parameter name="apiKey" optional="false"> | |
| <description><![CDATA[Your API Key]]></description> | |
| </parameter> | |
| </parameters> | |
| </authentication> |
| def __generate_header(self): | |
| "Generates a header" | |
| header = "rvl\x00" # magic string | |
| header += "\x01" # data version | |
| header += "\x00" # separator | |
| header += "\x00\x04\x06" # application version TODO | |
| header += "\x00\x00\x00" # separator | |
| return header |
| # ... | |
| # Call a method asynchronously and get a Thread object | |
| thread = bitly.getShortenedUrl("http://www.mashape.com", "bitly-login", "bitly-api-key") { |response| | |
| shortenedUrl = response["shortenedUrl"] # See the API's documentation | |
| puts "Finally the shortened url is " + shortenedUrl | |
| } | |
| =begin |
| // ... | |
| // Call a method asynchronously and get a Thread object | |
| Thread thread = bitly.getShortenedUrl("http://www.mashape.com", "bitly-login", "bitly-api-key", new MashapeCallback() { | |
| @Override | |
| public void requestCompleted(Object response) { | |
| JSONObject jsonResponse = (JSONObject) response; | |
| System.out.println("Finally the shortened url is " + jsonResponse.getString("shortenedUrl")); | |
| } |
| #import "Sample.h" | |
| @implementation Sample | |
| - (void) doAPIRequest { | |
| NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
| @try { | |
| // Initialize the Obj-C Client Library with a Developer key |
| require "Bitly.rb" | |
| obj = Bitly.new("MY_PUBLIC_KEY", "MY_PRIVATE_KEY") |
| from Bitly import Bitly | |
| obj = Bitly("MY_PUBLIC_KEY", "MY_PRIVATE_KEY") | |
| def my_function(result): | |
| print result | |
| obj.getShortenedUrl("http://mashape.com", "mashape", "apikey", my_function) | |
| print "waiting" |