Module: Rubypress::Posts

Included in:
Client
Defined in:
lib/rubypress/posts.rb

Instance Method Summary collapse

Instance Method Details

#deletePost(options = {}) ⇒ Object



40
41
42
43
44
45
# File 'lib/rubypress/posts.rb', line 40

def deletePost(options = {})
  default_options = {
    :post_id => nil
  }.deep_merge!(options)
  execute('deletePost', default_options)
end

#editPost(options = {}) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/rubypress/posts.rb', line 32

def editPost(options = {})
   default_options = {
    :post_id => nil,
    :content => {}
  }.deep_merge!(options)
  execute('editPost', default_options)
end

#getPost(options = {}) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/rubypress/posts.rb', line 5

def getPost(options = {})
  default_options = {
    :post_id => nil,
    :fields => self.default_post_fields
  }.deep_merge!(options)
  execute('getPost', default_options)
end

#getPostFormats(options = {}) ⇒ Object



63
64
65
66
67
68
# File 'lib/rubypress/posts.rb', line 63

def getPostFormats(options = {})
  default_options = {
    :filter => {}
  }.deep_merge!(options)
  execute('getPostFormats', default_options)
end

#getPosts(options = {}) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/rubypress/posts.rb', line 13

def getPosts(options = {})
  default_options = {
    :filter => {
      :post_type => 'post',
      :orderby => 'post_date',
      :order => 'asc',
      :fields => self.default_post_fields
    }
  }.deep_merge!(options)
  execute('getPosts', default_options)
end

#getPostStatusList(options = {}) ⇒ Object



70
71
72
# File 'lib/rubypress/posts.rb', line 70

def getPostStatusList(options = {})
  execute('getPostStatusList', options)
end

#getPostType(options = {}) ⇒ Object



47
48
49
50
51
52
53
# File 'lib/rubypress/posts.rb', line 47

def getPostType(options = {})
  default_options = {
    :post_type_name => nil,
    :fields => []
  }.deep_merge!(options)
  execute('getPostType', default_options)
end

#getPostTypes(options = {}) ⇒ Object



55
56
57
58
59
60
61
# File 'lib/rubypress/posts.rb', line 55

def getPostTypes(options = {})
  default_options = {
    :filter => {},
    :fields => []
  }.deep_merge!(options)
  execute('getPostTypes', default_options)
end

#newPost(options = {}) ⇒ Object



25
26
27
28
29
30
# File 'lib/rubypress/posts.rb', line 25

def newPost(options = {})
  default_options = {
    :content => {}
  }.deep_merge!(options)
  execute('newPost', default_options)
end