Module: Posts
- Included in:
- Rubypress::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
38 39 40 41 42 43 |
# File 'lib/rubypress/posts.rb', line 38 def deletePost( = {}) = { :post_id => nil }.deep_merge!() execute('deletePost', ) end |
#editPost(options = {}) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/rubypress/posts.rb', line 30 def editPost( = {}) = { :post_id => nil, :content => {} }.deep_merge!() execute('editPost', ) end |
#getPost(options = {}) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/rubypress/posts.rb', line 3 def getPost( = {}) = { :post_id => nil, :fields => self.default_post_fields }.deep_merge!() execute('getPost', ) end |
#getPostFormats(options = {}) ⇒ Object
61 62 63 64 65 66 |
# File 'lib/rubypress/posts.rb', line 61 def getPostFormats( = {}) = { :filter => {} }.deep_merge!() execute('getPostFormats', ) end |
#getPosts(options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rubypress/posts.rb', line 11 def getPosts( = {}) = { :filter => { :post_type => 'post', :orderby => 'post_date', :order => 'asc', :fields => self.default_post_fields } }.deep_merge!() execute('getPosts', ) end |
#getPostStatusList(options = {}) ⇒ Object
68 69 70 |
# File 'lib/rubypress/posts.rb', line 68 def getPostStatusList( = {}) execute('getPostFormats', ) end |
#getPostType(options = {}) ⇒ Object
45 46 47 48 49 50 51 |
# File 'lib/rubypress/posts.rb', line 45 def getPostType( = {}) = { :post_type_name => nil, :fields => [] }.deep_merge!() execute('getPostType', ) end |
#getPostTypes(options = {}) ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/rubypress/posts.rb', line 53 def getPostTypes( = {}) = { :filter => {}, :fields => [] }.deep_merge!() execute('getPostTypes', ) end |
#newPost(options = {}) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/rubypress/posts.rb', line 23 def newPost( = {}) = { :content => {} }.deep_merge!() execute('newPost', ) end |