2013-10-27 3 views
0

내가 내 레일 응용 프로그램에서 다음을 실행 한 :의 API 결과 불가사의

Flickr.collections_list 

클래스 및 방법 :

class Flickr 

    require 'httparty' 
    include HTTParty 

    API_KEY   = '2fkjgdskjgksdjkgjrkbff3aee' 
    SECRET   = '881fgregreg2b2' 
    USER_ID   = '[email protected]' 
    RESPONSE_FORMAT = 'json' 
    base_uri   'http://api.flickr.com' 

    # Get list of all collections 
    def self.collections_list 
    response = get("/services/rest/", 
     :query => { 
     method:   'flickr.collections.getTree', 
     api_key:   API_KEY, 
     user_id:   USER_ID, 
     nojsoncallback: 1 
     } 
    ) 

    JSON.parse(response.to_json.gsub('\"', '"')) 
    end 

end 

때 실행 콘솔에 내가 잘 보이는 내 결과를 얻을 수 있다고하지만, 약간의 길을 throguh 결과는 단지 세미 콜론을 얻을. 그럴 수는 없지만 나머지 API 결과는 볼 수 없습니다. 무슨 일이야?

=> {"rsp"=> 
    {"collections"=> 
    {"collection"=> 
     {"collection"=> 
     [{"collection"=> 
      [{"set"=> 
       [{"id"=>"7215fffff81735", 
       "title"=>"Album title", 
       "description"=>"Album title"}, 
       {"id"=>"72145645ffff464564606", 
       "title"=>"Album title", 
       "description"=> 
       "Album title"}, 
       {"id"=>"721545646760", 
       "title"=>"Album title", 
       "description"=> 
       "Album title"}], 
      "id"=>"5794562-721546456457291", 
      "title"=>"Album title", 
      "description"=>"", 
      "iconlarge"=>"/images/collection_default_l.gif", 
      "iconsmall"=>"/images/collection_default_s.gif"}, 
      {"set"=> 
       [{"id"=>"72145645635562", 
       "title"=>"Album title", 
       "description"=>""}, 
       {"id"=>"72164564561696", 
       "title"=>"Album title", 
       "description"=>""}, 
       {"id"=>"72157464546", 
       "title"=>"Album title", 
       "description"=>""}, 
       {"id"=>"72154564642", 
       "title"=>"Album title", 
       "description"=>""}, 
       {"id"=>"7215762456456644", 
       "title"=> 
       "Album title", 
       "description"=>""}, 
       {"id"=>"721546456489442", 
       "title"=>"Album title", 
       "description"=>""}, 
       {"id"=>"7215464568", 
       "title"=> 
       "Album title", 
       "description"=>""}, 
       {"id"=>"721574645638", 
       "title"=>"Album title", 
: 

나는 코드에서 모든 아이디의 앨범 이름을 변경하지만 응답의 정확한 복사본입니다 이외했다.

아무도 도와 줄 수 있습니까?

답변

0

해결했습니다. Page Down 키를 누르기 만하면 Flickr의 나머지 결과가 모두 함께있었습니다!