Skip to content
Browse files

update readme

  • Loading branch information...
1 parent 75bb872 commit b8a1c8a268a7754f387d4a17699424f5c14b6914 @codegoblin committed May 10, 2012
Showing with 20 additions and 2 deletions.
  1. +20 −2 README.md
View
22 README.md
@@ -75,6 +75,23 @@ And in your code:
projects = Awesm::Project.list
projects.first.class # => Awesm::Project
+ # Create an awesm url
+ url = Awesm::Url.create(
+ :channel => 'twitter',
+ :key => '5c8b1a212434c2153c2f2c2f2c765a36140add243bf6eae876345f8fd11045d9',
+ :tool => 'mKU7uN',
+ :url => 'http://developers.awe.sm/'
+ )
+ url.awesm_url # => "http://demo.awe.sm/ELZ"
+
+ # Create a static url
+ url = Awesm::Url.static(
+ :url => 'http://developers.awe.sm/',
+ :key => '5c8b1a212434c2153c2f2c2f2c765a36140add243bf6eae876345f8fd11045d9',
+ :tool => 'mKU7uN'
+ )
+ url.awesm_url # => "http://demo.awe.sm/ELZ"
+
# Create a sharing link
Awesm::Url.share(
:url => 'http://developers.awe.sm/',
@@ -88,14 +105,15 @@ And in your code:
# => "http://api.awe.sm/url/share?v=3&url=http://developers.awe.sm/&key=5c8b1a212434c2153c2f2c2f2c765a36140add243bf6eae876345f8fd11045d9&tool=mKU7uN&channel=twitter&destination=http://twitter.com/intent/tweet?text=This+is+the+coolest+API+evar!%26url=AWESM_URL%26via=awesm&parent=awe.sm_s5d99&user_id=42"
# Create a static link
- Awesm::Url.static(
+ url = Awesm::Url.static(
:format => 'json',
:url => 'http://developers.awe.sm/',
:key => '5c8b1a212434c2153c2f2c2f2c765a36140add243bf6eae876345f8fd11045d9',
:tool => 'mKU7uN'
)
- # => "http://api.awe.sm/url/static.json?v=3&url=http://developers.awe.sm/&key=5c8b1a212434c2153c2f2c2f2c765a36140add243bf6eae876345f8fd11045d9&tool=mKU7uN"
+ url.awesm_url # => "http://demo.awe.sm/ELZ"
+ awesm_url="http://demo.awe.sm/K5s"
# Retrieve stats in return for your hard work!
stats = Awesm::Stats.range(
:key => '5c8b1a212434c2153c2f2c2f2c765a36140add243bf6eae876345f8fd11045d9',

0 comments on commit b8a1c8a

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