Ruby wrapper for the Slideshare API.
Add this line to your application's Gemfile:
gem 'slideshare_api'Or install it yourself as:
$ gem install slideshare_api
Get your API Key and Shared Secret from Slideshare here.
api_key = 'your api key'
shared_secret = 'your shared secret'
client = SlideshareApi::Client.new api_key, shared_secretGet a slideshow:
# from url...
slideshow_url = 'http://fr.slideshare.net/awesome/slideshow'
slideshow = client.slideshow(slideshow_url: slideshow_url) #=> returns a SlideshareApi::Model::Slideshow
# from id...
slideshow_id = '1234'
slideshow = client.slideshow(slideshow_id: slideshow_id) #=> returns a SlideshareApi::Model::Slideshow
# with optional data...
slideshow = client.slideshow(slideshow_id: slideshow_id, detailed: true) #=> returns a SlideshareApi::Model::SlideshowGet slideshows:
# by tag...
tag = 'ruby'
slideshows = client.slideshows(tag: tag) #=> returns an array of SlideshareApi::Model::Slideshow
# by group...
group = 'group'
slideshows = client.slideshows(group: group) #=> returns an array of SlideshareApi::Model::Slideshow
# by user...
user = 'username'
slideshows = client.slideshows(user: user) #=> returns an array of SlideshareApi::Model::Slideshow
# with optional data...
slideshows = client.slideshows(user: user, detailed: true) #=> returns an array of SlideshareApi::Model::SlideshowSearch slideshows:
query = 'elcurator'
options = {detailed: true, page: 2}
slideshows = client.search(query, options) #=> returns an array of SlideshareApi::Model::SlideshowOptional search parameters:
| Option | Default | Can be |
|---|---|---|
| detailed | false | true, false |
| page | 1 | |
| per_page | 12 | maximum: 50 |
| language | 'en' | '**' (All), 'es' (Spanish), 'pt' (Portuguese), 'fr' (French), 'it' (Italian), 'nl' (Dutch), 'de' (German), 'zh' (Chinese), 'ja' (Japanese), 'ko' (Korean), 'ro' (Romanian), '!!' (Other) |
| ordered_by | 'relevance' | 'mostviewed', 'mostdownloaded', 'lastest' |
| upload_date | 'any' | 'week', 'month', 'year' |
| downloadable | all | true, false |
| format | 'all' | 'pdf' (PDF), 'ppt' (PowerPoint), 'odp' (Open Office), 'pps' (PowerPoint Slideshow), 'pot' (PowerPoint template) |
| type | 'all' | 'presentations', 'documents', 'webinars', 'videos', 'infographics' |
Feel free to contribute!
- Fork it ( https://github.com/jvenezia/slideshare_api/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Released under the MIT License, which can be found in LICENSE.txt.
