Class: Twat::Endpoints::Identica
- Defined in:
- lib/twat/endpoints/identica.rb
Instance Method Summary collapse
- #consumer_info ⇒ Object
- #endpoint_name ⇒ Object
-
#initialize ⇒ Identica
constructor
A new instance of Identica.
- #oauth_options ⇒ Object
-
#url ⇒ Object
this bails with /home/richo/code/ext/twat/lib/twat/endpoints/identica.rb:6:in ‘block in initialize’: uninitialized constant Twat::Endpoints::Identica::Request (NameError) So I figured it’s still relative to This module, so I tried.
Methods inherited from Base
Constructor Details
#initialize ⇒ Identica
Returns a new instance of Identica.
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/twat/endpoints/identica.rb', line 4 def initialize unless @@endpoint_set @@endpoint_set = true ::Twitter::Request.module_eval do alias :_request :request def request(method, path, params, ) path.gsub!(%r|^1/|, '') _request(method, path, params, ) end end end end |
Instance Method Details
#consumer_info ⇒ Object
26 27 28 29 30 31 |
# File 'lib/twat/endpoints/identica.rb', line 26 def consumer_info { consumer_key: "0af040d41599f5d07b738fc90a487af7", consumer_secret: "b6bb7284eaf975ab65a2dd3eb53fbf3d" } end |
#endpoint_name ⇒ Object
41 42 43 |
# File 'lib/twat/endpoints/identica.rb', line 41 def endpoint_name :"identi.ca" end |
#oauth_options ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/twat/endpoints/identica.rb', line 33 def { request_token_url: "https://identi.ca/api/oauth/request_token", access_token_url: "https://identi.ca/api/oauth/access_token", authorize_url: "https://identi.ca/api/oauth/authorize" } end |
#url ⇒ Object
this bails with /home/richo/code/ext/twat/lib/twat/endpoints/identica.rb:6:in ‘block in initialize’: uninitialized constant Twat::Endpoints::Identica::Request (NameError) So I figured it’s still relative to This module, so I tried
::Twitter.module_eval…
22 23 24 |
# File 'lib/twat/endpoints/identica.rb', line 22 def url "https://identi.ca/api" end |