Need help with kickscraper?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

markolson
210 Stars 52 Forks MIT License 87 Commits 9 Opened issues

Description

API library for Kickstarter.com

Services available

!
?

Need anything else?

Contributors list

No Data

Kickscraper

Kickscraper is a library for interfacing with Kickstarter's undocumented/unannounced API. With it, you can get a lot of data about projects, whether you've backed them or not, including reward levels, amount pledged, links to the videos, updates, if it's been successful or not, and details about the creator.

Much of the of data available is documented in the wiki for this project.

Status Update

This version now uses Kickstarter's public search for all project searches. It should be a drop-in replacement for the previous version.

Installation

$ gem install kickscraper

Or for use in another app, add it to your Gemfile

# use the gem
gem 'kickscraper'

or stay up to date with the repo (which should be stable)

gem 'kickscraper', :git => 'git://github.com/markolson/kickscraper.git'

Quick way to get started in the console

1. Put your real Kickstarter user credentials in spec/test_constants.rb (or leave blank, which will still allow some kickscraper features)
2. Enter the console with "rake console"
3. Start using kickscraper with any of the examples below (starting with "c = Kickscraper.client")

Sample Usage

Provided with your user credentials this will list the first 20 or so projects you've backed, along with if the project is still active and if it has met it's funding goal.

require 'kickscraper'

Kickscraper.configure do |config| config.email = '[email protected]' config.password = 'This is not my real password. Seriously.' end

client = Kickscraper.client puts " A | C |" puts "------------------------" client.user.backed_projects.each {|x| print (x.active? ? ' X |' : ' |') print (x.successful? ? ' X | ' : ' | ') puts x.name }

API Examples

c = Kickscraper.client

c.user.class => Kickscraper::User

List what data is available on an object

c.user.keys => ["id", "name", "slug", "avatar", "urls", "location", "biography", "backed_projects_count", "created_projects_count", "unread_messages_count", "unanswered_surveys_count", "starred_projects_count", "social", "send_newsletters", "category_wheel", "notify_of_backings", "notify_of_updates", "notify_of_follower", "notify_of_friend_activity", "notify_of_comments", "notify_mobile_of_backings", "notify_mobile_of_updates", "notify_mobile_of_follower", "notify_mobile_of_friend_activity", "notify_mobile_of_comments", "updated_at", "created_at"]

In addition, User types have "backed_projects" and "starred_projects" available.

c.user.backed_projects => [<project: veronica mars movie project>, <project: wants to riff twilight live in theaters nationwide>, <project: be or not to be: that is the adventure>, <project: annihilation a next generation rts>, <project: a new kind of video game console>, <project: knight terrors: comedic batman short>, <project: meme playing cards>, <project: job brain a trivia quiz show podcast>, <project: dock: the best dock for iphone>, <project: the snap-together desktop trebuchet>]

Some values are already converted to their appropriate types. Some aren't yet.

c.user.backed_projects.first.creator.class => Kickscraper::User

You can chain methods together and dig into the objects.

So get the thumbnail of the person that created the latest project we backed

c.user.backed_projects.first.creator.avatar.thumb

You can search for projects

c.search_projects('veronica mars') => [<project: veronica mars movie project>, <project: daughter tv show pilot>]

and view their rewards or updates, in addition to any of the data found in the "keys"

vm = c.search_projects('veronica mars').first vm.updates => [...] vm.successful? => true vm.video.high => "https://d2pq0u4uni88oo.cloudfront.net/projects/56284/video-217182-h264_high.mp4?2013"

When searching for projects (or using convenient methods like recently_launched_projects()),

you can continue the search until Kickstarter returns no more results

c.recently_launched_projects => [ array of projects ] c.load_more_projects if c.more_projects_available? => [ array of additional projects ]

Print all the updates for all the current user's projects

c.user.backed_projects.each { |project| puts project.name.upcase project.updates.reverse.each { |update| # strip the HTML out of the body, since this outputs to a terminal puts "Update #{update.sequence}: #{update.body.gsub(/]*>/, "")}\n\n" } puts "\n\n" }

Get info about Kickstarter categories or find projects by category

c.categories => [category:, <category: art>, category:, category:, <category: games>, <category: music>, <category: book>, category:, category:, <category: art>, <category: design>, category:, <category: games>, <category: folk>, <category: book>, <category: software>, category:, category:, <category: design>, <category: film>, <category: music>, category:, category:, category:, category:, <category: film>, category:, category:, <category: art>, category:, <category: rock>, category:, <category: video>, category:, category:, category:, category:, category:, <category: media>, category:, category:, <category: art>, <category: podcast>, category:, category:, <category: music>, category:, category:, category:, category:]

category = c.category('product design') => <category: design>

category.keys => ["id", "name", "position", "parent_id", "parent", "projects_count", "urls"]

category.projects_count => 234

ps = category.projects => [<project: skinny mirror the that compliments you>, <project: fort>, <project: revolutionizing the push-up exercise>, <project: nubrella the world first hands-free umbrella.>, <project: the pebble smartwatch dock>, <project: ipatched protect yourself from big brother hackers>, <project: introduces the dfp kayak dive fish paddle>, <project: a leash for your magsafe adapter>, <project: friendly bamboo party trays>, <project: reefs miniature saltwater aquarium>]

Contributing

There are two good ways to contribute:

First, by using it and creating Issues as you find problems or rough spots. Second, by taking matters into your own hands:

  1. Fork it
  2. Create your feature branch (
    git checkout -b my-new-feature
    )
  3. Commit your changes (
    git commit -am 'Add some feature'
    )
  4. Push to the branch (
    git push origin my-new-feature
    )
  5. Create new Pull Request

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.