Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Edited README.txt via GitHub

  • Loading branch information...
commit abbac005d803fb25beb0b723574854fa4a39bf2e 1 parent 9c6beb2
Adrian Parr authored

Showing 1 changed file with 1 addition and 8 deletions. Show diff stats Hide diff stats

  1. +1 8 README.txt
9 README.txt
... ... @@ -1,33 +1,26 @@
1 1 as3googleurlshortener
2 2
3   -
4   -
5 3 This class uses Google's URL Shortener API to shorten and expand URLs. To circumvent Google's restrictive crossdomain policy file (http://goo.gl/crossdomain.xml) a PHP file is used as a proxy (included with the source).
6 4
7 5 There are two public methods ...
8 6
9 7 shorten
10   -
11 8 The first parameter is the long URL you wish to shorten (String)
12   -
13 9 The second parameter is optional and is your API key (String) which can be obtained from Google here http://code.google.com/apis/console/
14 10
15 11 expand
16   -
17 12 The first parameter is the short URL you wish to expand (String)
18   -
19 13 The second parameter is optional and is your API key (String) which can be obtained from Google here http://code.google.com/apis/console/
20 14
21 15 Due to the asynchronous nature of receiving the data back from Google, it is necessary to set up an event handler that listens for the Event.COMPLETE event. An example of this is provided in the source files.
22 16
23 17
24   -
25 18 Example Code
26 19
27 20 import com.adrianparr.utils.GoogleUrlShortener?;
28 21 var longUrl:String = "http://code.google.com/p/as3googleurlshortener/";
29 22 var apiKey:String = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
30   -var gus:GoogleUrlShortener? = new GoogleUrlShortener?();
  23 +var gus:GoogleUrlShortener = new GoogleUrlShortener();
31 24 gus.addEventListener(Event.COMPLETE, onShortenComplete);
32 25 gus.shorten(longUrl, apiKey);
33 26 function onShortenComplete(event:Event):void {

0 comments on commit abbac00

Please sign in to comment.
Something went wrong with that request. Please try again.