SYNCER

SYNCER

GET lists/list - リストの一覧を取得する

0件

公開日:

lists/list(GETメソッド)は、対象ユーザーのリスト一覧を取得するエンドポイントです。この一覧には、「対象ユーザーが作成したもの」と、「他ユーザーが作成したのを対象ユーザーが保存したもの」が混ざっています。

GET lists/list
GET lists/list
Twitterの公式リファレンス(英語)。lists/listに関する説明があります。

リソース

エンドポイント

GET https://api.twitter.com/1.1/lists/list.json

条件

項目ユーザー認証アプリケーション認証
利用
パーミッションRead-
レートリミット15 / 15min15 / 15min

パラメータ

user_id

指定例: 1528352858

対象ユーザーのユーザーID。

screen_name

指定例: arayutw

対象ユーザーのスクリーンネーム。

reverse

指定例: true

対象ユーザー自身が作成して、オーナーになっているリストを優先的に上位に表示するか否か。

レスポンス

アクセストークン(OAuth1.0)でリクエストをした場合の例です。

リクエストURL

https://api.twitter.com/1.1/lists/list.json?user_id=1528352858

リクエストヘッダー

Authorization: OAuth oauth_consumer_key=:consumer_key,oauth_nonce=0.97054900+1484705893,oauth_signature_method=HMAC-SHA1,oauth_timestamp=1484705893,oauth_token=:access_token,oauth_version=1.0,user_id=1528352858,oauth_signature=F%2Fj3tKoGc4a1l31%2BEtSpKi3eHoU%3D

レスポンスボディ (JSON)

JSON

[{"id":212343934,"id_str":"212343934","name":"\u3042\u3089\u3086","uri":"\/spyder1211\/lists\/list","subscriber_count":2,"member_count":1,"mode":"public","description":"","slug":"list","full_name":"@spyder1211\/list","created_at":"Tue Jun 30 06:20:41 +0000 2015","following":true,"user":{"id":1490549834,"id_str":"1490549834","name":"SPYDER","screen_name":"spyder1211","location":"","description":"CakePHP\u3001PHP\u3001mysql\u3001linux\u306a\u3069\u306a\u3069\u3067\u958b\u767a\u4e2d\u3002\u30ac\u30f3\u60a3\u8005\u3060\u3063\u305f\u308a\u3057\u307e\u3059","url":"http:\/\/t.co\/zCF0kvk1Sf","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/zCF0kvk1Sf","expanded_url":"http:\/\/blog.livedoor.jp\/spyder_5615\/","display_url":"blog.livedoor.jp\/spyder_5615\/","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":74,"friends_count":108,"listed_count":1,"created_at":"Fri Jun 07 14:39:52 +0000 2013","favourites_count":306,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":false,"statuses_count":1503,"lang":"ja","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_image_url_https":"https:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_tile":false,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/482334264386535425\/zbSmgTIG_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/482334264386535425\/zbSmgTIG_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/1490549834\/1403832794","profile_link_color":"1DA1F2","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"has_extended_profile":false,"default_profile":true,"default_profile_image":false,"following":true,"follow_request_sent":false,"notifications":false,"translator_type":"none"}},{"id":169431392,"id_str":"169431392","name":"Active Developers","uri":"\/chicagodesign\/lists\/active-developers","subscriber_count":9,"member_count":1998,"mode":"public","description":"","slug":"active-developers","full_name":"@chicagodesign\/active-developers","created_at":"Thu Sep 11 19:40:13 +0000 2014","following":true,"user":{"id":21170191,"id_str":"21170191","name":"Michael Sim \u2197\ufe0f","screen_name":"chicagodesign","location":"Chicago, IL","description":"Superhero Dad - Fan of #StarWars & #MTG - Art Director, UI\/UX Designer @LearnCore - Vindicated lifelong @Cubs fan! Doritos connoisseur.","url":"https:\/\/t.co\/WVBnHrI97e","entities":{"url":{"urls":[{"url":"https:\/\/t.co\/WVBnHrI97e","expanded_url":"http:\/\/be.net\/msim","display_url":"be.net\/msim","indices":[0,23]}]},"description":{"urls":[]}},"protected":false,"followers_count":88281,"friends_count":55115,"listed_count":2450,"created_at":"Wed Feb 18 04:50:31 +0000 2009","favourites_count":4810,"utc_offset":-21600,"time_zone":"Central Time (US & Canada)","geo_enabled":false,"verified":false,"statuses_count":15728,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/477109199445303296\/ILIe1GQv.jpeg","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/477109199445303296\/ILIe1GQv.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/485426285963780096\/PWkgtRBZ_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/485426285963780096\/PWkgtRBZ_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/21170191\/1404869522","profile_link_color":"000000","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"1F1F1F","profile_text_color":"7A7A7A","profile_use_background_image":true,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false,"translator_type":"none"}},{"id":204468040,"id_str":"204468040","name":"coding","uri":"\/code_ant\/lists\/coding","subscriber_count":38,"member_count":4225,"mode":"public","description":"","slug":"coding","full_name":"@code_ant\/coding","created_at":"Fri May 01 15:26:17 +0000 2015","following":true,"user":{"id":3226285846,"id_str":"3226285846","name":"The Ant","screen_name":"code_ant","location":"Paris, France","description":"#Pickant is your new content managing #Dashboard! Have a try today for FREE! #Ideas #BetaTester & #Developers welcomed on: pickant@hellome.ga","url":"https:\/\/t.co\/vpBpArDY68","entities":{"url":{"urls":[{"url":"https:\/\/t.co\/vpBpArDY68","expanded_url":"http:\/\/www.hellome.ga","display_url":"hellome.ga","indices":[0,23]}]},"description":{"urls":[]}},"protected":false,"followers_count":1189,"friends_count":2004,"listed_count":1260,"created_at":"Fri May 01 13:28:14 +0000 2015","favourites_count":9694,"utc_offset":3600,"time_zone":"Belgrade","geo_enabled":true,"verified":false,"statuses_count":46784,"lang":"fr","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"990000","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/594187164176355328\/tz3LmFQT.png","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/594187164176355328\/tz3LmFQT.png","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/594136090451271680\/aFMXmorC_normal.png","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/594136090451271680\/aFMXmorC_normal.png","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/3226285846\/1468518740","profile_link_color":"990000","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"000000","profile_text_color":"000000","profile_use_background_image":true,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false,"translator_type":"none"}},{"id":204966907,"id_str":"204966907","name":"Not on This Planet","uri":"\/Tech_UX\/lists\/not-on-this-planet","subscriber_count":9,"member_count":4416,"mode":"public","description":"","slug":"not-on-this-planet","full_name":"@Tech_UX\/not-on-this-planet","created_at":"Wed May 06 02:56:41 +0000 2015","following":true,"user":{"id":3101974276,"id_str":"3101974276","name":"Tech UX","screen_name":"Tech_UX","location":"","description":"Experimental","url":null,"entities":{"description":{"urls":[]}},"protected":false,"followers_count":18,"friends_count":0,"listed_count":6,"created_at":"Sat Mar 21 14:51:15 +0000 2015","favourites_count":31,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":false,"statuses_count":49,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_image_url_https":"https:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_tile":false,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/595953423901679616\/l0HThBHg_normal.jpg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/595953423901679616\/l0HThBHg_normal.jpg","profile_link_color":"905DD8","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"000000","profile_text_color":"000000","profile_use_background_image":false,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false,"translator_type":"none"}},{"id":108162497,"id_str":"108162497","name":"\u6280\u8853","uri":"\/chiyo_web\/lists\/\u6280\u8853","subscriber_count":1,"member_count":11,"mode":"public","description":"\u30a6\u30a7\u30d6\u30c7\u30b6\u30a4\u30f3\u3001\u30d7\u30ed\u30b0\u30e9\u30e0","slug":"\u6280\u8853","full_name":"@chiyo_web\/\u6280\u8853","created_at":"Sun Mar 16 05:10:25 +0000 2014","following":true,"user":{"id":2328884269,"id_str":"2328884269","name":"\u3081\u304c\u306d\u30e9\u30a4\u30d6","screen_name":"chiyo_web","location":"","description":"\u3042\u3068\u3067","url":null,"entities":{"description":{"urls":[]}},"protected":false,"followers_count":117,"friends_count":28,"listed_count":2,"created_at":"Wed Feb 05 14:33:02 +0000 2014","favourites_count":149,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":false,"statuses_count":524,"lang":"ja","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"131516","profile_background_image_url":"http:\/\/abs.twimg.com\/images\/themes\/theme14\/bg.gif","profile_background_image_url_https":"https:\/\/abs.twimg.com\/images\/themes\/theme14\/bg.gif","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/561039580111974401\/cYfIdReb_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/561039580111974401\/cYfIdReb_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/2328884269\/1393527746","profile_link_color":"009999","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"EFEFEF","profile_text_color":"333333","profile_use_background_image":true,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":true,"follow_request_sent":false,"notifications":false,"translator_type":"none"}},{"id":198888200,"id_str":"198888200","name":"\u6bd4\u8f03\u7684\u3001\u4ef2\u304c\u826f\u3044\u4eba","uri":"\/arayutw\/lists\/list4","subscriber_count":0,"member_count":1,"mode":"private","description":"\u30c4\u30a4\u30c3\u30bf\u30fc\u3067\u3001\u6bd4\u8f03\u7684\u3001\u4ef2\u304c\u826f\u3044\u4eba\u3002","slug":"list4","full_name":"@arayutw\/list4","created_at":"Sun Mar 15 06:28:13 +0000 2015","following":true,"user":{"id":1528352858,"id_str":"1528352858","name":"\u3042\u3089\u3086","screen_name":"arayutw","location":"\u6771\u4eac\u90fd\u8db3\u7acb\u533a","description":"SYNCER\u3068\u3044\u3046\u30b5\u30a4\u30c8\u3092\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u63b2\u793a\u677f\u2192 https:\/\/t.co\/OAIDbACF3N","url":"https:\/\/t.co\/lW3GYq8sQl","entities":{"url":{"urls":[{"url":"https:\/\/t.co\/lW3GYq8sQl","expanded_url":"https:\/\/syncer.jp\/","display_url":"syncer.jp","indices":[0,23]}]},"description":{"urls":[{"url":"https:\/\/t.co\/OAIDbACF3N","expanded_url":"https:\/\/forum.syncer.jp\/","display_url":"forum.syncer.jp","indices":[26,49]}]}},"protected":false,"followers_count":1418,"friends_count":564,"listed_count":113,"created_at":"Tue Jun 18 17:28:51 +0000 2013","favourites_count":4455,"utc_offset":32400,"time_zone":"Asia\/Tokyo","geo_enabled":true,"verified":false,"statuses_count":34815,"lang":"ja","contributors_enabled":false,"is_translator":false,"is_translation_enabled":true,"profile_background_color":"2660A1","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/632205394824183808\/FIL3S4z4.png","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/632205394824183808\/FIL3S4z4.png","profile_background_tile":false,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/631038167416619008\/7xfGAEwp_normal.png","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/631038167416619008\/7xfGAEwp_normal.png","profile_link_color":"D36015","profile_sidebar_border_color":"F2E195","profile_sidebar_fill_color":"FFF7CC","profile_text_color":"0C3E53","profile_use_background_image":false,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false,"translator_type":"regular"}},{"id":198886034,"id_str":"198886034","name":"\u30b9\u30d1\u30de\u30fc","uri":"\/arayutw\/lists\/list3","subscriber_count":0,"member_count":0,"mode":"public","description":"\u30b9\u30d1\u30de\u30fc\u3092\u30a6\u30a9\u30c3\u30c1\u30f3\u30b0\u3002","slug":"list3","full_name":"@arayutw\/list3","created_at":"Sun Mar 15 05:49:25 +0000 2015","following":true,"user":{"id":1528352858,"id_str":"1528352858","name":"\u3042\u3089\u3086","screen_name":"arayutw","location":"\u6771\u4eac\u90fd\u8db3\u7acb\u533a","description":"SYNCER\u3068\u3044\u3046\u30b5\u30a4\u30c8\u3092\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u63b2\u793a\u677f\u2192 https:\/\/t.co\/OAIDbACF3N","url":"https:\/\/t.co\/lW3GYq8sQl","entities":{"url":{"urls":[{"url":"https:\/\/t.co\/lW3GYq8sQl","expanded_url":"https:\/\/syncer.jp\/","display_url":"syncer.jp","indices":[0,23]}]},"description":{"urls":[{"url":"https:\/\/t.co\/OAIDbACF3N","expanded_url":"https:\/\/forum.syncer.jp\/","display_url":"forum.syncer.jp","indices":[26,49]}]}},"protected":false,"followers_count":1418,"friends_count":564,"listed_count":113,"created_at":"Tue Jun 18 17:28:51 +0000 2013","favourites_count":4455,"utc_offset":32400,"time_zone":"Asia\/Tokyo","geo_enabled":true,"verified":false,"statuses_count":34815,"lang":"ja","contributors_enabled":false,"is_translator":false,"is_translation_enabled":true,"profile_background_color":"2660A1","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/632205394824183808\/FIL3S4z4.png","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/632205394824183808\/FIL3S4z4.png","profile_background_tile":false,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/631038167416619008\/7xfGAEwp_normal.png","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/631038167416619008\/7xfGAEwp_normal.png","profile_link_color":"D36015","profile_sidebar_border_color":"F2E195","profile_sidebar_fill_color":"FFF7CC","profile_text_color":"0C3E53","profile_use_background_image":false,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false,"translator_type":"regular"}},{"id":198886011,"id_str":"198886011","name":"\u597d\u304d\u306a\u6709\u540d\u4eba","uri":"\/arayutw\/lists\/list2","subscriber_count":0,"member_count":1,"mode":"public","description":"\u597d\u304d\u306a\u6709\u540d\u4eba\u306e\u30bf\u30a4\u30e0\u30e9\u30a4\u30f3\u3002","slug":"list2","full_name":"@arayutw\/list2","created_at":"Sun Mar 15 05:48:53 +0000 2015","following":true,"user":{"id":1528352858,"id_str":"1528352858","name":"\u3042\u3089\u3086","screen_name":"arayutw","location":"\u6771\u4eac\u90fd\u8db3\u7acb\u533a","description":"SYNCER\u3068\u3044\u3046\u30b5\u30a4\u30c8\u3092\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u63b2\u793a\u677f\u2192 https:\/\/t.co\/OAIDbACF3N","url":"https:\/\/t.co\/lW3GYq8sQl","entities":{"url":{"urls":[{"url":"https:\/\/t.co\/lW3GYq8sQl","expanded_url":"https:\/\/syncer.jp\/","display_url":"syncer.jp","indices":[0,23]}]},"description":{"urls":[{"url":"https:\/\/t.co\/OAIDbACF3N","expanded_url":"https:\/\/forum.syncer.jp\/","display_url":"forum.syncer.jp","indices":[26,49]}]}},"protected":false,"followers_count":1418,"friends_count":564,"listed_count":113,"created_at":"Tue Jun 18 17:28:51 +0000 2013","favourites_count":4455,"utc_offset":32400,"time_zone":"Asia\/Tokyo","geo_enabled":true,"verified":false,"statuses_count":34815,"lang":"ja","contributors_enabled":false,"is_translator":false,"is_translation_enabled":true,"profile_background_color":"2660A1","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/632205394824183808\/FIL3S4z4.png","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/632205394824183808\/FIL3S4z4.png","profile_background_tile":false,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/631038167416619008\/7xfGAEwp_normal.png","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/631038167416619008\/7xfGAEwp_normal.png","profile_link_color":"D36015","profile_sidebar_border_color":"F2E195","profile_sidebar_fill_color":"FFF7CC","profile_text_color":"0C3E53","profile_use_background_image":false,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false,"translator_type":"regular"}},{"id":198886001,"id_str":"198886001","name":"\u8a55\u8ad6\u5bb6","uri":"\/arayutw\/lists\/list1","subscriber_count":0,"member_count":0,"mode":"private","description":"\u8a55\u8ad6\u5bb6\u3063\u307d\u3044\u30c4\u30a4\u30fc\u30c8\u3092\u3059\u308b\u4eba\u305f\u3061\u306e\u30ea\u30b9\u30c8\u3002","slug":"list1","full_name":"@arayutw\/list1","created_at":"Sun Mar 15 05:48:44 +0000 2015","following":true,"user":{"id":1528352858,"id_str":"1528352858","name":"\u3042\u3089\u3086","screen_name":"arayutw","location":"\u6771\u4eac\u90fd\u8db3\u7acb\u533a","description":"SYNCER\u3068\u3044\u3046\u30b5\u30a4\u30c8\u3092\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u63b2\u793a\u677f\u2192 https:\/\/t.co\/OAIDbACF3N","url":"https:\/\/t.co\/lW3GYq8sQl","entities":{"url":{"urls":[{"url":"https:\/\/t.co\/lW3GYq8sQl","expanded_url":"https:\/\/syncer.jp\/","display_url":"syncer.jp","indices":[0,23]}]},"description":{"urls":[{"url":"https:\/\/t.co\/OAIDbACF3N","expanded_url":"https:\/\/forum.syncer.jp\/","display_url":"forum.syncer.jp","indices":[26,49]}]}},"protected":false,"followers_count":1418,"friends_count":564,"listed_count":113,"created_at":"Tue Jun 18 17:28:51 +0000 2013","favourites_count":4455,"utc_offset":32400,"time_zone":"Asia\/Tokyo","geo_enabled":true,"verified":false,"statuses_count":34815,"lang":"ja","contributors_enabled":false,"is_translator":false,"is_translation_enabled":true,"profile_background_color":"2660A1","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/632205394824183808\/FIL3S4z4.png","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/632205394824183808\/FIL3S4z4.png","profile_background_tile":false,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/631038167416619008\/7xfGAEwp_normal.png","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/631038167416619008\/7xfGAEwp_normal.png","profile_link_color":"D36015","profile_sidebar_border_color":"F2E195","profile_sidebar_fill_color":"FFF7CC","profile_text_color":"0C3E53","profile_use_background_image":false,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false,"translator_type":"regular"}},{"id":198825114,"id_str":"198825114","name":"\u597d\u304d\u306a\u304a\u7b11\u3044\u82b8\u4eba","uri":"\/arayutw\/lists\/list","subscriber_count":0,"member_count":4,"mode":"public","description":"\u597d\u304d\u306a\u304a\u7b11\u3044\u82b8\u4eba\u306e\u30ea\u30b9\u30c8\u3067\u3059\u3002","slug":"list","full_name":"@arayutw\/list","created_at":"Sat Mar 14 15:53:51 +0000 2015","following":true,"user":{"id":1528352858,"id_str":"1528352858","name":"\u3042\u3089\u3086","screen_name":"arayutw","location":"\u6771\u4eac\u90fd\u8db3\u7acb\u533a","description":"SYNCER\u3068\u3044\u3046\u30b5\u30a4\u30c8\u3092\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u63b2\u793a\u677f\u2192 https:\/\/t.co\/OAIDbACF3N","url":"https:\/\/t.co\/lW3GYq8sQl","entities":{"url":{"urls":[{"url":"https:\/\/t.co\/lW3GYq8sQl","expanded_url":"https:\/\/syncer.jp\/","display_url":"syncer.jp","indices":[0,23]}]},"description":{"urls":[{"url":"https:\/\/t.co\/OAIDbACF3N","expanded_url":"https:\/\/forum.syncer.jp\/","display_url":"forum.syncer.jp","indices":[26,49]}]}},"protected":false,"followers_count":1418,"friends_count":564,"listed_count":113,"created_at":"Tue Jun 18 17:28:51 +0000 2013","favourites_count":4455,"utc_offset":32400,"time_zone":"Asia\/Tokyo","geo_enabled":true,"verified":false,"statuses_count":34815,"lang":"ja","contributors_enabled":false,"is_translator":false,"is_translation_enabled":true,"profile_background_color":"2660A1","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/632205394824183808\/FIL3S4z4.png","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/632205394824183808\/FIL3S4z4.png","profile_background_tile":false,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/631038167416619008\/7xfGAEwp_normal.png","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/631038167416619008\/7xfGAEwp_normal.png","profile_link_color":"D36015","profile_sidebar_border_color":"F2E195","profile_sidebar_fill_color":"FFF7CC","profile_text_color":"0C3E53","profile_use_background_image":false,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false,"translator_type":"regular"}}]

レスポンスヘッダー

HTTP/1.1 200 OK
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
content-disposition: attachment; filename=json.json
content-length: 21051
content-type: application/json;charset=utf-8
date: Wed, 18 Jan 2017 02:18:14 GMT
expires: Tue, 31 Mar 1981 05:00:00 GMT
last-modified: Wed, 18 Jan 2017 02:18:14 GMT
pragma: no-cache
server: tsa_m
set-cookie: lang=ja; Path=/
set-cookie: guest_id=v1%3A148470589404326013; Domain=.twitter.com; Path=/; Expires=Fri, 18-Jan-2019 02:18:14 UTC
status: 200 OK
strict-transport-security: max-age=631138519
x-access-level: read
x-connection-hash: 4b7a0f3273d201c682e1ba93dc0fd6ef
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-rate-limit-limit: 15
x-rate-limit-remaining: 14
x-rate-limit-reset: 1484706794
x-response-time: 158
x-transaction: 00d62592004d61ba
x-twitter-response-tags: BouncerCompliant
x-xss-protection: 1; mode=block

デモ

lists/listのリクエストを試すことができます。ユーザー認証のデモを試す場合は、アプリケーション(読取権限)の連携を許可する必要があります。利用後、お手数ですが連携の解除をお願いします。連携を解除し忘れたとしても、当アプリケーションが許可なくデータにアクセスすることはありません。

user_id

screen_name

reverse

/

認証方法

/

サンプルコード

lists/listのエンドポイントを利用するためのサンプルプログラムです。各種トークンの情報をセットしてからPHPで起動して下さい。リクエストに成功すると、$jsonという変数に目的のデータが代入されます。このデータを整形するなり保存するなり、活用して下さい。

ベアラートークン

PHP (OAuth2.0)

<?php
/**************************************************

	[GET lists/list]のお試しプログラム

	認証方式: ベアラートークン

	配布: SYNCER
	公式ドキュメント: https://dev.twitter.com/rest/reference/get/lists/list
	日本語解説ページ: https://syncer.jp/Web/API/Twitter/REST_API/GET/lists/list/

**************************************************/

	// 設定
	$bearer_token = '' ;	// ベアラートークン
	$request_url = 'https://api.twitter.com/1.1/lists/list.json' ;		// エンドポイント

	// パラメータ (オプション)
	$params = array(
		"user_id" => "1528352858",
//		"screen_name" => "arayutw",
//		"reverse" => "true",
	) ;

	// パラメータがある場合
	if( $params ) {
		$request_url .= '?' . http_build_query( $params ) ;
	}

	// リクエスト用のコンテキスト
	$context = array(
		'http' => array(
			'method' => 'GET' , // リクエストメソッド
			'header' => array(			  // ヘッダー
				'Authorization: Bearer ' . $bearer_token ,
			) ,
		) ,
	) ;

	// cURLを使ってリクエスト
	$curl = curl_init() ;
	curl_setopt( $curl , CURLOPT_URL , $request_url ) ;
	curl_setopt( $curl , CURLOPT_HEADER, 1 ) ; 
	curl_setopt( $curl , CURLOPT_CUSTOMREQUEST , $context['http']['method'] ) ;			// メソッド
	curl_setopt( $curl , CURLOPT_SSL_VERIFYPEER , false ) ;								// 証明書の検証を行わない
	curl_setopt( $curl , CURLOPT_RETURNTRANSFER , true ) ;								// curl_execの結果を文字列で返す
	curl_setopt( $curl , CURLOPT_HTTPHEADER , $context['http']['header'] ) ;			// ヘッダー
	curl_setopt( $curl , CURLOPT_TIMEOUT , 5 ) ;										// タイムアウトの秒数
	$res1 = curl_exec( $curl ) ;
	$res2 = curl_getinfo( $curl ) ;
	curl_close( $curl ) ;

	// 取得したデータ
	$json = substr( $res1, $res2['header_size'] ) ;				// 取得したデータ(JSONなど)
	$header = substr( $res1, 0, $res2['header_size'] ) ;		// レスポンスヘッダー (検証に利用したい場合にどうぞ)

	// [cURL]ではなく、[file_get_contents()]を使うには下記の通りです…
	// $json = @file_get_contents( $request_url , false , stream_context_create( $context ) ) ;

	// JSONをオブジェクトに変換 (処理をする場合)
//	$obj = json_decode( $json ) ;

	// HTML用
	$html = '' ;

	// タイトル
	$html .= '<h1 style="text-align:center; border-bottom:1px solid #555; padding-bottom:12px; margin-bottom:48px; color:#D36015;">GET lists/list</h1>' ;

	// 検証用
	$html .= '<h2>取得したデータ</h2>' ;
	$html .= '<p>下記のデータを取得できました。</p>' ;
	$html .= 	'<h3>ボディ(JSON)</h3>' ;
	$html .= 	'<p><textarea style="width:80%" rows="8">' . $json . '</textarea></p>' ;
	$html .= 	'<h3>レスポンスヘッダー</h3>' ;
	$html .= 	'<p><textarea style="width:80%" rows="8">' . $header . '</textarea></p>' ;

	// 検証用
	$html .= '<h2>リクエストしたデータ</h2>' ;
	$html .= '<p>下記内容でリクエストをしました。</p>' ;
	$html .= 	'<h3>URL</h3>' ;
	$html .= 	'<p><textarea style="width:80%" rows="8">' . $context['http']['method'] . ' ' . $request_url . '</textarea></p>' ;
	$html .= 	'<h3>ヘッダー</h3>' ;
	$html .= 	'<p><textarea style="width:80%" rows="8">' . implode( "\r\n" , $context['http']['header'] ) . '</textarea></p>' ;

	// フッター
	$html .= '<small style="display:block; border-top:1px solid #555; padding-top:12px; margin-top:72px; text-align:center; font-weight:700;">プログラムの説明: <a href="https://syncer.jp/Web/API/Twitter/REST_API/GET/lists/list/" target="_blank">SYNCER</a></small>' ;

	// 出力 (本稼働時はHTMLのヘッダー、フッターを付けよう)
	echo $html ;

アクセストークン

PHP (OAuth1.0)

<?php
/**************************************************

	[GET lists/list]のお試しプログラム

	認証方式: アクセストークン

	配布: SYNCER
	公式ドキュメント: https://dev.twitter.com/rest/reference/get/lists/list
	日本語解説ページ: https://syncer.jp/Web/API/Twitter/REST_API/GET/lists/list/

**************************************************/

	// 設定
	$api_key = '' ;		// APIキー
	$api_secret = '' ;		// APIシークレット
	$access_token = '' ;		// アクセストークン
	$access_token_secret = '' ;		// アクセストークンシークレット
	$request_url = 'https://api.twitter.com/1.1/lists/list.json' ;		// エンドポイント
	$request_method = 'GET' ;

	// パラメータA (オプション)
	$params_a = array(
		"user_id" => "1528352858",
//		"screen_name" => "arayutw",
//		"reverse" => "true",
	) ;

	// キーを作成する (URLエンコードする)
	$signature_key = rawurlencode( $api_secret ) . '&' . rawurlencode( $access_token_secret ) ;

	// パラメータB (署名の材料用)
	$params_b = array(
		'oauth_token' => $access_token ,
		'oauth_consumer_key' => $api_key ,
		'oauth_signature_method' => 'HMAC-SHA1' ,
		'oauth_timestamp' => time() ,
		'oauth_nonce' => microtime() ,
		'oauth_version' => '1.0' ,
	) ;

	// パラメータAとパラメータBを合成してパラメータCを作る
	$params_c = array_merge( $params_a , $params_b ) ;

	// 連想配列をアルファベット順に並び替える
	ksort( $params_c ) ;

	// パラメータの連想配列を[キー=値&キー=値...]の文字列に変換する
	$request_params = http_build_query( $params_c , '' , '&' ) ;

	// 一部の文字列をフォロー
	$request_params = str_replace( array( '+' , '%7E' ) , array( '%20' , '~' ) , $request_params ) ;

	// 変換した文字列をURLエンコードする
	$request_params = rawurlencode( $request_params ) ;

	// リクエストメソッドをURLエンコードする
	// ここでは、URL末尾の[?]以下は付けないこと
	$encoded_request_method = rawurlencode( $request_method ) ;
 
	// リクエストURLをURLエンコードする
	$encoded_request_url = rawurlencode( $request_url ) ;
 
	// リクエストメソッド、リクエストURL、パラメータを[&]で繋ぐ
	$signature_data = $encoded_request_method . '&' . $encoded_request_url . '&' . $request_params ;

	// キー[$signature_key]とデータ[$signature_data]を利用して、HMAC-SHA1方式のハッシュ値に変換する
	$hash = hash_hmac( 'sha1' , $signature_data , $signature_key , TRUE ) ;

	// base64エンコードして、署名[$signature]が完成する
	$signature = base64_encode( $hash ) ;

	// パラメータの連想配列、[$params]に、作成した署名を加える
	$params_c['oauth_signature'] = $signature ;

	// パラメータの連想配列を[キー=値,キー=値,...]の文字列に変換する
	$header_params = http_build_query( $params_c , '' , ',' ) ;

	// リクエスト用のコンテキスト
	$context = array(
		'http' => array(
			'method' => $request_method , // リクエストメソッド
			'header' => array(			  // ヘッダー
				'Authorization: OAuth ' . $header_params ,
			) ,
		) ,
	) ;

	// パラメータがある場合、URLの末尾に追加
	if( $params_a ) {
		$request_url .= '?' . http_build_query( $params_a ) ;
	}

	// オプションがある場合、コンテキストにPOSTフィールドを作成する (GETの場合は不要)
//	if( $params_a ) {
//		$context['http']['content'] = http_build_query( $params_a ) ;
//	}

	// cURLを使ってリクエスト
	$curl = curl_init() ;
	curl_setopt( $curl, CURLOPT_URL , $request_url ) ;
	curl_setopt( $curl, CURLOPT_HEADER, 1 ) ; 
	curl_setopt( $curl, CURLOPT_CUSTOMREQUEST , $context['http']['method'] ) ;	// メソッド
	curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER , false ) ;	// 証明書の検証を行わない
	curl_setopt( $curl, CURLOPT_RETURNTRANSFER , true ) ;	// curl_execの結果を文字列で返す
	curl_setopt( $curl, CURLOPT_HTTPHEADER , $context['http']['header'] ) ;	// ヘッダー
//	if( isset( $context['http']['content'] ) && !empty( $context['http']['content'] ) ) {		// GETの場合は不要
//		curl_setopt( $curl , CURLOPT_POSTFIELDS , $context['http']['content'] ) ;	// リクエストボディ
//	}
	curl_setopt( $curl , CURLOPT_TIMEOUT , 5 ) ;	// タイムアウトの秒数
	$res1 = curl_exec( $curl ) ;
	$res2 = curl_getinfo( $curl ) ;
	curl_close( $curl ) ;

	// 取得したデータ
	$json = substr( $res1, $res2['header_size'] ) ;		// 取得したデータ(JSONなど)
	$header = substr( $res1, 0, $res2['header_size'] ) ;	// レスポンスヘッダー (検証に利用したい場合にどうぞ)

	// [cURL]ではなく、[file_get_contents()]を使うには下記の通りです…
	// $json = file_get_contents( $request_url , false , stream_context_create( $context ) ) ;

	// JSONをオブジェクトに変換
	$obj = json_decode( $json ) ;

	// HTML用
	$html = '' ;

	// タイトル
	$html .= '<h1 style="text-align:center; border-bottom:1px solid #555; padding-bottom:12px; margin-bottom:48px; color:#D36015;">GET lists/list</h1>' ;

	// エラー判定
	if( !$json || !$obj ) {
		$html .= '<h2>エラー内容</h2>' ;
		$html .= '<p>データを取得することができませんでした…。設定を見直して下さい。</p>' ;
	}

	// 検証用
	$html .= '<h2>取得したデータ</h2>' ;
	$html .= '<p>下記のデータを取得できました。</p>' ;
	$html .= 	'<h3>ボディ(JSON)</h3>' ;
	$html .= 	'<p><textarea style="width:80%" rows="8">' . $json . '</textarea></p>' ;
	$html .= 	'<h3>レスポンスヘッダー</h3>' ;
	$html .= 	'<p><textarea style="width:80%" rows="8">' . $header . '</textarea></p>' ;

	// 検証用
	$html .= '<h2>リクエストしたデータ</h2>' ;
	$html .= '<p>下記内容でリクエストをしました。</p>' ;
	$html .= 	'<h3>URL</h3>' ;
	$html .= 	'<p><textarea style="width:80%" rows="8">' . $context['http']['method'] . ' ' . $request_url . '</textarea></p>' ;
	$html .= 	'<h3>ヘッダー</h3>' ;
	$html .= 	'<p><textarea style="width:80%" rows="8">' . implode( "\r\n" , $context['http']['header'] ) . '</textarea></p>' ;

	// フッター
	$html .= '<small style="display:block; border-top:1px solid #555; padding-top:12px; margin-top:72px; text-align:center; font-weight:700;">プログラムの説明: <a href="https://syncer.jp/Web/API/Twitter/REST_API/GET/lists/list/" target="_blank">SYNCER</a></small>' ;

	// 出力 (本稼働時はHTMLのヘッダー、フッターを付けよう)
	echo $html ;