- Radiokanalerna kontrolleras och fetchas kontinuerligt m.h.a event machine. Tack Kim.
- Låten skickas vidare till respektive tjänst (Spotify, Grooveshark och iTunes), var vid en länk fås. Spot-projektet används för att hämta information från Spotify.
- All data skickas nu till en kö vid namn Beanstalkd för vidare bearbetning.
- En worker jobbar här med att bearbeta låtarna som lagts i kön.
- Informationen sparas i en MySQL-databas, övergången till PostgreSQL är inte långt borta.
- Låten sparas till minnet m.h.a memcached, för att göra låten lättillgänglig.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -w | |
require "rubygems" | |
require "rest-client" | |
require "nokogiri" | |
require "prowl" | |
require "colorize" | |
require "ruby-growl" | |
require "yaml" | |
require "rtransmission" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless File.exists?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', github: 'rails/rails' | |
gem 'sqlite3' | |
GEMFILE | |
system 'bundle' | |
end |
Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution
I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)