Class: Yandex::Webmaster::Hosts::Sitemap
- Defined in:
- lib/yandex-webmaster/hosts/sitemap.rb
Constant Summary
Constants included from Request
Request::METHODS, Request::METHODS_WITH_BODIES
Constants included from Connection
Connection::ACCEPT, Connection::ACCEPT_CHARSET, Connection::ALLOWED_OPTIONS, Connection::CONTENT_TYPE, Connection::USER_AGENT
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
Attributes inherited from Base
Attributes included from Authorization
Instance Method Summary collapse
-
#delete ⇒ Object
Delete information about the sitemap from Yandex.Webmaster [RU] api.yandex.ru/webmaster/doc/dg/reference/sitemap-delete.xml [EN] api.yandex.com/webmaster/doc/dg/reference/sitemap-delete.xml.
- #deleted? ⇒ Boolean
-
#load_details ⇒ Object
Load detailed information about the sitemap [RU] api.yandex.ru/webmaster/doc/dg/reference/sitemap-id.xml [EN] api.yandex.com/webmaster/doc/dg/reference/sitemap-id.xml.
- #resources ⇒ Object
Methods inherited from Base
#attributes=, const_missing, define_attributes, #initialize, #method_missing
Methods included from Request
#delete_request, #get_request, #post_request, #put_request, #request
Methods included from Connection
Methods included from Authorization
#auth_code, #authenticate, #authenticated?, #authorize_url, #oauth, #token
Constructor Details
This class inherits a constructor from Yandex::Webmaster::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Yandex::Webmaster::Base
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host.
15 16 17 |
# File 'lib/yandex-webmaster/hosts/sitemap.rb', line 15 def host @host end |
Instance Method Details
#delete ⇒ Object
Delete information about the sitemap from Yandex.Webmaster
34 35 36 37 38 |
# File 'lib/yandex-webmaster/hosts/sitemap.rb', line 34 def delete response = self.request(:delete, self.href) @deleted = true if response.status.to_i == 204 self end |
#deleted? ⇒ Boolean
42 43 44 |
# File 'lib/yandex-webmaster/hosts/sitemap.rb', line 42 def deleted? !!@deleted end |
#load_details ⇒ Object
Load detailed information about the sitemap
25 26 27 28 |
# File 'lib/yandex-webmaster/hosts/sitemap.rb', line 25 def load_details self.attributes = self.request(:get, self.href).body self end |
#resources ⇒ Object
17 18 19 |
# File 'lib/yandex-webmaster/hosts/sitemap.rb', line 17 def resources @resources ||= {} end |