rely on twitter api for source calls

This commit is contained in:
r888888888
2015-02-09 17:50:19 -08:00
parent 06e9727059
commit fc30b9d606
6 changed files with 174 additions and 866 deletions

View File

@@ -1,28 +1,20 @@
---
http_interactions:
- request:
method: get
uri: https://mobile.twitter.com/nounproject/status/540944400767922176
method: post
uri: https://xxx:xxx@api.twitter.com/oauth2/token
body:
encoding: US-ASCII
string: ''
encoding: UTF-8
string: grant_type=client_credentials
headers:
Accept:
- ! '*/*'
- "*/*"
User-Agent:
- Mechanize/2.7.2 Ruby/1.9.3p327 (http://github.com/sparklemotion/mechanize/)
- TwitterRubyGem/5.13.0
Content-Type:
- application/x-www-form-urlencoded; charset=UTF-8
Accept-Encoding:
- gzip,deflate,identity
Accept-Charset:
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language:
- en-us,en;q=0.5
Host:
- mobile.twitter.com
Connection:
- keep-alive
Keep-Alive:
- 300
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
response:
status:
code: 200
@@ -30,119 +22,126 @@ http_interactions:
headers:
Cache-Control:
- no-cache, no-store, must-revalidate, pre-check=0, post-check=0
Content-Encoding:
- gzip
Content-Language:
- en
Content-Length:
- '2552'
Content-Security-Policy:
- ! 'default-src ''self''; connect-src ''self''; font-src ''self'' data:; frame-src
https://*.twitter.com twitter: https://www.google.com; img-src https://twitter.com
https://*.twitter.com https://*.twimg.com https://maps.google.com https://www.google-analytics.com
https://www.google.com data:; media-src https://*.twitter.com https://*.twimg.com;
object-src ''self''; script-src ''unsafe-inline'' ''unsafe-eval'' https://*.twitter.com
https://*.twimg.com https://www.google.com https://www.google-analytics.com;
style-src ''unsafe-inline'' https://*.twitter.com https://*.twimg.com; report-uri
https://twitter.com/i/csp_report?a=O5SWEZTPOJQWY3A%3D&ro=false;'
- '151'
Content-Type:
- text/html;charset=utf-8
- application/json;charset=utf-8
Date:
- Fri, 05 Dec 2014 21:49:07 UTC
- Tue, 10 Feb 2015 00:55:58 UTC
Expires:
- Tue, 31 Mar 1981 05:00:00 GMT
Last-Modified:
- Fri, 05 Dec 2014 21:49:07 GMT
- Tue, 10 Feb 2015 00:55:58 GMT
Ml:
- S
Pragma:
- no-cache
Server:
- tsa_a
Set-Cookie:
- _mobile_sess=BAh7BjoQX2NzcmZfdG9rZW4iJTM0NWVhOGIzMTA4ZTlkNDU4MjZmZjFjNzA4ZTRiMjA1--222093212ce2d9a66b6f98e63b3cfb64afac45e8;
Expires=Tue, 03 Feb 2015 21:49:07 GMT; Path=/; Secure; HTTPOnly
- _twitter_sess=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%250ASGFzaHsABjoKQHVzZWR7AA%253D%253D--1164b91ac812d853b877e93ddb612b7471bebc74;
Path=/; Domain=.twitter.com; Secure; HTTPOnly
- d=32; Expires=Sat, 05 Dec 2015 21:49:07 GMT; Path=/; Secure; HTTPOnly
- guest_id=v1%3A141781614725022910; Domain=.twitter.com; Path=/; Expires=Sun,
04-Dec-2016 21:49:07 UTC
- m2_metrics_token=141781614790846963; Expires=Sun, 04 Dec 2016 21:49:07 GMT;
Path=/; Domain=.mobile.twitter.com; Secure; HTTPOnly
- guest_id=v1%3A142352975859860652; Domain=.twitter.com; Path=/; Expires=Thu,
09-Feb-2017 00:55:58 UTC
Status:
- 200 OK
Strict-Transport-Security:
- max-age=631138519
Vary:
- Accept-Encoding
X-Connection-Hash:
- 4029ceffd10aa3df7662b81489db0d1d
- b23dbdc69e5f4808dc266831e6c40f47
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- SAMEORIGIN
X-Response-Time:
- '57'
- '9'
X-Transaction:
- 1a2201f17bcedc01
- 8ec4fdd4c06ae572
X-Twitter-Response-Tags:
- BouncerCompliant
X-Ua-Compatible:
- IE=edge,chrome=1
X-Xss-Protection:
- 1; mode=block
body:
encoding: ASCII-8BIT
string: !binary |-
H4sIAAAAAAAAANRaW2/bOBZ+z6/gapDOS2XZjuNLGzttk2bbTtMJmmTb7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cAoYqi/5vBsuV/Sf
jrp1e6LPN5y/6reF6AEvMs21azxc6jvA77/D7Cq79Oy1FKGevDTfxfQPciwr
yvn+4Yv9yYv94ZACjq+1Z6C1f/AcftdYPg5P4BfCWr6W/yan+4en1QVE30H6
7xngyZytyptOGR755xSLvf8DAAD//wMASHIS7yAiAAA=
encoding: UTF-8
string: '{"token_type":"bearer","access_token":"xxx"}'
http_version:
recorded_at: Fri, 05 Dec 2014 21:49:10 GMT
recorded_at: Tue, 10 Feb 2015 00:55:58 GMT
- request:
method: get
uri: https://api.twitter.com/1.1/statuses/show/540944400767922176.json
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- application/json
User-Agent:
- TwitterRubyGem/5.13.0
Authorization:
- Bearer xxx
Accept-Encoding:
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
response:
status:
code: 200
message: OK
headers:
Cache-Control:
- no-cache, no-store, must-revalidate, pre-check=0, post-check=0
Content-Length:
- '1314'
Content-Type:
- application/json;charset=utf-8
Date:
- Tue, 10 Feb 2015 00:55:58 UTC
Expires:
- Tue, 31 Mar 1981 05:00:00 GMT
Last-Modified:
- Tue, 10 Feb 2015 00:55:58 GMT
Pragma:
- no-cache
Server:
- tsa_a
Set-Cookie:
- guest_id=v1%3A142352975867791411; Domain=.twitter.com; Path=/; Expires=Thu,
09-Feb-2017 00:55:58 UTC
Status:
- 200 OK
Strict-Transport-Security:
- max-age=631138519
X-Access-Level:
- read
X-Connection-Hash:
- 932f517650a7bac602eb3514290594c2
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- SAMEORIGIN
X-Rate-Limit-Limit:
- '180'
X-Rate-Limit-Remaining:
- '171'
X-Rate-Limit-Reset:
- '1423529853'
X-Response-Time:
- '21'
X-Transaction:
- 92c7fc4905492015
X-Twitter-Response-Tags:
- BouncerCompliant
X-Xss-Protection:
- 1; mode=block
body:
encoding: UTF-8
string: '{"created_at":"Fri Dec 05 19:02:50 +0000 2014","id":540944400767922176,"id_str":"540944400767922176","text":"More
is better. Unlimited is best. NounPro Members now get unlimited icon downloads
http:\/\/t.co\/SwzWXxmlUT http:\/\/t.co\/xN1fZ7sJmX","source":"\u003ca href=\"http:\/\/sproutsocial.com\"
rel=\"nofollow\"\u003eSprout Social\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":88996186,"id_str":"88996186","name":"The
Noun Project","screen_name":"nounproject","location":"Los Angeles, CA","profile_location":null,"description":"Building
a crowdsourced visual dictionary of everything. Follow @NounProjectDev for
insights on tech. Questions email us at info@thenounproject.com.","url":"http:\/\/t.co\/Cx580XUZBC","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/Cx580XUZBC","expanded_url":"http:\/\/www.thenounproject.com","display_url":"thenounproject.com","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":15079,"friends_count":756,"listed_count":734,"created_at":"Tue
Nov 10 19:03:38 +0000 2009","favourites_count":1301,"utc_offset":-28800,"time_zone":"Pacific
Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":4211,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"F7F7F7","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\/466623957043404800\/wJUHy2LU_normal.png","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/466623957043404800\/wJUHy2LU_normal.png","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/88996186\/1400028161","profile_link_color":"0084B4","profile_sidebar_border_color":"949596","profile_sidebar_fill_color":"C5C8C9","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":1,"favorite_count":3,"entities":{"hashtags":[],"symbols":[],"user_mentions":[],"urls":[{"url":"http:\/\/t.co\/SwzWXxmlUT","expanded_url":"http:\/\/bit.ly\/1yn2KWn","display_url":"bit.ly\/1yn2KWn","indices":[84,106]}],"media":[{"id":540944400688238592,"id_str":"540944400688238592","indices":[107,129],"media_url":"http:\/\/pbs.twimg.com\/media\/B4HSEP5CUAA4xyu.png","media_url_https":"https:\/\/pbs.twimg.com\/media\/B4HSEP5CUAA4xyu.png","url":"http:\/\/t.co\/xN1fZ7sJmX","display_url":"pic.twitter.com\/xN1fZ7sJmX","expanded_url":"http:\/\/twitter.com\/nounproject\/status\/540944400767922176\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"large":{"w":529,"h":263,"resize":"fit"},"small":{"w":340,"h":169,"resize":"fit"},"medium":{"w":529,"h":263,"resize":"fit"}}}]},"extended_entities":{"media":[{"id":540944400688238592,"id_str":"540944400688238592","indices":[107,129],"media_url":"http:\/\/pbs.twimg.com\/media\/B4HSEP5CUAA4xyu.png","media_url_https":"https:\/\/pbs.twimg.com\/media\/B4HSEP5CUAA4xyu.png","url":"http:\/\/t.co\/xN1fZ7sJmX","display_url":"pic.twitter.com\/xN1fZ7sJmX","expanded_url":"http:\/\/twitter.com\/nounproject\/status\/540944400767922176\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"large":{"w":529,"h":263,"resize":"fit"},"small":{"w":340,"h":169,"resize":"fit"},"medium":{"w":529,"h":263,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"}'
http_version:
recorded_at: Tue, 10 Feb 2015 00:55:58 GMT
recorded_with: VCR 2.9.0