Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/willrax/toppr
Ruby wrapper for desktoppr.co API.
https://github.com/willrax/toppr
Last synced: 9 days ago
JSON representation
Ruby wrapper for desktoppr.co API.
- Host: GitHub
- URL: https://github.com/willrax/toppr
- Owner: willrax
- License: mit
- Created: 2012-09-05T02:09:58.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-05-27T02:07:48.000Z (over 11 years ago)
- Last Synced: 2024-10-07T03:41:23.525Z (30 days ago)
- Language: Ruby
- Homepage:
- Size: 133 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Toppr [![Build Status](https://secure.travis-ci.org/willrax/toppr.png?branch=master)][travis]
[travis]: http://travis-ci.org/willrax/toppr
A simple ruby wrapper for the desktoppr.co API.
## Installation
$ gem install toppr
## Examples
Each request returns a hash with method access.
### Request a users profile
```ruby
Toppr.user('willrax')
=> #
```### Wallpapers
You can fetch all the wallpapers on the desktoppr database
```ruby
Toppr.wallpapers
```Or you can fetch a random wallpaper
```ruby
Toppr.random
=> # thumb=# url="http://a.desktopprassets.com/wallpapers/bddef83d0dd366676a0c9977eecd2d06560d7231/wp_2560-3.jpeg"> palette=[] review_state="safe" url="http://www.desktoppr.co/wallpapers/76285" user_count=6 user_id=5286 views_count=15 width=2560>
```You can also add a username param to fetch either all the wallpapers that a user has in their collection or a random one.
```ruby
Toppr.wallpapers('willrax')
```## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request