Created
October 17, 2013 12:18
-
-
Save simonszu/7023890 to your computer and use it in GitHub Desktop.
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 | |
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