1
是否有工作的客戶端(任何語言,最好是紅寶石),可以目前檢索訂閱(星標,喜歡,標籤是獎金),仍然是非官方的,Google Reader API?工作(沒有401客戶端錯誤)非官方谷歌Api客戶端
我試過this和this,但他們似乎無法提出簡單的請求,例如http://www.google.com/reader/api/0/subscription/list,如果在瀏覽器上使用該功能,它將完美工作。
是否有工作的客戶端(任何語言,最好是紅寶石),可以目前檢索訂閱(星標,喜歡,標籤是獎金),仍然是非官方的,Google Reader API?工作(沒有401客戶端錯誤)非官方谷歌Api客戶端
我試過this和this,但他們似乎無法提出簡單的請求,例如http://www.google.com/reader/api/0/subscription/list,如果在瀏覽器上使用該功能,它將完美工作。
我已經回答了這是其他一些帖子,我發現它們與此類似......所以對於使用google-api-client(適用於任何google apis)的ruby,有幾個與認證使用api密鑰,而不是OAuth身份驗證和輸入...
我已經列出了這個過程(使用api密鑰服務器端)在the code abode。
在構建客戶端時,您必須明確設置authorzation參數爲nil,否則gem會嘗試使用OAuth進行身份驗證,所以如果僅使用api鍵從服務器調用,您將始終獲得401 Unauthorized。 the code abode - google-api-client for ruby
require 'openssl'
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
require 'google/api_client'
client = Google::APIClient.new(:key => 'your-api-key', :authorization => nil)
search = client.discovered_api('customsearch')
response = client.execute(
:api_method => search.cse.list,
:parameters => {
'q' => 'the hoff',
'key' => 'your-api-key',
'cx' => 'your-custom-search-id'
}
)