Sha256: ad41a8a17dfbbf4812d8b6556fa68a7acd5351d5f9a577690070edc3f70ad97a

Contents?: true

Size: 830 Bytes

Versions: 2

Compression:

Stored size: 830 Bytes

Contents

# Pixy [![Build Status](https://travis-ci.org/NARKOZ/pixy.png)](http://travis-ci.org/NARKOZ/pixy)

Pixy is an API wrapper for Pixiv url shortener - [p.tl](http://p.tl/)

## Installation

```sh
gem install pixy
```

## Usage

Get an API key here: http://p.tl/key_create.php

```ruby
Pixy.shorten!(API_KEY, 'https://github.com/narkoz/pixy')
# => "http://p.tl/Us9R"

Pixy.stats API_KEY
# => {:calls=>12, :limit=>988}

pixy = Pixy.shorten(API_KEY, 'https://github.com/narkoz/pixy')
# => #<Pixy::Shorten:0x0000010201bde8 @status="ok", @long_url="https://github.com/narkoz/pixy", @short_url="http://p.tl/Us9R", @counter=20>

pixy.status
# => "ok"

pixy.long_url
# => "https://github.com/narkoz/pixy"

pixy.short_url
# => "http://p.tl/Us9R"

pixy.counter
# => 20
```

## Copyright

Copyright (c) 2011-2013 Nihad Abbasov    
BSD License.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pixy-0.1.3 README.md
pixy-0.1.2 README.md