Project

pixy

0.0
No commit activity in last 3 years
No release in over 3 years
Pixy is an API wrapper for Pixiv url shortener - p.tl
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

Pixy Build Status

Pixy is an API wrapper for Pixiv url shortener - p.tl

Installation

gem install pixy

Usage

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

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.