Skip to content

Instantly share code, notes, and snippets.

@simonszu
Created October 17, 2013 12:18
Show Gist options
  • Save simonszu/7023890 to your computer and use it in GitHub Desktop.
Save simonszu/7023890 to your computer and use it in GitHub Desktop.
#! /usr/bin/env ruby
require 'digest/md5'
require 'net/http'
require 'uri'
USER = "abc"
PASS = "def"
FEVER_URI = "http://xyz" # Without trailing slash please
get_feeds = URI.parse(FEVER_URI + "/?api&feeds")
apikey = Digest::MD5.hexdigest(USER + ":" + PASS)
body = {'api_key' => apikey, 'mark' => 'group', 'as' => 'read', 'id' => '-1', 'before' => Time.now.to_i}
response = Net::HTTP.post_form(get_feeds, body)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment