Class: TwitterJekyll::ApiRequest Private
- Inherits:
-
Struct
- Object
- Struct
- TwitterJekyll::ApiRequest
- Defined in:
- lib/jekyll-twitter-plugin-2.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
110 111 112 |
# File 'lib/jekyll-twitter-plugin-2.rb', line 110 def entity_url @entity_url end |
#params ⇒ Object
Returns the value of attribute params
110 111 112 |
# File 'lib/jekyll-twitter-plugin-2.rb', line 110 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
126 127 128 |
# File 'lib/jekyll-twitter-plugin-2.rb', line 126 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;
114 115 116 |
# File 'lib/jekyll-twitter-plugin-2.rb', line 114 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
119 120 121 122 123 |
# File 'lib/jekyll-twitter-plugin-2.rb', line 119 def to_uri URI.parse(TWITTER_API_URL).tap do |uri| uri.query = URI.encode_www_form url_params end end |