Module: Rubypress::Posts
- Included in:
- Client
- Defined in:
- lib/rubypress/posts.rb
Instance Method Summary collapse
- #deletePost(options = {}) ⇒ Object
- #editPost(options = {}) ⇒ Object
- #getPost(options = {}) ⇒ Object
- #getPostFormats(options = {}) ⇒ Object
- #getPosts(options = {}) ⇒ Object
- #getPostStatusList(options = {}) ⇒ Object
- #getPostType(options = {}) ⇒ Object
- #getPostTypes(options = {}) ⇒ Object
- #newPost(options = {}) ⇒ Object
Instance Method Details
#deletePost(options = {}) ⇒ Object
40 41 42 43 44 45 |
# File 'lib/rubypress/posts.rb', line 40 def deletePost( = {}) = { :post_id => nil }.deep_merge!() execute('deletePost', ) end |
#editPost(options = {}) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/rubypress/posts.rb', line 32 def editPost( = {}) = { :post_id => nil, :content => {} }.deep_merge!() execute('editPost', ) end |
#getPost(options = {}) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/rubypress/posts.rb', line 5 def getPost( = {}) = { :post_id => nil, :fields => self.default_post_fields }.deep_merge!() execute('getPost', ) end |
#getPostFormats(options = {}) ⇒ Object
63 64 65 66 67 68 |
# File 'lib/rubypress/posts.rb', line 63 def getPostFormats( = {}) = { :filter => {} }.deep_merge!() execute('getPostFormats', ) end |
#getPosts(options = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/rubypress/posts.rb', line 13 def getPosts( = {}) = { :filter => { :post_type => 'post', :orderby => 'post_date', :order => 'asc', :fields => self.default_post_fields } }.deep_merge!() execute('getPosts', ) end |
#getPostStatusList(options = {}) ⇒ Object
70 71 72 |
# File 'lib/rubypress/posts.rb', line 70 def getPostStatusList( = {}) execute('getPostStatusList', ) end |
#getPostType(options = {}) ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/rubypress/posts.rb', line 47 def getPostType( = {}) = { :post_type_name => nil, :fields => [] }.deep_merge!() execute('getPostType', ) end |
#getPostTypes(options = {}) ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/rubypress/posts.rb', line 55 def getPostTypes( = {}) = { :filter => {}, :fields => [] }.deep_merge!() execute('getPostTypes', ) end |
#newPost(options = {}) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/rubypress/posts.rb', line 25 def newPost( = {}) = { :content => {} }.deep_merge!() execute('newPost', ) end |