Strike API
API wrapper for the Strike Search website (https://getstrike.net/torrents/)
Installation
Add this line to your application's Gemfile:
gem 'strike_api'
And then execute:
$ bundle
Or install it yourself as:
$ gem install strike_api
Usage
Find
# Param 1: torrent hash string or array of torrent hash strings
# Returns: array of torrent objects (objects include file_info data)
torrentInfoArray = StrikeApi::Torrent.find(yourTorrentHash)
Search
# Param 1: search phrase, example: "ubuntu iso"
# Returns: array of torrent objects
searchResults = StrikeApi::Torrent.search(yourSearchPhrase)
# Param 1: search phrase, example: "ubuntu iso"
# Param 2: category or sub category, examples: "Music", "Documentary"
# Returns: array of torrent objects
searchResults = StrikeApi::Torrent.search(yourSearchPhrase, yourCatagoryOrSubCategory)
# Param 1: search phrase, example: "ubuntu iso"
# Param 2: category, example: "Applications"
# Param 3: sub category, example: "Windows"
# Returns: array of torrent objects
searchResults = StrikeApi::Torrent.search(yourSearchPhrase, yourCatagory, yourSubCategory)
Top torrents
# Param 1: category, examples: "Books", "all"
# Returns: top 100 torrents
topResults = StrikeApi::Torrent.top(yourCatagory)
Categories and sub categories
# Returns: array of valid categories
categoryArray = StrikeApi::Torrent.catagoriesAvailable()
# Returns: array of valid sub categories
subCategoryArray = StrikeApi::Torrent.subCatagoriesAvailable()
See tests for more usage examples.
TODO
- Better commenting
- ~~Provide usage examples in readme~~
Contributing
- Fork it ( https://github.com/marshallford/strike_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