Class: TwitterJekyll::ApiRequest Private
- Inherits:
-
Struct
- Object
- Struct
- TwitterJekyll::ApiRequest
- Defined in:
- lib/jekyll-twitter-plugin.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Holds the URI were going to request with any parameters
Constant Summary collapse
- TWITTER_API_URL =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"https://publish.twitter.com/oembed".freeze
Instance Attribute Summary collapse
-
#entity_url ⇒ Object
Returns the value of attribute entity_url.
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
-
#cache_key ⇒ Object
private
A cache key applicable to the current request with params.
-
#ssl? ⇒ Boolean
private
Always;.
-
#to_uri ⇒ Object
private
Return a URI for Twitter API with query params.
Instance Attribute Details
#entity_url ⇒ Object
Returns the value of attribute entity_url
109 110 111 |
# File 'lib/jekyll-twitter-plugin.rb', line 109 def entity_url @entity_url end |
#params ⇒ Object
Returns the value of attribute params
109 110 111 |
# File 'lib/jekyll-twitter-plugin.rb', line 109 def params @params end |
Instance Method Details
#cache_key ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
A cache key applicable to the current request with params
125 126 127 |
# File 'lib/jekyll-twitter-plugin.rb', line 125 def cache_key Digest::MD5.hexdigest("#{self.class.name}-#{unique_request_key}") end |
#ssl? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Always;
113 114 115 |
# File 'lib/jekyll-twitter-plugin.rb', line 113 def ssl? true end |
#to_uri ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return a URI for Twitter API with query params
118 119 120 121 122 |
# File 'lib/jekyll-twitter-plugin.rb', line 118 def to_uri URI.parse(TWITTER_API_URL).tap do |uri| uri.query = URI.encode_www_form url_params end end |