Class: WordpressApi::Client

Inherits:
Object
  • Object
show all
Includes:
Api::Reader, Api::Writer, Helpers::Authorization, Helpers::Request
Defined in:
lib/wordpress_api/client.rb

Constant Summary

Constants included from Helpers::Authorization

Helpers::Authorization::DEFAULT_OAUTH_OPTIONS

Constants included from Helpers::Request

Helpers::Request::API_PATH, Helpers::Request::DEFAULT_HEADERS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Api::Writer

#create_comment, #create_comment_tree, #create_like, #create_post, #delete_comment, #delete_like, #delete_post, #follow, #repost, #unfollow

Methods included from Api::Reader

#blog, #comments, #followers, #likes, #posts, #profile

Methods included from Helpers::Authorization

#access_token, #authorize_from_access, #consumer

Constructor Details

#initialize(ctoken = WordpressApi.token, csecret = WordpressApi.secret, options = {}) ⇒ Client

Returns a new instance of Client.



13
14
15
16
17
# File 'lib/wordpress_api/client.rb', line 13

def initialize(ctoken=WordpressApi.token, csecret=WordpressApi.secret, options={})
  @consumer_token   = ctoken
  @consumer_secret  = csecret
  @consumer_options = options
end

Instance Attribute Details

#consumer_optionsObject (readonly)

Returns the value of attribute consumer_options.



11
12
13
# File 'lib/wordpress_api/client.rb', line 11

def consumer_options
  @consumer_options
end

#consumer_secretObject (readonly)

Returns the value of attribute consumer_secret.



11
12
13
# File 'lib/wordpress_api/client.rb', line 11

def consumer_secret
  @consumer_secret
end

#consumer_tokenObject (readonly)

Returns the value of attribute consumer_token.



11
12
13
# File 'lib/wordpress_api/client.rb', line 11

def consumer_token
  @consumer_token
end