This file contains hidden or 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
[ | |
{ | |
"url": "https://api.github.com/repos/octocat/Hello-World/issues/1", | |
"html_url": "https://github.com/octocat/Hello-World/issues/1", | |
"number": 1347, | |
"state": "open", | |
"title": "Found a bug", | |
"body": "I'm having a problem with this.", | |
"user": { | |
"login": "octocat", |
This file contains hidden or 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
# encoding: UTF-8 | |
require 'twitter' | |
Twitter.configure do |config| | |
config.consumer_key = YOUR_CONSUMER_KEY | |
config.consumer_secret = YOUR_CONSUMER_SECRET | |
config.oauth_token = YOUR_OAUTH_TOKEN | |
config.oauth_token_secret = YOUR_OAUTH_TOKEN_SECRET | |
end |
This file contains hidden or 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
# encoding: UTF-8 | |
require 'json' | |
institutes.each do |institute| | |
begin | |
unparsed = open("https://graph.facebook.com/#{institute[:facebook]}").read | |
unless unparsed == "false" | |
facebook = JSON(unparsed) | |
This file contains hidden or 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
# encoding: UTF-8 | |
require 'twitter' | |
Twitter.configure do |config| | |
config.consumer_key = '......' | |
config.consumer_secret = '......' | |
config.oauth_token = '......' | |
config.oauth_token_secret = '......' | |
end |
This file contains hidden or 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
# encoding: UTF-8 | |
require 'json' | |
require 'open-uri' | |
institutes.each do |institute| | |
begin | |
sharedcount = JSON(open("http://api.sharedcount.com/?url=http://www.#{institute[:website]}").read) | |
# Save your data here |
This file contains hidden or 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
# encoding: UTF-8 | |
require 'twitter' | |
Twitter.configure do |config| | |
config.consumer_key = '......' | |
config.consumer_secret = '......' | |
config.oauth_token = '......' | |
config.oauth_token_secret = '......' | |
end |
NewerOlder